1#ifndef __ASM_MACH_MPPARSE_H
2#define __ASM_MACH_MPPARSE_H
3
4#include <mach_apic.h>
5#include <asm/tsc.h>
6
7extern int use_cyclone;
8
9#ifdef CONFIG_X86_SUMMIT_NUMA
10extern void setup_summit(void);
11#else
12#define setup_summit() {}
13#endif
14
15static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name,
16 struct mpc_config_translation *translation)
17{
18 Dprintk("Bus #%d is %s\n", m->mpc_busid, name);
19}
20
21static inline void mpc_oem_pci_bus(struct mpc_config_bus *m,
22 struct mpc_config_translation *translation)
23{
24}
25
26static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
27 char *productid)
28{
29 if (!strncmp(oem, "IBM ENSW", 8) &&
30 (!strncmp(productid, "VIGIL SMP", 9)
31 || !strncmp(productid, "EXA", 3)
32 || !strncmp(productid, "RUTHLESS SMP", 12))){
33 mark_tsc_unstable("Summit based system");
34 use_cyclone = 1;
35 setup_summit();
36 return 1;
37 }
38 return 0;
39}
40
41
42static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
43{
44 if (!strncmp(oem_id, "IBM", 3) &&
45 (!strncmp(oem_table_id, "SERVIGIL", 8)
46 || !strncmp(oem_table_id, "EXA", 3))){
47 mark_tsc_unstable("Summit based system");
48 use_cyclone = 1;
49 setup_summit();
50 return 1;
51 }
52 return 0;
53}
54
55struct rio_table_hdr {
56 unsigned char version;
57
58 unsigned char num_scal_dev;
59 unsigned char num_rio_dev;
60} __attribute__((packed));
61
62struct scal_detail {
63 unsigned char node_id;
64 unsigned long CBAR;
65 unsigned char port0node;
66 unsigned char port0port;
67 unsigned char port1node;
68 unsigned char port1port;
69 unsigned char port2node;
70 unsigned char port2port;
71 unsigned char chassis_num;
72} __attribute__((packed));
73
74struct rio_detail {
75 unsigned char node_id;
76 unsigned long BBAR;
77 unsigned char type;
78 unsigned char owner_id;
79
80 unsigned char port0node;
81 unsigned char port0port;
82 unsigned char port1node;
83 unsigned char port1port;
84 unsigned char first_slot;
85
86 unsigned char status;
87
88
89
90
91 unsigned char WP_index;
92
93
94 unsigned char chassis_num;
95
96
97
98
99
100
101
102} __attribute__((packed));
103
104
105typedef enum {
106 CompatTwister = 0,
107 AltTwister = 1,
108 CompatCyclone = 2,
109 AltCyclone = 3,
110 CompatWPEG = 4,
111 AltWPEG = 5,
112 LookOutAWPEG = 6,
113 LookOutBWPEG = 7,
114} node_type;
115
116static inline int is_WPEG(struct rio_detail *rio){
117 return (rio->type == CompatWPEG || rio->type == AltWPEG ||
118 rio->type == LookOutAWPEG || rio->type == LookOutBWPEG);
119}
120
121#endif
122