]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 3121/1: unconditionally use XCB=101 on ixp2000
authorLennert Buytenhek <buytenh@wantstofly.org>
Mon, 7 Nov 2005 21:12:09 +0000 (21:12 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 7 Nov 2005 21:12:09 +0000 (21:12 +0000)
Patch from Lennert Buytenhek

Since we have to use XCB=101 instead of XCB=000 on the ixp2400 to
prevent it from regularly falling over, and since we have to deal with
manual write buffer flushing because of that, we might as well use
XCB=101 on all ixp2000 platforms since it's faster than XCB=000.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-ixp2000/core.c

index df140962bb0fca0ae4f521f455a98bad10ce7e8c..6851abaf5524f6a4b1273339f3c4fb577f59fa2a 100644 (file)
@@ -84,63 +84,54 @@ static struct map_desc ixp2000_io_desc[] __initdata = {
                .virtual        = IXP2000_CAP_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_CAP_PHYS_BASE),
                .length         = IXP2000_CAP_SIZE,
-               .type           = MT_DEVICE
+               .type           = MT_IXP2000_DEVICE,
        }, {
                .virtual        = IXP2000_INTCTL_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_INTCTL_PHYS_BASE),
                .length         = IXP2000_INTCTL_SIZE,
-               .type           = MT_DEVICE
+               .type           = MT_IXP2000_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_CREG_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_CREG_PHYS_BASE),
                .length         = IXP2000_PCI_CREG_SIZE,
-               .type           = MT_DEVICE
+               .type           = MT_IXP2000_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_CSR_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_CSR_PHYS_BASE),
                .length         = IXP2000_PCI_CSR_SIZE,
-               .type           = MT_DEVICE
+               .type           = MT_IXP2000_DEVICE,
        }, {
                .virtual        = IXP2000_MSF_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_MSF_PHYS_BASE),
                .length         = IXP2000_MSF_SIZE,
-               .type           = MT_DEVICE
+               .type           = MT_IXP2000_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_IO_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_IO_PHYS_BASE),
                .length         = IXP2000_PCI_IO_SIZE,
-               .type           = MT_DEVICE
+               .type           = MT_IXP2000_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_CFG0_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_CFG0_PHYS_BASE),
                .length         = IXP2000_PCI_CFG0_SIZE,
-               .type           = MT_DEVICE
+               .type           = MT_IXP2000_DEVICE,
        }, {
                .virtual        = IXP2000_PCI_CFG1_VIRT_BASE,
                .pfn            = __phys_to_pfn(IXP2000_PCI_CFG1_PHYS_BASE),
                .length         = IXP2000_PCI_CFG1_SIZE,
-               .type           = MT_DEVICE
+               .type           = MT_IXP2000_DEVICE,
        }
 };
 
 void __init ixp2000_map_io(void)
 {
-       extern unsigned int processor_id;
-
        /*
-        * On IXP2400 CPUs we need to use MT_IXP2000_DEVICE for
-        * tweaking the PMDs so XCB=101. On IXP2800s we use the normal
-        * PMD flags.
+        * On IXP2400 CPUs we need to use MT_IXP2000_DEVICE so that
+        * XCB=101 (to avoid triggering erratum #66), and given that
+        * this mode speeds up I/O accesses and we have write buffer
+        * flushes in the right places anyway, it doesn't hurt to use
+        * XCB=101 for all IXP2000s.
         */
-       if ((processor_id & 0xfffffff0) == 0x69054190) {
-               int i;
-
-               printk(KERN_INFO "Enabling IXP2400 erratum #66 workaround\n");
-
-               for(i=0;i<ARRAY_SIZE(ixp2000_io_desc);i++)
-                       ixp2000_io_desc[i].type = MT_IXP2000_DEVICE;
-       }
-
        iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc));
 
        /* Set slowport to 8-bit mode.  */