diff options
Diffstat (limited to 'include/asm-mips/sn/klconfig.h')
-rw-r--r-- | include/asm-mips/sn/klconfig.h | 90 |
1 files changed, 3 insertions, 87 deletions
diff --git a/include/asm-mips/sn/klconfig.h b/include/asm-mips/sn/klconfig.h index 9709ff701d9b..52238e65af8e 100644 --- a/include/asm-mips/sn/klconfig.h +++ b/include/asm-mips/sn/klconfig.h | |||
@@ -27,7 +27,6 @@ | |||
27 | * that offsets of existing fields do not change. | 27 | * that offsets of existing fields do not change. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/types.h> | 30 | #include <linux/types.h> |
32 | #include <asm/sn/types.h> | 31 | #include <asm/sn/types.h> |
33 | 32 | ||
@@ -37,7 +36,7 @@ | |||
37 | //#include <sys/SN/router.h> | 36 | //#include <sys/SN/router.h> |
38 | // XXX Stolen from <sys/SN/router.h>: | 37 | // XXX Stolen from <sys/SN/router.h>: |
39 | #define MAX_ROUTER_PORTS (6) /* Max. number of ports on a router */ | 38 | #define MAX_ROUTER_PORTS (6) /* Max. number of ports on a router */ |
40 | #include <asm/sn/sn0/sn0_fru.h> | 39 | #include <asm/sn/fru.h> |
41 | //#include <sys/graph.h> | 40 | //#include <sys/graph.h> |
42 | //#include <sys/xtalk/xbow.h> | 41 | //#include <sys/xtalk/xbow.h> |
43 | 42 | ||
@@ -54,32 +53,21 @@ | |||
54 | #include <asm/sn/agent.h> | 53 | #include <asm/sn/agent.h> |
55 | #include <asm/arc/types.h> | 54 | #include <asm/arc/types.h> |
56 | #include <asm/arc/hinv.h> | 55 | #include <asm/arc/hinv.h> |
57 | #if defined(CONFIG_SGI_IO) || defined(CONFIG_SGI_IP35) | 56 | #if defined(CONFIG_SGI_IP35) |
58 | // The hack file has to be before vector and after sn0_fru.... | 57 | // The hack file has to be before vector and after sn0_fru.... |
59 | #include <asm/hack.h> | 58 | #include <asm/hack.h> |
60 | #include <asm/sn/vector.h> | 59 | #include <asm/sn/vector.h> |
61 | #include <asm/xtalk/xtalk.h> | 60 | #include <asm/xtalk/xtalk.h> |
62 | #endif /* CONFIG_SGI_IO || CONFIG_SGI_IP35 */ | 61 | #endif /* CONFIG_SGI_IP35 */ |
63 | #endif /* CONFIG_SGI_IP27 || CONFIG_SGI_IP35 */ | 62 | #endif /* CONFIG_SGI_IP27 || CONFIG_SGI_IP35 */ |
64 | 63 | ||
65 | #define KLCFGINFO_MAGIC 0xbeedbabe | 64 | #define KLCFGINFO_MAGIC 0xbeedbabe |
66 | 65 | ||
67 | #ifdef FRUTEST | ||
68 | typedef u64 klconf_off_t; | ||
69 | #else | ||
70 | typedef s32 klconf_off_t; | 66 | typedef s32 klconf_off_t; |
71 | #endif | ||
72 | 67 | ||
73 | /* | 68 | /* |
74 | * Some IMPORTANT OFFSETS. These are the offsets on all NODES. | 69 | * Some IMPORTANT OFFSETS. These are the offsets on all NODES. |
75 | */ | 70 | */ |
76 | #if 0 | ||
77 | #define RAMBASE 0 | ||
78 | #define ARCSSPB_OFF 0x1000 /* shift it to sys/arcs/spb.h */ | ||
79 | |||
80 | #define OFF_HWGRAPH 0 | ||
81 | #endif | ||
82 | |||
83 | #define MAX_MODULE_ID 255 | 71 | #define MAX_MODULE_ID 255 |
84 | #define SIZE_PAD 4096 /* 4k padding for structures */ | 72 | #define SIZE_PAD 4096 /* 4k padding for structures */ |
85 | /* | 73 | /* |
@@ -134,15 +122,9 @@ typedef s32 klconf_off_t; | |||
134 | 122 | ||
135 | 123 | ||
136 | typedef struct console_s { | 124 | typedef struct console_s { |
137 | #if defined(CONFIG_SGI_IO) /* FIXME */ | ||
138 | __psunsigned_t uart_base; | ||
139 | __psunsigned_t config_base; | ||
140 | __psunsigned_t memory_base; | ||
141 | #else | ||
142 | unsigned long uart_base; | 125 | unsigned long uart_base; |
143 | unsigned long config_base; | 126 | unsigned long config_base; |
144 | unsigned long memory_base; | 127 | unsigned long memory_base; |
145 | #endif | ||
146 | short baud; | 128 | short baud; |
147 | short flag; | 129 | short flag; |
148 | int type; | 130 | int type; |
@@ -174,10 +156,6 @@ typedef struct kl_config_hdr { | |||
174 | 156 | ||
175 | 157 | ||
176 | #define KL_CONFIG_HDR(_nasid) ((kl_config_hdr_t *)(KLCONFIG_ADDR(_nasid))) | 158 | #define KL_CONFIG_HDR(_nasid) ((kl_config_hdr_t *)(KLCONFIG_ADDR(_nasid))) |
177 | #if 0 | ||
178 | #define KL_CONFIG_MALLOC_HDR(_nasid) \ | ||
179 | (KL_CONFIG_HDR(_nasid)->ch_malloc_hdr) | ||
180 | #endif | ||
181 | #define KL_CONFIG_INFO_OFFSET(_nasid) \ | 159 | #define KL_CONFIG_INFO_OFFSET(_nasid) \ |
182 | (KL_CONFIG_HDR(_nasid)->ch_board_info) | 160 | (KL_CONFIG_HDR(_nasid)->ch_board_info) |
183 | #define KL_CONFIG_INFO_SET_OFFSET(_nasid, _off) \ | 161 | #define KL_CONFIG_INFO_SET_OFFSET(_nasid, _off) \ |
@@ -197,23 +175,13 @@ typedef struct kl_config_hdr { | |||
197 | 175 | ||
198 | /* --- New Macros for the changed kl_config_hdr_t structure --- */ | 176 | /* --- New Macros for the changed kl_config_hdr_t structure --- */ |
199 | 177 | ||
200 | #if defined(CONFIG_SGI_IO) | ||
201 | #define PTR_CH_MALLOC_HDR(_k) ((klc_malloc_hdr_t *)\ | ||
202 | ((__psunsigned_t)_k + (_k->ch_malloc_hdr_off))) | ||
203 | #else | ||
204 | #define PTR_CH_MALLOC_HDR(_k) ((klc_malloc_hdr_t *)\ | 178 | #define PTR_CH_MALLOC_HDR(_k) ((klc_malloc_hdr_t *)\ |
205 | (unsigned long)_k + (_k->ch_malloc_hdr_off))) | 179 | (unsigned long)_k + (_k->ch_malloc_hdr_off))) |
206 | #endif | ||
207 | 180 | ||
208 | #define KL_CONFIG_CH_MALLOC_HDR(_n) PTR_CH_MALLOC_HDR(KL_CONFIG_HDR(_n)) | 181 | #define KL_CONFIG_CH_MALLOC_HDR(_n) PTR_CH_MALLOC_HDR(KL_CONFIG_HDR(_n)) |
209 | 182 | ||
210 | #if defined(CONFIG_SGI_IO) | ||
211 | #define PTR_CH_CONS_INFO(_k) ((console_t *)\ | ||
212 | ((__psunsigned_t)_k + (_k->ch_cons_off))) | ||
213 | #else | ||
214 | #define PTR_CH_CONS_INFO(_k) ((console_t *)\ | 183 | #define PTR_CH_CONS_INFO(_k) ((console_t *)\ |
215 | ((unsigned long)_k + (_k->ch_cons_off))) | 184 | ((unsigned long)_k + (_k->ch_cons_off))) |
216 | #endif | ||
217 | 185 | ||
218 | #define KL_CONFIG_CH_CONS_INFO(_n) PTR_CH_CONS_INFO(KL_CONFIG_HDR(_n)) | 186 | #define KL_CONFIG_CH_CONS_INFO(_n) PTR_CH_CONS_INFO(KL_CONFIG_HDR(_n)) |
219 | 187 | ||
@@ -490,14 +458,6 @@ typedef struct lboard_s { | |||
490 | #define KLCF_NUM_COMPS(_brd) ((_brd)->brd_numcompts) | 458 | #define KLCF_NUM_COMPS(_brd) ((_brd)->brd_numcompts) |
491 | #define KLCF_MODULE_ID(_brd) ((_brd)->brd_module) | 459 | #define KLCF_MODULE_ID(_brd) ((_brd)->brd_module) |
492 | 460 | ||
493 | #ifdef FRUTEST | ||
494 | |||
495 | #define KLCF_NEXT(_brd) ((_brd)->brd_next ? (lboard_t *)((_brd)->brd_next): NULL) | ||
496 | #define KLCF_COMP(_brd, _ndx) (klinfo_t *)((_brd)->brd_compts[(_ndx)]) | ||
497 | #define KLCF_COMP_ERROR(_brd, _comp) (_brd = _brd , (_comp)->errinfo) | ||
498 | |||
499 | #else | ||
500 | |||
501 | #define KLCF_NEXT(_brd) \ | 461 | #define KLCF_NEXT(_brd) \ |
502 | ((_brd)->brd_next ? \ | 462 | ((_brd)->brd_next ? \ |
503 | (lboard_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), (_brd)->brd_next)):\ | 463 | (lboard_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), (_brd)->brd_next)):\ |
@@ -509,8 +469,6 @@ typedef struct lboard_s { | |||
509 | #define KLCF_COMP_ERROR(_brd, _comp) \ | 469 | #define KLCF_COMP_ERROR(_brd, _comp) \ |
510 | (NODE_OFFSET_TO_K1(NASID_GET(_brd), (_comp)->errinfo)) | 470 | (NODE_OFFSET_TO_K1(NASID_GET(_brd), (_comp)->errinfo)) |
511 | 471 | ||
512 | #endif | ||
513 | |||
514 | #define KLCF_COMP_TYPE(_comp) ((_comp)->struct_type) | 472 | #define KLCF_COMP_TYPE(_comp) ((_comp)->struct_type) |
515 | #define KLCF_BRIDGE_W_ID(_comp) ((_comp)->physid) /* Widget ID */ | 473 | #define KLCF_BRIDGE_W_ID(_comp) ((_comp)->physid) /* Widget ID */ |
516 | 474 | ||
@@ -631,18 +589,6 @@ typedef struct klport_s { | |||
631 | klconf_off_t port_offset; | 589 | klconf_off_t port_offset; |
632 | } klport_t; | 590 | } klport_t; |
633 | 591 | ||
634 | #if 0 | ||
635 | /* | ||
636 | * This is very similar to the klport_s but instead of having a componant | ||
637 | * offset it has a board offset. | ||
638 | */ | ||
639 | typedef struct klxbow_port_s { | ||
640 | nasid_t port_nasid; | ||
641 | unsigned char port_flag; | ||
642 | klconf_off_t board_offset; | ||
643 | } klxbow_port_t; | ||
644 | #endif | ||
645 | |||
646 | typedef struct klcpu_s { /* CPU */ | 592 | typedef struct klcpu_s { /* CPU */ |
647 | klinfo_t cpu_info; | 593 | klinfo_t cpu_info; |
648 | unsigned short cpu_prid; /* Processor PRID value */ | 594 | unsigned short cpu_prid; /* Processor PRID value */ |
@@ -945,36 +891,6 @@ extern klcpu_t *nasid_slice_to_cpuinfo(nasid_t, int); | |||
945 | extern lboard_t *find_lboard_class(lboard_t *start, unsigned char brd_class); | 891 | extern lboard_t *find_lboard_class(lboard_t *start, unsigned char brd_class); |
946 | 892 | ||
947 | 893 | ||
948 | #if defined(CONFIG_SGI_IO) | ||
949 | extern xwidgetnum_t nodevertex_widgetnum_get(vertex_hdl_t node_vtx); | ||
950 | extern vertex_hdl_t nodevertex_xbow_peer_get(vertex_hdl_t node_vtx); | ||
951 | extern lboard_t *find_gfxpipe(int pipenum); | ||
952 | extern void setup_gfxpipe_link(vertex_hdl_t vhdl,int pipenum); | ||
953 | extern lboard_t *find_lboard_module_class(lboard_t *start, moduleid_t mod, | ||
954 | unsigned char brd_class); | ||
955 | extern lboard_t *find_nic_lboard(lboard_t *, nic_t); | ||
956 | extern lboard_t *find_nic_type_lboard(nasid_t, unsigned char, nic_t); | ||
957 | extern lboard_t *find_lboard_modslot(lboard_t *start, moduleid_t mod, slotid_t slot); | ||
958 | extern lboard_t *find_lboard_module(lboard_t *start, moduleid_t mod); | ||
959 | extern lboard_t *get_board_name(nasid_t nasid, moduleid_t mod, slotid_t slot, char *name); | ||
960 | extern int config_find_nic_router(nasid_t, nic_t, lboard_t **, klrou_t**); | ||
961 | extern int config_find_nic_hub(nasid_t, nic_t, lboard_t **, klhub_t**); | ||
962 | extern int config_find_xbow(nasid_t, lboard_t **, klxbow_t**); | ||
963 | extern klcpu_t *get_cpuinfo(cpuid_t cpu); | ||
964 | extern int update_klcfg_cpuinfo(nasid_t, int); | ||
965 | extern void board_to_path(lboard_t *brd, char *path); | ||
966 | extern moduleid_t get_module_id(nasid_t nasid); | ||
967 | extern void nic_name_convert(char *old_name, char *new_name); | ||
968 | extern int module_brds(nasid_t nasid, lboard_t **module_brds, int n); | ||
969 | extern lboard_t *brd_from_key(ulong_t key); | ||
970 | extern void device_component_canonical_name_get(lboard_t *,klinfo_t *, | ||
971 | char *); | ||
972 | extern int board_serial_number_get(lboard_t *,char *); | ||
973 | extern int is_master_baseio(nasid_t,moduleid_t,slotid_t); | ||
974 | extern nasid_t get_actual_nasid(lboard_t *brd) ; | ||
975 | extern net_vec_t klcfg_discover_route(lboard_t *, lboard_t *, int); | ||
976 | #else /* CONFIG_SGI_IO */ | ||
977 | extern klcpu_t *sn_get_cpuinfo(cpuid_t cpu); | 894 | extern klcpu_t *sn_get_cpuinfo(cpuid_t cpu); |
978 | #endif /* CONFIG_SGI_IO */ | ||
979 | 895 | ||
980 | #endif /* _ASM_SN_KLCONFIG_H */ | 896 | #endif /* _ASM_SN_KLCONFIG_H */ |