diff options
-rw-r--r-- | arch/powerpc/sysdev/indirect_pci.c | 16 | ||||
-rw-r--r-- | include/asm-powerpc/pci-bridge.h | 5 |
2 files changed, 20 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c index c7e6e859b393..bc5b4e22fa5d 100644 --- a/arch/powerpc/sysdev/indirect_pci.c +++ b/arch/powerpc/sysdev/indirect_pci.c | |||
@@ -35,10 +35,17 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
35 | u8 cfg_type = 0; | 35 | u8 cfg_type = 0; |
36 | u32 bus_no, reg; | 36 | u32 bus_no, reg; |
37 | 37 | ||
38 | if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) { | ||
39 | if (bus->number != hose->first_busno) | ||
40 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
41 | if (devfn != 0) | ||
42 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
43 | } | ||
44 | |||
38 | if (ppc_md.pci_exclude_device) | 45 | if (ppc_md.pci_exclude_device) |
39 | if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) | 46 | if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) |
40 | return PCIBIOS_DEVICE_NOT_FOUND; | 47 | return PCIBIOS_DEVICE_NOT_FOUND; |
41 | 48 | ||
42 | if (hose->indirect_type & PPC_INDIRECT_TYPE_SET_CFG_TYPE) | 49 | if (hose->indirect_type & PPC_INDIRECT_TYPE_SET_CFG_TYPE) |
43 | if (bus->number != hose->first_busno) | 50 | if (bus->number != hose->first_busno) |
44 | cfg_type = 1; | 51 | cfg_type = 1; |
@@ -83,6 +90,13 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
83 | u8 cfg_type = 0; | 90 | u8 cfg_type = 0; |
84 | u32 bus_no, reg; | 91 | u32 bus_no, reg; |
85 | 92 | ||
93 | if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) { | ||
94 | if (bus->number != hose->first_busno) | ||
95 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
96 | if (devfn != 0) | ||
97 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
98 | } | ||
99 | |||
86 | if (ppc_md.pci_exclude_device) | 100 | if (ppc_md.pci_exclude_device) |
87 | if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) | 101 | if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) |
88 | return PCIBIOS_DEVICE_NOT_FOUND; | 102 | return PCIBIOS_DEVICE_NOT_FOUND; |
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index 7a00b8e388ec..975435743031 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h | |||
@@ -45,10 +45,15 @@ struct pci_controller { | |||
45 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS | 45 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS |
46 | * to determine which bus number to match on when generating type0 | 46 | * to determine which bus number to match on when generating type0 |
47 | * config cycles | 47 | * config cycles |
48 | * NO_PCIE_LINK - the Freescale PCI-e controllers have issues with | ||
49 | * hanging if we don't have link and try to do config cycles to | ||
50 | * anything but the PHB. Only allow talking to the PHB if this is | ||
51 | * set. | ||
48 | */ | 52 | */ |
49 | #define PPC_INDIRECT_TYPE_SET_CFG_TYPE (0x00000001) | 53 | #define PPC_INDIRECT_TYPE_SET_CFG_TYPE (0x00000001) |
50 | #define PPC_INDIRECT_TYPE_EXT_REG (0x00000002) | 54 | #define PPC_INDIRECT_TYPE_EXT_REG (0x00000002) |
51 | #define PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS (0x00000004) | 55 | #define PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS (0x00000004) |
56 | #define PPC_INDIRECT_TYPE_NO_PCIE_LINK (0x00000008) | ||
52 | u32 indirect_type; | 57 | u32 indirect_type; |
53 | 58 | ||
54 | /* Currently, we limit ourselves to 1 IO range and 3 mem | 59 | /* Currently, we limit ourselves to 1 IO range and 3 mem |