diff options
Diffstat (limited to 'include/asm-mips/sn/klconfig.h')
-rw-r--r-- | include/asm-mips/sn/klconfig.h | 89 |
1 files changed, 3 insertions, 86 deletions
diff --git a/include/asm-mips/sn/klconfig.h b/include/asm-mips/sn/klconfig.h index 9709ff701d9b..dc706268d2cf 100644 --- a/include/asm-mips/sn/klconfig.h +++ b/include/asm-mips/sn/klconfig.h | |||
@@ -37,7 +37,7 @@ | |||
37 | //#include <sys/SN/router.h> | 37 | //#include <sys/SN/router.h> |
38 | // XXX Stolen from <sys/SN/router.h>: | 38 | // XXX Stolen from <sys/SN/router.h>: |
39 | #define MAX_ROUTER_PORTS (6) /* Max. number of ports on a router */ | 39 | #define MAX_ROUTER_PORTS (6) /* Max. number of ports on a router */ |
40 | #include <asm/sn/sn0/sn0_fru.h> | 40 | #include <asm/sn/fru.h> |
41 | //#include <sys/graph.h> | 41 | //#include <sys/graph.h> |
42 | //#include <sys/xtalk/xbow.h> | 42 | //#include <sys/xtalk/xbow.h> |
43 | 43 | ||
@@ -54,32 +54,21 @@ | |||
54 | #include <asm/sn/agent.h> | 54 | #include <asm/sn/agent.h> |
55 | #include <asm/arc/types.h> | 55 | #include <asm/arc/types.h> |
56 | #include <asm/arc/hinv.h> | 56 | #include <asm/arc/hinv.h> |
57 | #if defined(CONFIG_SGI_IO) || defined(CONFIG_SGI_IP35) | 57 | #if defined(CONFIG_SGI_IP35) |
58 | // The hack file has to be before vector and after sn0_fru.... | 58 | // The hack file has to be before vector and after sn0_fru.... |
59 | #include <asm/hack.h> | 59 | #include <asm/hack.h> |
60 | #include <asm/sn/vector.h> | 60 | #include <asm/sn/vector.h> |
61 | #include <asm/xtalk/xtalk.h> | 61 | #include <asm/xtalk/xtalk.h> |
62 | #endif /* CONFIG_SGI_IO || CONFIG_SGI_IP35 */ | 62 | #endif /* CONFIG_SGI_IP35 */ |
63 | #endif /* CONFIG_SGI_IP27 || CONFIG_SGI_IP35 */ | 63 | #endif /* CONFIG_SGI_IP27 || CONFIG_SGI_IP35 */ |
64 | 64 | ||
65 | #define KLCFGINFO_MAGIC 0xbeedbabe | 65 | #define KLCFGINFO_MAGIC 0xbeedbabe |
66 | 66 | ||
67 | #ifdef FRUTEST | ||
68 | typedef u64 klconf_off_t; | ||
69 | #else | ||
70 | typedef s32 klconf_off_t; | 67 | typedef s32 klconf_off_t; |
71 | #endif | ||
72 | 68 | ||
73 | /* | 69 | /* |
74 | * Some IMPORTANT OFFSETS. These are the offsets on all NODES. | 70 | * Some IMPORTANT OFFSETS. These are the offsets on all NODES. |
75 | */ | 71 | */ |
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 | 72 | #define MAX_MODULE_ID 255 |
84 | #define SIZE_PAD 4096 /* 4k padding for structures */ | 73 | #define SIZE_PAD 4096 /* 4k padding for structures */ |
85 | /* | 74 | /* |
@@ -134,15 +123,9 @@ typedef s32 klconf_off_t; | |||
134 | 123 | ||
135 | 124 | ||
136 | typedef struct console_s { | 125 | 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; | 126 | unsigned long uart_base; |
143 | unsigned long config_base; | 127 | unsigned long config_base; |
144 | unsigned long memory_base; | 128 | unsigned long memory_base; |
145 | #endif | ||
146 | short baud; | 129 | short baud; |
147 | short flag; | 130 | short flag; |
148 | int type; | 131 | int type; |
@@ -174,10 +157,6 @@ typedef struct kl_config_hdr { | |||
174 | 157 | ||
175 | 158 | ||
176 | #define KL_CONFIG_HDR(_nasid) ((kl_config_hdr_t *)(KLCONFIG_ADDR(_nasid))) | 159 | #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) \ | 160 | #define KL_CONFIG_INFO_OFFSET(_nasid) \ |
182 | (KL_CONFIG_HDR(_nasid)->ch_board_info) | 161 | (KL_CONFIG_HDR(_nasid)->ch_board_info) |
183 | #define KL_CONFIG_INFO_SET_OFFSET(_nasid, _off) \ | 162 | #define KL_CONFIG_INFO_SET_OFFSET(_nasid, _off) \ |
@@ -197,23 +176,13 @@ typedef struct kl_config_hdr { | |||
197 | 176 | ||
198 | /* --- New Macros for the changed kl_config_hdr_t structure --- */ | 177 | /* --- New Macros for the changed kl_config_hdr_t structure --- */ |
199 | 178 | ||
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 *)\ | 179 | #define PTR_CH_MALLOC_HDR(_k) ((klc_malloc_hdr_t *)\ |
205 | (unsigned long)_k + (_k->ch_malloc_hdr_off))) | 180 | (unsigned long)_k + (_k->ch_malloc_hdr_off))) |
206 | #endif | ||
207 | 181 | ||
208 | #define KL_CONFIG_CH_MALLOC_HDR(_n) PTR_CH_MALLOC_HDR(KL_CONFIG_HDR(_n)) | 182 | #define KL_CONFIG_CH_MALLOC_HDR(_n) PTR_CH_MALLOC_HDR(KL_CONFIG_HDR(_n)) |
209 | 183 | ||
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 *)\ | 184 | #define PTR_CH_CONS_INFO(_k) ((console_t *)\ |
215 | ((unsigned long)_k + (_k->ch_cons_off))) | 185 | ((unsigned long)_k + (_k->ch_cons_off))) |
216 | #endif | ||
217 | 186 | ||
218 | #define KL_CONFIG_CH_CONS_INFO(_n) PTR_CH_CONS_INFO(KL_CONFIG_HDR(_n)) | 187 | #define KL_CONFIG_CH_CONS_INFO(_n) PTR_CH_CONS_INFO(KL_CONFIG_HDR(_n)) |
219 | 188 | ||
@@ -490,14 +459,6 @@ typedef struct lboard_s { | |||
490 | #define KLCF_NUM_COMPS(_brd) ((_brd)->brd_numcompts) | 459 | #define KLCF_NUM_COMPS(_brd) ((_brd)->brd_numcompts) |
491 | #define KLCF_MODULE_ID(_brd) ((_brd)->brd_module) | 460 | #define KLCF_MODULE_ID(_brd) ((_brd)->brd_module) |
492 | 461 | ||
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) \ | 462 | #define KLCF_NEXT(_brd) \ |
502 | ((_brd)->brd_next ? \ | 463 | ((_brd)->brd_next ? \ |
503 | (lboard_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), (_brd)->brd_next)):\ | 464 | (lboard_t *)(NODE_OFFSET_TO_K1(NASID_GET(_brd), (_brd)->brd_next)):\ |
@@ -509,8 +470,6 @@ typedef struct lboard_s { | |||
509 | #define KLCF_COMP_ERROR(_brd, _comp) \ | 470 | #define KLCF_COMP_ERROR(_brd, _comp) \ |
510 | (NODE_OFFSET_TO_K1(NASID_GET(_brd), (_comp)->errinfo)) | 471 | (NODE_OFFSET_TO_K1(NASID_GET(_brd), (_comp)->errinfo)) |
511 | 472 | ||
512 | #endif | ||
513 | |||
514 | #define KLCF_COMP_TYPE(_comp) ((_comp)->struct_type) | 473 | #define KLCF_COMP_TYPE(_comp) ((_comp)->struct_type) |
515 | #define KLCF_BRIDGE_W_ID(_comp) ((_comp)->physid) /* Widget ID */ | 474 | #define KLCF_BRIDGE_W_ID(_comp) ((_comp)->physid) /* Widget ID */ |
516 | 475 | ||
@@ -631,18 +590,6 @@ typedef struct klport_s { | |||
631 | klconf_off_t port_offset; | 590 | klconf_off_t port_offset; |
632 | } klport_t; | 591 | } klport_t; |
633 | 592 | ||
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 */ | 593 | typedef struct klcpu_s { /* CPU */ |
647 | klinfo_t cpu_info; | 594 | klinfo_t cpu_info; |
648 | unsigned short cpu_prid; /* Processor PRID value */ | 595 | unsigned short cpu_prid; /* Processor PRID value */ |
@@ -945,36 +892,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); | 892 | extern lboard_t *find_lboard_class(lboard_t *start, unsigned char brd_class); |
946 | 893 | ||
947 | 894 | ||
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); | 895 | extern klcpu_t *sn_get_cpuinfo(cpuid_t cpu); |
978 | #endif /* CONFIG_SGI_IO */ | ||
979 | 896 | ||
980 | #endif /* _ASM_SN_KLCONFIG_H */ | 897 | #endif /* _ASM_SN_KLCONFIG_H */ |