From: Olof Johansson Date: Tue, 28 Nov 2006 03:21:29 +0000 (-0600) Subject: [POWERPC] Fix OF pci flags parsing X-Git-Tag: v2.6.20-rc2~6^2~13^2~13^2~18 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4468f01dc7cfd1998845cd66a0cdb1f3ef9740f0;p=linux-2.6-omap-h63xx.git [POWERPC] Fix OF pci flags parsing For PCI devices with only io ports, of_bus_pci_get_flags() will fall through and still mark the resource as IORESOURCE_MEM. Signed-off-by: Olof Johansson Acked-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index 346fb7bf9a0..0dfbe1cd28e 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c @@ -160,9 +160,11 @@ static unsigned int of_bus_pci_get_flags(const u32 *addr) switch((w >> 24) & 0x03) { case 0x01: flags |= IORESOURCE_IO; + break; case 0x02: /* 32 bits */ case 0x03: /* 64 bits */ flags |= IORESOURCE_MEM; + break; } if (w & 0x40000000) flags |= IORESOURCE_PREFETCH;