omap: musb: Add USB support to 4430 SDP board file
authorMaulik Mankad <x0082077@ti.com>
Wed, 17 Feb 2010 22:09:32 +0000 (14:09 -0800)
committerTony Lindgren <tony@atomide.com>
Tue, 23 Feb 2010 18:57:39 +0000 (10:57 -0800)
This patch adds support for Mentor USB to 4430 SDP board
file.

It also defines the base address for HS USB OTG controller
in OMAP4.

Also updates platform specfic structure with base address
and IRQ details.

Signed-off-by: Maulik Mankad <x0082077@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Olof Johansson <olof@lixom.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/usb-musb.c
arch/arm/plat-omap/include/plat/omap44xx.h

index 793ce8f4e927cb5f72979a7a512f9b7e0faf1947..86b240e7aa7c59326cd686240e26b93282b0ac23 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/platform_device.h>
 #include <linux/io.h>
 #include <linux/gpio.h>
+#include <linux/usb/otg.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -27,6 +28,7 @@
 #include <plat/common.h>
 #include <plat/control.h>
 #include <plat/timer-gp.h>
+#include <plat/usb.h>
 #include <asm/hardware/gic.h>
 
 static struct platform_device sdp4430_lcd_device = {
@@ -73,11 +75,19 @@ static void __init omap_4430sdp_init_irq(void)
        omap_gpio_init();
 }
 
+static struct omap_musb_board_data musb_board_data = {
+       .interface_type         = MUSB_INTERFACE_UTMI,
+       .mode                   = MUSB_PERIPHERAL,
+       .power                  = 100,
+};
 
 static void __init omap_4430sdp_init(void)
 {
        platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
        omap_serial_init();
+       /* OMAP4 SDP uses internal transceiver so register nop transceiver */
+       usb_nop_xceiv_register();
+       usb_musb_init(&musb_board_data);
 }
 
 static void __init omap_4430sdp_map_io(void)
index 2221a6ccdeee7aa65b9b3abc12cc714e406e2ae4..d5bea43e9422710597ec0467f4e883721f647634 100644 (file)
@@ -88,10 +88,15 @@ static struct platform_device musb_device = {
 
 void __init usb_musb_init(struct omap_musb_board_data *board_data)
 {
-       if (cpu_is_omap243x())
+       if (cpu_is_omap243x()) {
                musb_resources[0].start = OMAP243X_HS_BASE;
-       else
+       } else if (cpu_is_omap34xx()) {
                musb_resources[0].start = OMAP34XX_HSUSB_OTG_BASE;
+       } else if (cpu_is_omap44xx()) {
+               musb_resources[0].start = OMAP44XX_HSUSB_OTG_BASE;
+               musb_resources[1].start = INT_44XX_HS_USB_MC;
+               musb_resources[2].start = INT_44XX_HS_USB_DMA;
+       }
        musb_resources[0].end = musb_resources[0].start + SZ_4K - 1;
 
        /*
index 2068b39f76bb8626a9013f73108f1375eb7cca76..8fc15d33089a4eb00a201093f9c8120151ef8b23 100644 (file)
@@ -45,6 +45,7 @@
 #define OMAP44XX_MCPDM_L3_BASE         0x49032000
 
 #define OMAP44XX_MAILBOX_BASE          (L4_44XX_BASE + 0xF4000)
+#define OMAP44XX_HSUSB_OTG_BASE                (L4_44XX_BASE + 0xAB000)
 
 #endif /* __ASM_ARCH_OMAP44XX_H */