public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Maulik Mankad <x0082077@ti.com>,
	Sergei Shtylyov <sshtylyov@ru.mvista.com>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	David Brownell <david-b@pacbell.net>,
	Olof Johansson <olof@lixom.net>,
	Felipe Balbi <felipe.balbi@nokia.com>,
	linux-omap@vger.kernel.org
Subject: [PATCH 11/11] omap: musb: Add USB support to 4430 SDP board file
Date: Fri, 19 Feb 2010 15:30:38 -0800	[thread overview]
Message-ID: <20100219233038.10559.52038.stgit@baageli.muru.com> (raw)
In-Reply-To: <20100219232648.10559.380.stgit@baageli.muru.com>

From: Maulik Mankad <x0082077@ti.com>

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        |   10 ++++++++++
 arch/arm/mach-omap2/usb-musb.c             |    9 +++++++--
 arch/arm/plat-omap/include/plat/omap44xx.h |    1 +
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 793ce8f..86b240e 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -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)
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index 85feb60..53a9638 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -87,10 +87,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;
 
 	/*
diff --git a/arch/arm/plat-omap/include/plat/omap44xx.h b/arch/arm/plat-omap/include/plat/omap44xx.h
index 2068b39..8fc15d3 100644
--- a/arch/arm/plat-omap/include/plat/omap44xx.h
+++ b/arch/arm/plat-omap/include/plat/omap44xx.h
@@ -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 */
 


  parent reply	other threads:[~2010-02-19 23:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-19 23:29 [PATCH 00/11] omap updates for 2.6.34, part 4 Tony Lindgren
2010-02-19 23:30 ` [PATCH 01/11] USB: Add empty functions in otg.h Tony Lindgren
2010-02-19 23:30 ` [PATCH 02/11] omap: musb: Remove #ifdef from board-omap3evm.c Tony Lindgren
2010-02-19 23:30 ` [PATCH 04/11] omap: musb: Pass board specific data from board file Tony Lindgren
2010-02-19 23:30 ` [PATCH 05/11] omap: musb: remove unused data Tony Lindgren
2010-02-19 23:30 ` [PATCH 06/11] arm: omap: musb: we can use clk framework Tony Lindgren
     [not found] ` <20100219232648.10559.380.stgit-XB442sTQ5VIxQTnqJstS8Q@public.gmane.org>
2010-02-19 23:30   ` [PATCH 03/11] arm: omap: musb: ioremap only what's ours Tony Lindgren
2010-02-19 23:37     ` Aguirre, Sergio
2010-02-19 23:44       ` Tony Lindgren
2010-02-19 23:55         ` Aguirre, Sergio
2010-02-20  0:10           ` Tony Lindgren
2010-02-19 23:30   ` [PATCH 07/11] omap: musb: remove unused soft_con field Tony Lindgren
2010-02-19 23:30   ` [PATCH 08/11] omap: musb: remove unused dma data Tony Lindgren
2010-02-19 23:30 ` [PATCH 09/11] omap: musb: remove unnecessary return Tony Lindgren
2010-02-19 23:30 ` [PATCH 10/11] omap: musb: get rid of dyn_fifo Tony Lindgren
2010-02-23  9:02   ` Gupta, Ajay Kumar
2010-02-23 14:55   ` Thomas Weber
2010-02-23 15:09     ` Andreas Hartmetz
2010-02-23 15:20       ` Gadiyar, Anand
2010-02-23 18:58         ` Tony Lindgren
2010-02-19 23:30 ` Tony Lindgren [this message]
2010-02-20  8:30 ` [PATCH 00/11] omap updates for 2.6.34, part 4 Shilimkar, Santosh
2010-02-22 21:37   ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100219233038.10559.52038.stgit@baageli.muru.com \
    --to=tony@atomide.com \
    --cc=david-b@pacbell.net \
    --cc=felipe.balbi@nokia.com \
    --cc=gregkh@suse.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=sshtylyov@ru.mvista.com \
    --cc=x0082077@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox