2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
9 #include <linux/config.h>
10 #include <linux/types.h>
11 #include <asm/sn/sgi.h>
13 #include <asm/sn/hcl.h>
14 #include <asm/sn/pci/pic.h>
15 #include "asm/sn/ioerror_handling.h"
16 #include <asm/sn/xtalk/xbow.h>
18 /* these get called directly in cdl_add_connpt in fops bypass hack */
19 extern int xbow_attach(vertex_hdl_t);
20 extern int pic_attach(vertex_hdl_t);
23 * cdl: Connection and Driver List
25 * We are not porting this to Linux. Devices are registered via
26 * the normal Linux PCI layer. This is a very simplified version
27 * of cdl that will allow us to register and call our very own
28 * IO Infrastructure Drivers e.g. pcibr.
31 #define MAX_SGI_IO_INFRA_DRVR 5
33 static struct cdl sgi_infrastructure_drivers[MAX_SGI_IO_INFRA_DRVR] =
35 { PIC_WIDGET_PART_NUM_BUS0, PIC_WIDGET_MFGR_NUM, pic_attach /* &pcibr_fops */},
36 { PIC_WIDGET_PART_NUM_BUS1, PIC_WIDGET_MFGR_NUM, pic_attach /* &pcibr_fops */},
37 { XXBOW_WIDGET_PART_NUM, XXBOW_WIDGET_MFGR_NUM, xbow_attach /* &xbow_fops */},
38 { XBOW_WIDGET_PART_NUM, XBOW_WIDGET_MFGR_NUM, xbow_attach /* &xbow_fops */},
39 { PXBOW_WIDGET_PART_NUM, XXBOW_WIDGET_MFGR_NUM, xbow_attach /* &xbow_fops */},
43 * cdl_add_connpt: We found a device and it's connect point. Call the
44 * attach routine of that driver.
46 * May need support for pciba registration here ...
48 * This routine use to create /hw/.id/pci/.../.. that links to
49 * /hw/module/006c06/Pbrick/xtalk/15/pci/<slotnum> .. do we still need
50 * it? The specified driver attach routine does not reference these
54 cdl_add_connpt(int part_num, int mfg_num,
55 vertex_hdl_t connpt, int drv_flags)
60 * Find the driver entry point and call the attach routine.
62 for (i = 0; i < MAX_SGI_IO_INFRA_DRVR; i++) {
63 if ( (part_num == sgi_infrastructure_drivers[i].part_num) &&
64 ( mfg_num == sgi_infrastructure_drivers[i].mfg_num) ) {
66 * Call the device attach routines.
68 if (sgi_infrastructure_drivers[i].attach) {
69 return(sgi_infrastructure_drivers[i].attach(connpt));
76 /* printk("WARNING: cdl_add_connpt: Driver not found for part_num 0x%x mfg_num 0x%x\n", part_num, mfg_num); */