3 * This file is subject to the terms and conditions of the GNU General Public
4 * License. See the file "COPYING" in the main directory of this archive
7 * Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
10 #include <linux/types.h>
11 #include <linux/config.h>
12 #include <linux/slab.h>
13 #include <asm/sn/sgi.h>
14 #include <asm/sn/io.h>
15 #include <asm/sn/sn_cpuid.h>
16 #include <asm/sn/klconfig.h>
17 #include <asm/sn/sn_private.h>
18 #include <linux/smp.h>
19 #include <asm/sn/simulator.h>
21 extern void init_all_devices(void);
22 extern void klhwg_add_all_modules(vertex_hdl_t
);
23 extern void klhwg_add_all_nodes(vertex_hdl_t
);
25 extern vertex_hdl_t hwgraph_root
;
26 extern void io_module_init(void);
27 extern int pci_bus_to_hcl_cvlink(void);
28 extern void mlreset(void);
30 /* #define DEBUG_IO_INIT 1 */
32 #define DBG(x...) printk(x)
35 #endif /* DEBUG_IO_INIT */
38 * This routine is responsible for the setup of all the IRIX hwgraph style
39 * stuff that's been pulled into linux. It's called by sn_pci_find_bios which
40 * is called just before the generic Linux PCI layer does its probing (by
41 * platform_pci_fixup aka sn_pci_fixup).
43 * It is very IMPORTANT that this call is only made by the Master CPU!
53 * This is the Master CPU. Emulate mlsetup and main.c in Irix.
58 * Initialize platform-dependent vertices in the hwgraph:
69 io_module_init(); /* Use to be called module_init() .. */
70 klhwg_add_all_modules(hwgraph_root
);
71 klhwg_add_all_nodes(hwgraph_root
);
73 for (cnode
= 0; cnode
< numnodes
; cnode
++) {
74 extern void per_hub_init(cnodeid_t
);
78 /* We can do headless hub cnodes here .. */
82 * Our IO Infrastructure drivers are in place ..
83 * Initialize the whole IO Infrastructure .. xwidget/device probes.
87 pci_bus_to_hcl_cvlink();