summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom_parse.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2006-11-27 21:21:29 -0600
committerPaul Mackerras <paulus@samba.org>2006-12-04 20:41:49 +1100
commit4468f01dc7cfd1998845cd66a0cdb1f3ef9740f0 (patch)
treef931cb8cfc84b894063e4bc604efa1eacc1b79ee /arch/powerpc/kernel/prom_parse.c
parentede8edb35b95c78c890b15fdb6cedcb3f42f4769 (diff)
downloadop-kernel-dev-4468f01dc7cfd1998845cd66a0cdb1f3ef9740f0.zip
op-kernel-dev-4468f01dc7cfd1998845cd66a0cdb1f3ef9740f0.tar.gz
[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 <olof@lixom.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/prom_parse.c')
-rw-r--r--arch/powerpc/kernel/prom_parse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index 346fb7b..0dfbe1c 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;
OpenPOWER on IntegriCloud