]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 3062/1: map in various enp2611 peripherals for the ixp2000 netdev driver
authorLennert Buytenhek <buytenh@wantstofly.org>
Tue, 1 Nov 2005 19:44:24 +0000 (19:44 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 1 Nov 2005 19:44:24 +0000 (19:44 +0000)
Patch from Lennert Buytenhek

The enp2611 version of the ixp2000 netdev driver needs to be able to
access a number of on-board peripherals.  ioremap() is not suitable
for this, as that will cause XCB=000 mappings to be done, which will
make the cpu susceptible to crashing on ixp2400 erratum #66.  Properly
aligned iotable mappings with MT_IXP2000_DEVICE will cause section
mappings with XCB=101 to be done, which is safe.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-ixp2000/enp2611.c
include/asm-arm/arch-ixp2000/enp2611.h

index 9aa54de447407d615211860f693fe6a6879f2f28..b91fe7c80fac692a1ad0fff9855404f387796afe 100644 (file)
@@ -63,6 +63,35 @@ static struct sys_timer enp2611_timer = {
 };
 
 
+/*************************************************************************
+ * ENP-2611 I/O
+ *************************************************************************/
+static struct map_desc enp2611_io_desc[] __initdata = {
+       {
+               .virtual        = ENP2611_CALEB_VIRT_BASE,
+               .physical       = ENP2611_CALEB_PHYS_BASE,
+               .length         = ENP2611_CALEB_SIZE,
+               .type           = MT_IXP2000_DEVICE
+       }, {
+               .virtual        = ENP2611_PM3386_0_VIRT_BASE,
+               .physical       = ENP2611_PM3386_0_PHYS_BASE,
+               .length         = ENP2611_PM3386_0_SIZE,
+               .type           = MT_IXP2000_DEVICE
+       }, {
+               .virtual        = ENP2611_PM3386_1_VIRT_BASE,
+               .physical       = ENP2611_PM3386_1_PHYS_BASE,
+               .length         = ENP2611_PM3386_1_SIZE,
+               .type           = MT_IXP2000_DEVICE
+       }
+};
+
+void __init enp2611_map_io(void)
+{
+       ixp2000_map_io();
+       iotable_init(enp2611_io_desc, ARRAY_SIZE(enp2611_io_desc));
+}
+
+
 /*************************************************************************
  * ENP-2611 PCI
  *************************************************************************/
@@ -229,7 +258,7 @@ MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board")
        .phys_io        = IXP2000_UART_PHYS_BASE,
        .io_pg_offst    = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc,
        .boot_params    = 0x00000100,
-       .map_io         = ixp2000_map_io,
+       .map_io         = enp2611_map_io,
        .init_irq       = ixp2000_init_irq,
        .timer          = &enp2611_timer,
        .init_machine   = enp2611_init_machine,
index 31ae886749688bed4bb4dd29c6fc640172404735..95128d9f5026707338946d134126c51333b47dab 100644 (file)
 #ifndef __ENP2611_H
 #define __ENP2611_H
 
-#define ENP2611_GPIO_SCL       0x07
-#define ENP2611_GPIO_SDA       0x06
+#define ENP2611_CALEB_PHYS_BASE                0xc5000000
+#define ENP2611_CALEB_VIRT_BASE                0xfe000000
+#define ENP2611_CALEB_SIZE             0x00100000
+
+#define ENP2611_PM3386_0_PHYS_BASE     0xc6000000
+#define ENP2611_PM3386_0_VIRT_BASE     0xfe100000
+#define ENP2611_PM3386_0_SIZE          0x00100000
+
+#define ENP2611_PM3386_1_PHYS_BASE     0xc6400000
+#define ENP2611_PM3386_1_VIRT_BASE     0xfe200000
+#define ENP2611_PM3386_1_SIZE          0x00100000
+
+#define ENP2611_GPIO_SCL               7
+#define ENP2611_GPIO_SDA               6
 
 
 #endif