]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 5397/1: RealView: Add support for the ISP1761 USB chip
authorCatalin Marinas <catalin.marinas@arm.com>
Thu, 12 Feb 2009 15:00:21 +0000 (16:00 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 19 Feb 2009 11:30:27 +0000 (11:30 +0000)
This patch adds the platform_device and resource structures for the USB
ISP1761 chip, usable with the in-kernel isp1760 driver.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-realview/core.c
arch/arm/mach-realview/core.h
arch/arm/mach-realview/realview_eb.c
arch/arm/mach-realview/realview_pb1176.c
arch/arm/mach-realview/realview_pb11mp.c
arch/arm/mach-realview/realview_pba8.c

index 51972ecfc5069b9c1ac71eae9c1442aff1a82395..d6766685cfc7d1b9e1c2eb95d94cdfbbc9798aca 100644 (file)
@@ -151,6 +151,17 @@ int realview_eth_register(const char *name, struct resource *res)
        return platform_device_register(&realview_eth_device);
 }
 
+struct platform_device realview_usb_device = {
+       .name                   = "isp1760",
+       .num_resources          = 2,
+};
+
+int realview_usb_register(struct resource *res)
+{
+       realview_usb_device.resource = res;
+       return platform_device_register(&realview_usb_device);
+}
+
 static struct pata_platform_info pata_platform_data = {
        .ioport_shift           = 1,
 };
index 0ba1bfb1fe6bed61c6576754be40c858a15d394d..21c08637683b72ca1105e469e582b8c8230bd9c2 100644 (file)
@@ -63,5 +63,6 @@ extern void realview_leds_event(led_event_t ledevt);
 extern void realview_timer_init(unsigned int timer_irq);
 extern int realview_flash_register(struct resource *res, u32 num);
 extern int realview_eth_register(const char *name, struct resource *res);
+extern int realview_usb_register(struct resource *res);
 
 #endif
index bed39ed976133628be7755cc0e63f395628637dc..c20fbef122b38af693f2f56e9f82aadba87de8b7 100644 (file)
@@ -264,6 +264,19 @@ static int eth_device_register(void)
        return realview_eth_register(name, realview_eb_eth_resources);
 }
 
+static struct resource realview_eb_isp1761_resources[] = {
+       [0] = {
+               .start          = REALVIEW_EB_USB_BASE,
+               .end            = REALVIEW_EB_USB_BASE + SZ_128K - 1,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = IRQ_EB_USB,
+               .end            = IRQ_EB_USB,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
 static void __init gic_init_irq(void)
 {
        if (core_tile_eb11mp() || core_tile_a9mp()) {
@@ -323,6 +336,8 @@ static void realview_eb11mp_fixup(void)
        /* platform devices */
        realview_eb_eth_resources[1].start      = IRQ_EB11MP_ETH;
        realview_eb_eth_resources[1].end        = IRQ_EB11MP_ETH;
+       realview_eb_isp1761_resources[1].start  = IRQ_EB11MP_USB;
+       realview_eb_isp1761_resources[1].end    = IRQ_EB11MP_USB;
 }
 
 static void __init realview_eb_timer_init(void)
@@ -366,6 +381,7 @@ static void __init realview_eb_init(void)
        realview_flash_register(&realview_eb_flash_resource, 1);
        platform_device_register(&realview_i2c_device);
        eth_device_register();
+       realview_usb_register(realview_eb_isp1761_resources);
 
        for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
                struct amba_device *d = amba_devs[i];
index d9d684d29e928f764e1e69313698b0be05b174af..a64b84a7a3df96b65a237a9566dbbf78bbf46610 100644 (file)
@@ -222,6 +222,19 @@ static struct resource realview_pb1176_smsc911x_resources[] = {
        },
 };
 
+static struct resource realview_pb1176_isp1761_resources[] = {
+       [0] = {
+               .start          = REALVIEW_PB1176_USB_BASE,
+               .end            = REALVIEW_PB1176_USB_BASE + SZ_128K - 1,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = IRQ_PB1176_USB,
+               .end            = IRQ_PB1176_USB,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
 static void __init gic_init_irq(void)
 {
        /* ARM1176 DevChip GIC, primary */
@@ -261,6 +274,7 @@ static void __init realview_pb1176_init(void)
        realview_flash_register(&realview_pb1176_flash_resource, 1);
        realview_eth_register(NULL, realview_pb1176_smsc911x_resources);
        platform_device_register(&realview_i2c_device);
+       realview_usb_register(realview_pb1176_isp1761_resources);
 
        for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
                struct amba_device *d = amba_devs[i];
index ff50ec2e4320b646af9b49e16233c79e9394a136..ea1e60eca359efa14baf707502487b5df8e371c6 100644 (file)
@@ -230,6 +230,19 @@ static struct resource realview_pb11mp_smsc911x_resources[] = {
        },
 };
 
+static struct resource realview_pb11mp_isp1761_resources[] = {
+       [0] = {
+               .start          = REALVIEW_PB11MP_USB_BASE,
+               .end            = REALVIEW_PB11MP_USB_BASE + SZ_128K - 1,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = IRQ_TC11MP_USB,
+               .end            = IRQ_TC11MP_USB,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
 static void __init gic_init_irq(void)
 {
        unsigned int pldctrl;
@@ -284,6 +297,7 @@ static void __init realview_pb11mp_init(void)
        realview_eth_register(NULL, realview_pb11mp_smsc911x_resources);
        platform_device_register(&realview_i2c_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];
index c6147cba25782d847048766518cfa329582a8bde..d6ac1eb86576c36f8e8dcb13fd6f385b7432131a 100644 (file)
@@ -221,6 +221,19 @@ static struct resource realview_pba8_smsc911x_resources[] = {
        },
 };
 
+static struct resource realview_pba8_isp1761_resources[] = {
+       [0] = {
+               .start          = REALVIEW_PBA8_USB_BASE,
+               .end            = REALVIEW_PBA8_USB_BASE + SZ_128K - 1,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start          = IRQ_PBA8_USB,
+               .end            = IRQ_PBA8_USB,
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
 static void __init gic_init_irq(void)
 {
        /* ARM PB-A8 on-board GIC */
@@ -252,6 +265,7 @@ static void __init realview_pba8_init(void)
        realview_eth_register(NULL, realview_pba8_smsc911x_resources);
        platform_device_register(&realview_i2c_device);
        platform_device_register(&realview_cf_device);
+       realview_usb_register(realview_pba8_isp1761_resources);
 
        for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
                struct amba_device *d = amba_devs[i];