]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] Fix OF pci flags parsing
authorOlof Johansson <olof@lixom.net>
Tue, 28 Nov 2006 03:21:29 +0000 (21:21 -0600)
committerPaul Mackerras <paulus@samba.org>
Mon, 4 Dec 2006 09:41:49 +0000 (20:41 +1100)
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>
arch/powerpc/kernel/prom_parse.c

index 346fb7bf9a05ec62ff93f606b8deb408b35c38cf..0dfbe1cd28eb2644cd59927eae4938fa8fdf088a 100644 (file)
@@ -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;