aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/mach-se/7724/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/mach-se/7724/setup.c')
-rw-r--r--arch/sh/boards/mach-se/7724/setup.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index c04e134474d8..e6bd09f2e14a 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -341,6 +341,35 @@ static struct platform_device sh7724_usb0_host_device = {
341 .resource = sh7724_usb0_host_resources, 341 .resource = sh7724_usb0_host_resources,
342}; 342};
343 343
344static struct r8a66597_platdata sh7724_usb1_gadget_data = {
345 .on_chip = 1,
346};
347
348static struct resource sh7724_usb1_gadget_resources[] = {
349 [0] = {
350 .start = 0xa4d90000,
351 .end = 0xa4d90123,
352 .flags = IORESOURCE_MEM,
353 },
354 [1] = {
355 .start = 66,
356 .end = 66,
357 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
358 },
359};
360
361static struct platform_device sh7724_usb1_gadget_device = {
362 .name = "r8a66597_udc",
363 .id = 1, /* USB1 */
364 .dev = {
365 .dma_mask = NULL, /* not use dma */
366 .coherent_dma_mask = 0xffffffff,
367 .platform_data = &sh7724_usb1_gadget_data,
368 },
369 .num_resources = ARRAY_SIZE(sh7724_usb1_gadget_resources),
370 .resource = sh7724_usb1_gadget_resources,
371};
372
344static struct platform_device *ms7724se_devices[] __initdata = { 373static struct platform_device *ms7724se_devices[] __initdata = {
345 &heartbeat_device, 374 &heartbeat_device,
346 &smc91x_eth_device, 375 &smc91x_eth_device,
@@ -351,6 +380,7 @@ static struct platform_device *ms7724se_devices[] __initdata = {
351 &keysc_device, 380 &keysc_device,
352 &sh_eth_device, 381 &sh_eth_device,
353 &sh7724_usb0_host_device, 382 &sh7724_usb0_host_device,
383 &sh7724_usb1_gadget_device,
354}; 384};
355 385
356#define EEPROM_OP 0xBA206000 386#define EEPROM_OP 0xBA206000
@@ -459,6 +489,9 @@ static int __init devices_setup(void)
459 /* enable USB0 port */ 489 /* enable USB0 port */
460 ctrl_outw(0x0600, 0xa40501d4); 490 ctrl_outw(0x0600, 0xa40501d4);
461 491
492 /* enable USB1 port */
493 ctrl_outw(0x0600, 0xa4050192);
494
462 /* enable IRQ 0,1,2 */ 495 /* enable IRQ 0,1,2 */
463 gpio_request(GPIO_FN_INTC_IRQ0, NULL); 496 gpio_request(GPIO_FN_INTC_IRQ0, NULL);
464 gpio_request(GPIO_FN_INTC_IRQ1, NULL); 497 gpio_request(GPIO_FN_INTC_IRQ1, NULL);