From patchwork Thu Dec 31 13:23:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maulik Mankad X-Patchwork-Id: 70373 X-Patchwork-Delegate: me@felipebalbi.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBVDNYQS032279 for ; Thu, 31 Dec 2009 13:23:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752085AbZLaNXb (ORCPT ); Thu, 31 Dec 2009 08:23:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751568AbZLaNXb (ORCPT ); Thu, 31 Dec 2009 08:23:31 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:47185 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750898AbZLaNXa (ORCPT ); Thu, 31 Dec 2009 08:23:30 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id nBVDN5vX002045 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 31 Dec 2009 07:23:07 -0600 Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id nBVDN3od025751; Thu, 31 Dec 2009 18:53:03 +0530 (IST) Received: from linfarm476.india.ti.com (localhost [127.0.0.1]) by linfarm476.india.ti.com (8.12.11/8.12.11) with ESMTP id nBVDN34Q017727; Thu, 31 Dec 2009 18:53:03 +0530 Received: (from x0082077@localhost) by linfarm476.india.ti.com (8.12.11/8.12.11/Submit) id nBVDN27F017725; Thu, 31 Dec 2009 18:53:02 +0530 From: Maulik Mankad To: linux-omap@vger.kernel.org Cc: linux-usb@vger.kernel.org, Maulik Mankad , Tony Lindgren , Felipe Balbi , David Brownell , Greg Kroah-Hartman , Sergei Shtylyov , Olof Johansson Subject: [PATCH v3 2/2] ARM : OMAP4 : MUSB : Add USB support to 4430 SDP board file Date: Thu, 31 Dec 2009 18:53:02 +0530 Message-Id: <1262265782-17672-1-git-send-email-x0082077@ti.com> X-Mailer: git-send-email 1.5.5 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Index: felipe_musb/arch/arm/mach-omap2/board-4430sdp.c =================================================================== --- felipe_musb.orig/arch/arm/mach-omap2/board-4430sdp.c +++ felipe_musb/arch/arm/mach-omap2/board-4430sdp.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -27,6 +28,7 @@ #include #include #include +#include #include static struct platform_device sdp4430_lcd_device = { @@ -73,11 +75,19 @@ static void __init omap_4430sdp_init_irq 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: felipe_musb/arch/arm/mach-omap2/usb-musb.c =================================================================== --- felipe_musb.orig/arch/arm/mach-omap2/usb-musb.c +++ felipe_musb/arch/arm/mach-omap2/usb-musb.c @@ -77,10 +77,15 @@ static struct platform_device musb_devic 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: felipe_musb/arch/arm/plat-omap/include/plat/omap44xx.h =================================================================== --- felipe_musb.orig/arch/arm/plat-omap/include/plat/omap44xx.h +++ felipe_musb/arch/arm/plat-omap/include/plat/omap44xx.h @@ -43,6 +43,7 @@ #define OMAP44XX_WKUPGEN_BASE 0x48281000 #define OMAP44XX_MAILBOX_BASE (L4_44XX_BASE + 0xF4000) +#define OMAP44XX_HSUSB_OTG_BASE (L4_44XX_BASE + 0xAB000) #endif /* __ASM_ARCH_OMAP44XX_H */