diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/boards/mach-se/7724/setup.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index c050a8d76dfd..8fed45a2fb85 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/smc91x.h> | 19 | #include <linux/smc91x.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <linux/input.h> | 21 | #include <linux/input.h> |
22 | #include <linux/usb/r8a66597.h> | ||
22 | #include <video/sh_mobile_lcdc.h> | 23 | #include <video/sh_mobile_lcdc.h> |
23 | #include <media/sh_mobile_ceu.h> | 24 | #include <media/sh_mobile_ceu.h> |
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
@@ -302,6 +303,34 @@ static struct platform_device sh_eth_device = { | |||
302 | .resource = sh_eth_resources, | 303 | .resource = sh_eth_resources, |
303 | }; | 304 | }; |
304 | 305 | ||
306 | static struct r8a66597_platdata sh7724_usb0_host_data = { | ||
307 | }; | ||
308 | |||
309 | static struct resource sh7724_usb0_host_resources[] = { | ||
310 | [0] = { | ||
311 | .start = 0xa4d80000, | ||
312 | .end = 0xa4d800ff, | ||
313 | .flags = IORESOURCE_MEM, | ||
314 | }, | ||
315 | [1] = { | ||
316 | .start = 65, | ||
317 | .end = 65, | ||
318 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_LOW, | ||
319 | }, | ||
320 | }; | ||
321 | |||
322 | static struct platform_device sh7724_usb0_host_device = { | ||
323 | .name = "r8a66597_hcd", | ||
324 | .id = 0, | ||
325 | .dev = { | ||
326 | .dma_mask = NULL, /* not use dma */ | ||
327 | .coherent_dma_mask = 0xffffffff, | ||
328 | .platform_data = &sh7724_usb0_host_data, | ||
329 | }, | ||
330 | .num_resources = ARRAY_SIZE(sh7724_usb0_host_resources), | ||
331 | .resource = sh7724_usb0_host_resources, | ||
332 | }; | ||
333 | |||
305 | static struct platform_device *ms7724se_devices[] __initdata = { | 334 | static struct platform_device *ms7724se_devices[] __initdata = { |
306 | &heartbeat_device, | 335 | &heartbeat_device, |
307 | &smc91x_eth_device, | 336 | &smc91x_eth_device, |
@@ -311,6 +340,7 @@ static struct platform_device *ms7724se_devices[] __initdata = { | |||
311 | &ceu1_device, | 340 | &ceu1_device, |
312 | &keysc_device, | 341 | &keysc_device, |
313 | &sh_eth_device, | 342 | &sh_eth_device, |
343 | &sh7724_usb0_host_device, | ||
314 | }; | 344 | }; |
315 | 345 | ||
316 | #define EEPROM_OP 0xBA206000 | 346 | #define EEPROM_OP 0xBA206000 |
@@ -364,6 +394,7 @@ static void __init sh_eth_init(void) | |||
364 | #define SW4140 0xBA201000 | 394 | #define SW4140 0xBA201000 |
365 | #define FPGA_OUT 0xBA200400 | 395 | #define FPGA_OUT 0xBA200400 |
366 | #define PORT_HIZA 0xA4050158 | 396 | #define PORT_HIZA 0xA4050158 |
397 | #define PORT_MSELCRB 0xA4050182 | ||
367 | 398 | ||
368 | #define SW41_A 0x0100 | 399 | #define SW41_A 0x0100 |
369 | #define SW41_B 0x0200 | 400 | #define SW41_B 0x0200 |
@@ -373,6 +404,7 @@ static void __init sh_eth_init(void) | |||
373 | #define SW41_F 0x2000 | 404 | #define SW41_F 0x2000 |
374 | #define SW41_G 0x4000 | 405 | #define SW41_G 0x4000 |
375 | #define SW41_H 0x8000 | 406 | #define SW41_H 0x8000 |
407 | |||
376 | static int __init devices_setup(void) | 408 | static int __init devices_setup(void) |
377 | { | 409 | { |
378 | u16 sw = ctrl_inw(SW4140); /* select camera, monitor */ | 410 | u16 sw = ctrl_inw(SW4140); /* select camera, monitor */ |
@@ -385,6 +417,12 @@ static int __init devices_setup(void) | |||
385 | (1 << 14)), /* RMII */ | 417 | (1 << 14)), /* RMII */ |
386 | FPGA_OUT); | 418 | FPGA_OUT); |
387 | 419 | ||
420 | /* turn on USB clocks, use external clock */ | ||
421 | ctrl_outw((ctrl_inw(PORT_MSELCRB) & ~0xc000) | 0x8000, PORT_MSELCRB); | ||
422 | |||
423 | /* enable USB0 port */ | ||
424 | ctrl_outw(0x0600, 0xa40501d4); | ||
425 | |||
388 | /* enable IRQ 0,1,2 */ | 426 | /* enable IRQ 0,1,2 */ |
389 | gpio_request(GPIO_FN_INTC_IRQ0, NULL); | 427 | gpio_request(GPIO_FN_INTC_IRQ0, NULL); |
390 | gpio_request(GPIO_FN_INTC_IRQ1, NULL); | 428 | gpio_request(GPIO_FN_INTC_IRQ1, NULL); |