From: SangeethaRao <sangeetha....@lsi.com> Signed-off-by: SangeethaRao <sangeetha....@lsi.com> --- arch/powerpc/sysdev/lsi_pci.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/sysdev/lsi_pci.c b/arch/powerpc/sysdev/lsi_pci.c index a25d396..75bdf53 100644 --- a/arch/powerpc/sysdev/lsi_pci.c +++ b/arch/powerpc/sysdev/lsi_pci.c @@ -20,6 +20,7 @@ #include <mm/mmu_decl.h> #include "ppc4xx_pci.h" +#include "../../../drivers/misc/lsi-ncr.h" #include <linux/interrupt.h> @@ -70,6 +71,7 @@ fixup_acp_pci_bridge(struct pci_dev *dev) DECLARE_PCI_FIXUP_HEADER(0x1000, 0x5101, fixup_acp_pci_bridge); DECLARE_PCI_FIXUP_HEADER(0x1000, 0x5108, fixup_acp_pci_bridge); +DECLARE_PCI_FIXUP_HEADER(0x1000, 0x5102, fixup_acp_pci_bridge); static int __init acp_parse_dma_ranges(struct pci_controller *hose, void __iomem *reg, @@ -954,6 +956,7 @@ acp_pciex_port_setup_hose(struct pciex_port *port) u32 pci_status; u32 link_state; u32 pci_config; + u32 version; /* Check if primary bridge */ if (of_get_property(port->node, "primary", NULL)) @@ -1060,6 +1063,17 @@ acp_pciex_port_setup_hose(struct pciex_port *port) } } + /* get the device version */ + if (0 != ncr_read(NCP_REGION_ID(0x16, 0xff), 0x0, 4, &version)) { + printk(KERN_ERR "Unable to detect ACP revision!\n"); + goto fail; + } + + port->acpChipType = (version & 0xff); + printk(KERN_INFO "Using PEI register set for ACP chipType %d\n", + port->acpChipType); + + /* * Set bus numbers on our root port */ @@ -1171,11 +1185,6 @@ static void __init probe_acp_pciex_bridge(struct device_node *np) return; } - - port->acpChipType = 0x2; - printk(KERN_INFO "Using PEI register set for ACP chipType %d\n", - port->acpChipType); - /* Check for the PLX work-around. */ field = of_get_property(np, "plx", NULL); -- 1.7.9.5 -- _______________________________________________ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto