0001
0002
0003
0004
0005
0006
0007
0008
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
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;
0034
0035
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);