提交 7db21712 编写于 作者: C Catalin Marinas 提交者: 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: NCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 6be62ba2
......@@ -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,
};
......
......@@ -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
......@@ -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];
......
......@@ -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];
......
......@@ -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];
......
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册