Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  *
0006  * Copyright (C) 2003 Christoph Hellwig (hch@lst.de)
0007  * Copyright (C) 1999, 2000, 04 Ralf Baechle (ralf@linux-mips.org)
0008  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
0009  */
0010 #include <asm/sn/addrs.h>
0011 #include <asm/sn/types.h>
0012 #include <asm/sn/klconfig.h>
0013 #include <asm/sn/agent.h>
0014 #include <asm/sn/ioc3.h>
0015 #include <asm/pci/bridge.h>
0016 
0017 #ifdef CONFIG_NUMA
0018 int pcibus_to_node(struct pci_bus *bus)
0019 {
0020     struct bridge_controller *bc = BRIDGE_CONTROLLER(bus);
0021 
0022     return bc->nasid;
0023 }
0024 EXPORT_SYMBOL(pcibus_to_node);
0025 #endif /* CONFIG_NUMA */
0026 
0027 static void ip29_fixup_phy(struct pci_dev *dev)
0028 {
0029     int nasid = pcibus_to_node(dev->bus);
0030     u32 sid;
0031 
0032     if (nasid != 1)
0033         return; /* only needed on second module */
0034 
0035     /* enable ethernet PHY on IP29 systemboard */
0036     pci_read_config_dword(dev, PCI_SUBSYSTEM_VENDOR_ID, &sid);
0037     if (sid == (PCI_VENDOR_ID_SGI | (IOC3_SUBSYS_IP29_SYSBOARD) << 16))
0038         REMOTE_HUB_S(nasid, MD_LED0, 0x09);
0039 }
0040 
0041 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC3,
0042             ip29_fixup_phy);