Commit 7db21712 authored by Catalin Marinas's avatar Catalin Marinas Committed by Russell King

[ARM] 5397/1: RealView: Add support for the ISP1761 USB chip

This patch adds the platform_device and resource structures for the USB
ISP1761 chip, usable with the in-kernel isp1760 driver.
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 6be62ba2
...@@ -151,6 +151,17 @@ int realview_eth_register(const char *name, struct resource *res) ...@@ -151,6 +151,17 @@ int realview_eth_register(const char *name, struct resource *res)
return platform_device_register(&realview_eth_device); 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 = { static struct pata_platform_info pata_platform_data = {
.ioport_shift = 1, .ioport_shift = 1,
}; };
......
...@@ -63,5 +63,6 @@ extern void realview_leds_event(led_event_t ledevt); ...@@ -63,5 +63,6 @@ extern void realview_leds_event(led_event_t ledevt);
extern void realview_timer_init(unsigned int timer_irq); extern void realview_timer_init(unsigned int timer_irq);
extern int realview_flash_register(struct resource *res, u32 num); extern int realview_flash_register(struct resource *res, u32 num);
extern int realview_eth_register(const char *name, struct resource *res); extern int realview_eth_register(const char *name, struct resource *res);
extern int realview_usb_register(struct resource *res);
#endif #endif
...@@ -264,6 +264,19 @@ static int eth_device_register(void) ...@@ -264,6 +264,19 @@ static int eth_device_register(void)
return realview_eth_register(name, realview_eb_eth_resources); 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) static void __init gic_init_irq(void)
{ {
if (core_tile_eb11mp() || core_tile_a9mp()) { if (core_tile_eb11mp() || core_tile_a9mp()) {
...@@ -323,6 +336,8 @@ static void realview_eb11mp_fixup(void) ...@@ -323,6 +336,8 @@ static void realview_eb11mp_fixup(void)
/* platform devices */ /* platform devices */
realview_eb_eth_resources[1].start = IRQ_EB11MP_ETH; realview_eb_eth_resources[1].start = IRQ_EB11MP_ETH;
realview_eb_eth_resources[1].end = 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) static void __init realview_eb_timer_init(void)
...@@ -366,6 +381,7 @@ static void __init realview_eb_init(void) ...@@ -366,6 +381,7 @@ static void __init realview_eb_init(void)
realview_flash_register(&realview_eb_flash_resource, 1); realview_flash_register(&realview_eb_flash_resource, 1);
platform_device_register(&realview_i2c_device); platform_device_register(&realview_i2c_device);
eth_device_register(); eth_device_register();
realview_usb_register(realview_eb_isp1761_resources);
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
struct amba_device *d = amba_devs[i]; struct amba_device *d = amba_devs[i];
......
...@@ -222,6 +222,19 @@ static struct resource realview_pb1176_smsc911x_resources[] = { ...@@ -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) static void __init gic_init_irq(void)
{ {
/* ARM1176 DevChip GIC, primary */ /* ARM1176 DevChip GIC, primary */
...@@ -261,6 +274,7 @@ static void __init realview_pb1176_init(void) ...@@ -261,6 +274,7 @@ static void __init realview_pb1176_init(void)
realview_flash_register(&realview_pb1176_flash_resource, 1); realview_flash_register(&realview_pb1176_flash_resource, 1);
realview_eth_register(NULL, realview_pb1176_smsc911x_resources); realview_eth_register(NULL, realview_pb1176_smsc911x_resources);
platform_device_register(&realview_i2c_device); platform_device_register(&realview_i2c_device);
realview_usb_register(realview_pb1176_isp1761_resources);
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
struct amba_device *d = amba_devs[i]; struct amba_device *d = amba_devs[i];
......
...@@ -230,6 +230,19 @@ static struct resource realview_pb11mp_smsc911x_resources[] = { ...@@ -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) static void __init gic_init_irq(void)
{ {
unsigned int pldctrl; unsigned int pldctrl;
...@@ -284,6 +297,7 @@ static void __init realview_pb11mp_init(void) ...@@ -284,6 +297,7 @@ static void __init realview_pb11mp_init(void)
realview_eth_register(NULL, realview_pb11mp_smsc911x_resources); realview_eth_register(NULL, realview_pb11mp_smsc911x_resources);
platform_device_register(&realview_i2c_device); platform_device_register(&realview_i2c_device);
platform_device_register(&realview_cf_device); platform_device_register(&realview_cf_device);
realview_usb_register(realview_pb11mp_isp1761_resources);
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
struct amba_device *d = amba_devs[i]; struct amba_device *d = amba_devs[i];
......
...@@ -221,6 +221,19 @@ static struct resource realview_pba8_smsc911x_resources[] = { ...@@ -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) static void __init gic_init_irq(void)
{ {
/* ARM PB-A8 on-board GIC */ /* ARM PB-A8 on-board GIC */
...@@ -252,6 +265,7 @@ static void __init realview_pba8_init(void) ...@@ -252,6 +265,7 @@ static void __init realview_pba8_init(void)
realview_eth_register(NULL, realview_pba8_smsc911x_resources); realview_eth_register(NULL, realview_pba8_smsc911x_resources);
platform_device_register(&realview_i2c_device); platform_device_register(&realview_i2c_device);
platform_device_register(&realview_cf_device); platform_device_register(&realview_cf_device);
realview_usb_register(realview_pba8_isp1761_resources);
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
struct amba_device *d = amba_devs[i]; struct amba_device *d = amba_devs[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment