The patch intends to detect the PHB3 chip revision that was exported by the underly firmware. In turn, we can have different AER configuration for switch ports and endpoints accordingly.
Signed-off-by: Gavin Shan <sha...@linux.vnet.ibm.com> --- arch/powerpc/platforms/powernv/pci-ioda.c | 5 +++++ arch/powerpc/platforms/powernv/pci.h | 1 + 2 files changed, 6 insertions(+) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 2c6d173..aea45fa 100644 --- a/arch/powerpc/platforms/powernv/pci-ioda.c +++ b/arch/powerpc/platforms/powernv/pci-ioda.c @@ -1201,6 +1201,11 @@ void __init pnv_pci_init_ioda_phb(struct device_node *np, else phb->model = PNV_PHB_MODEL_UNKNOWN; + /* Detect chip revision */ + prop32 = of_get_property(np, "ibm,revision", NULL); + if (prop32) + phb->rev = be32_to_cpup(prop32); + /* Parse 32-bit and IO ranges (if any) */ pci_process_bridge_OF_ranges(hose, np, !hose->global_number); diff --git a/arch/powerpc/platforms/powernv/pci.h b/arch/powerpc/platforms/powernv/pci.h index 911c24e..c5a0810 100644 --- a/arch/powerpc/platforms/powernv/pci.h +++ b/arch/powerpc/platforms/powernv/pci.h @@ -89,6 +89,7 @@ struct pnv_phb { struct pci_controller *hose; enum pnv_phb_type type; enum pnv_phb_model model; + u32 rev; u64 hub_id; u64 opal_id; void __iomem *regs; -- 1.7.10.4 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev