Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6.git] / arch / arm / mach-realview / realview_pb11mp.c
index 3ebdb2d..fdd042b 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/platform_device.h>
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
+#include <linux/amba/pl061.h>
 #include <linux/io.h>
 
 #include <mach/hardware.h>
@@ -32,6 +33,7 @@
 #include <asm/hardware/gic.h>
 #include <asm/hardware/icst307.h>
 #include <asm/hardware/cache-l2x0.h>
+#include <asm/localtimer.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
@@ -107,6 +109,21 @@ static void __init realview_pb11mp_map_io(void)
        iotable_init(realview_pb11mp_io_desc, ARRAY_SIZE(realview_pb11mp_io_desc));
 }
 
+static struct pl061_platform_data gpio0_plat_data = {
+       .gpio_base      = 0,
+       .irq_base       = -1,
+};
+
+static struct pl061_platform_data gpio1_plat_data = {
+       .gpio_base      = 8,
+       .irq_base       = -1,
+};
+
+static struct pl061_platform_data gpio2_plat_data = {
+       .gpio_base      = 16,
+       .irq_base       = -1,
+};
+
 /*
  * RealView PB11MPCore AMBA devices
  */
@@ -165,9 +182,9 @@ AMBA_DEVICE(uart3,  "fpga:09",      PB11MP_UART3,   NULL);
 AMBA_DEVICE(smc,       "dev:00",       PB11MP_SMC,     NULL);
 AMBA_DEVICE(sctl,      "dev:e0",       SCTL,           NULL);
 AMBA_DEVICE(wdog,      "dev:e1",       PB11MP_WATCHDOG, NULL);
-AMBA_DEVICE(gpio0,     "dev:e4",       PB11MP_GPIO0,   NULL);
-AMBA_DEVICE(gpio1,     "dev:e5",       GPIO1,          NULL);
-AMBA_DEVICE(gpio2,     "dev:e6",       GPIO2,          NULL);
+AMBA_DEVICE(gpio0,     "dev:e4",       PB11MP_GPIO0,   &gpio0_plat_data);
+AMBA_DEVICE(gpio1,     "dev:e5",       GPIO1,          &gpio1_plat_data);
+AMBA_DEVICE(gpio2,     "dev:e6",       GPIO2,          &gpio2_plat_data);
 AMBA_DEVICE(rtc,       "dev:e8",       PB11MP_RTC,     NULL);
 AMBA_DEVICE(sci0,      "dev:f0",       SCI,            NULL);
 AMBA_DEVICE(uart0,     "dev:f1",       PB11MP_UART0,   NULL);
@@ -230,31 +247,19 @@ static struct resource realview_pb11mp_smsc911x_resources[] = {
        },
 };
 
-struct resource realview_pb11mp_cf_resources[] = {
+static struct resource realview_pb11mp_isp1761_resources[] = {
        [0] = {
-               .start          = REALVIEW_PB11MP_CF_BASE,
-               .end            = REALVIEW_PB11MP_CF_BASE + SZ_4K - 1,
+               .start          = REALVIEW_PB11MP_USB_BASE,
+               .end            = REALVIEW_PB11MP_USB_BASE + SZ_128K - 1,
                .flags          = IORESOURCE_MEM,
        },
        [1] = {
-               .start          = REALVIEW_PB11MP_CF_MEM_BASE,
-               .end            = REALVIEW_PB11MP_CF_MEM_BASE + SZ_4K - 1,
-               .flags          = IORESOURCE_MEM,
-       },
-       [2] = {
-               .start          = -1,           /* FIXME: Find correct irq */
-               .end            = -1,
+               .start          = IRQ_TC11MP_USB,
+               .end            = IRQ_TC11MP_USB,
                .flags          = IORESOURCE_IRQ,
        },
 };
 
-struct platform_device realview_pb11mp_cf_device = {
-       .name           = "compactflash",
-       .id             = 0,
-       .num_resources  = ARRAY_SIZE(realview_pb11mp_cf_resources),
-       .resource       = realview_pb11mp_cf_resources,
-};
-
 static void __init gic_init_irq(void)
 {
        unsigned int pldctrl;
@@ -308,7 +313,8 @@ static void __init realview_pb11mp_init(void)
                                ARRAY_SIZE(realview_pb11mp_flash_resource));
        realview_eth_register(NULL, realview_pb11mp_smsc911x_resources);
        platform_device_register(&realview_i2c_device);
-       platform_device_register(&realview_pb11mp_cf_device);
+       platform_device_register(&realview_cf_device);
+       realview_usb_register(realview_pb11mp_isp1761_resources);
 
        for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
                struct amba_device *d = amba_devs[i];