From f34ef001210ae1240c04cad41e3db383ff997782 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 11 Jul 2007 13:22:41 -0500 Subject: [PATCH] --- yaml --- r: 62849 b: refs/heads/master c: 62c66c8e55fae40d93d8f79d60e2ed50379e46f9 h: refs/heads/master i: 62847: 738901c8a243baa31fc11122b28921c467805568 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/sysdev/indirect_pci.c | 16 +++++++++++++++- trunk/include/asm-powerpc/pci-bridge.h | 5 +++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 2ff984b4bc3e..ddeea5e62120 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 38805e5f096162867a70c7468c654d7f9bb507da +refs/heads/master: 62c66c8e55fae40d93d8f79d60e2ed50379e46f9 diff --git a/trunk/arch/powerpc/sysdev/indirect_pci.c b/trunk/arch/powerpc/sysdev/indirect_pci.c index c7e6e859b393..bc5b4e22fa5d 100644 --- a/trunk/arch/powerpc/sysdev/indirect_pci.c +++ b/trunk/arch/powerpc/sysdev/indirect_pci.c @@ -35,10 +35,17 @@ indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset, u8 cfg_type = 0; u32 bus_no, reg; + if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) { + if (bus->number != hose->first_busno) + return PCIBIOS_DEVICE_NOT_FOUND; + if (devfn != 0) + return PCIBIOS_DEVICE_NOT_FOUND; + } + if (ppc_md.pci_exclude_device) if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) return PCIBIOS_DEVICE_NOT_FOUND; - + if (hose->indirect_type & PPC_INDIRECT_TYPE_SET_CFG_TYPE) if (bus->number != hose->first_busno) cfg_type = 1; @@ -83,6 +90,13 @@ indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset, u8 cfg_type = 0; u32 bus_no, reg; + if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) { + if (bus->number != hose->first_busno) + return PCIBIOS_DEVICE_NOT_FOUND; + if (devfn != 0) + return PCIBIOS_DEVICE_NOT_FOUND; + } + if (ppc_md.pci_exclude_device) if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) return PCIBIOS_DEVICE_NOT_FOUND; diff --git a/trunk/include/asm-powerpc/pci-bridge.h b/trunk/include/asm-powerpc/pci-bridge.h index 7a00b8e388ec..975435743031 100644 --- a/trunk/include/asm-powerpc/pci-bridge.h +++ b/trunk/include/asm-powerpc/pci-bridge.h @@ -45,10 +45,15 @@ struct pci_controller { * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS * to determine which bus number to match on when generating type0 * config cycles + * NO_PCIE_LINK - the Freescale PCI-e controllers have issues with + * hanging if we don't have link and try to do config cycles to + * anything but the PHB. Only allow talking to the PHB if this is + * set. */ #define PPC_INDIRECT_TYPE_SET_CFG_TYPE (0x00000001) #define PPC_INDIRECT_TYPE_EXT_REG (0x00000002) #define PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS (0x00000004) +#define PPC_INDIRECT_TYPE_NO_PCIE_LINK (0x00000008) u32 indirect_type; /* Currently, we limit ourselves to 1 IO range and 3 mem