RE: [PATCH 2/9] powerpc/mpc85xxcds: Fix PCI I/O space resource of PCI bridge
flat view
From: Zhao Chenhui-B35336 <hidden>
Date: 2012-03-07 09:32:09
quoted
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/p=
latforms/85xx/mpc85xx_cds.c
quoted
index 40f03da..c009c5b 100644--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c@@ -3,7 +3,7 @@ * * Maintained by Kumar Gala (see MAINTAINERS for contact information) * - * Copyright 2005 Freescale Semiconductor Inc. + * Copyright 2005, 2011-2012 Freescale Semiconductor Inc. * * This program is free software; you can redistribute it and/or modif=
y it
quoted
* under the terms of the GNU General Public License as published by=
the
quoted
@@ -158,6 +158,31 @@ DECLARE_PCI_FIXUP_EARLY(0x1957, 0x3fff, skip_fake_=
bridge);
quoted
DECLARE_PCI_FIXUP_EARLY(0x3fff, 0x1957, skip_fake_bridge); DECLARE_PCI_FIXUP_EARLY(0xff3f, 0x5719, skip_fake_bridge); +/* + * Fix Tsi310 PCI-X bridge resource. + * Force the bridge to open a window from 0x0000-0x1fff in PCI I/O spa=
ce.
quoted
+ * This allows legacy I/O(i8259, etc) on the VIA southbridge to be acc=
essed.
quoted
+ */=20 This comment and the code don't make sense. Why is the bridge described =
as Tsi310 in comments but the
vendor ID is IBM ?
This chip is from IBM originally, and bought by IDT. The vendor ID is IBM, but the part number is Tsi310(IDT). -Chenhui
=20quoted
+void mpc85xx_cds_fixup_bus(struct pci_bus *bus) +{ + struct pci_dev *dev =3D bus->self; + struct resource *res =3D bus->resource[0]; + + if (dev !=3D NULL && + dev->vendor =3D=3D PCI_VENDOR_ID_IBM && + dev->device =3D=3D PCI_DEVICE_ID_IBM_PCIX_BRIDGE) { + if (res) { + res->start =3D 0; + res->end =3D 0x1fff; + res->flags =3D IORESOURCE_IO; + pr_info("mpc85xx_cds: PCI bridge resource fixup applied\n"); + pr_info("mpc85xx_cds: %pR\n", res); + } + } + + fsl_pcibios_fixup_bus(bus); +}