From 22007a165d2da38686d528f3af5c5d8b6713728c Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Mon, 13 Oct 2008 20:14:09 +0000 Subject: powerpc/chrp: Fix detection of Python PCI host bridge on IBM CHRPs The detection of the IBM "Python" PCI host bridge on IBM CHRP machines such as old RS6000 was broken when we changed of_device_is_compatible() from strncasecmp to strcasecmp (dropped the "n" variant) due to the way IBM encodes the chip version. We fix that by instead doing a match on the model property like we do for others bridges in that file. It should be good enough for those machines. If yours is still broken, let me know. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/chrp/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/platforms/chrp/pci.c') diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 768c262b936..68e49b24df9 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c @@ -266,7 +266,7 @@ chrp_find_bridges(void) model = of_get_property(dev, "model", NULL); if (model == NULL) model = ""; - if (of_device_is_compatible(dev, "IBM,python")) { + if (strncmp(model, "IBM, Python", 11) == 0) { setup_python(hose, dev); } else if (is_mot || strncmp(model, "Motorola, Grackle", 17) == 0) { -- cgit v1.2.3 From ee673eaa72d8d185012b1027a05e25aba18c267f Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Mon, 13 Oct 2008 20:49:47 +0000 Subject: powerpc: Fix CHRP PCI config access for indirect_pci Recently, indirect_pci was changed to test if the bus number requested is the one hanging straight off the PHB, then it substitutes the bus number with another one contained in a new "self_busno" field of the pci_controller structure. However, this breaks CHRP which didn't initialize this new field, and which relies on having the right bus number passed to the hardware. This fixes it by initializing this variable properly for all CHRP bridges Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/platforms/chrp/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/platforms/chrp/pci.c') diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 68e49b24df9..d3cde6b9d2d 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c @@ -260,7 +260,7 @@ chrp_find_bridges(void) dev->full_name); continue; } - hose->first_busno = bus_range[0]; + hose->first_busno = hose->self_busno = bus_range[0]; hose->last_busno = bus_range[1]; model = of_get_property(dev, "model", NULL); -- cgit v1.2.3