musb_hdrc: Clean-up init code for mainline merge
Subsystems (4)
Tony Lindgren
maintainercover musb_hdrc: Clean-up init code for mainline merge
Hi Felipe & Dave,
While creating a patch for usb-musb.c init code for mainline kernel, I ended up cleaning up following stuff in the l-o tree.
Does it look OK to you?
Regards,
Tony
---
Tony Lindgren (3):
musb_hdrc: Build usb-musb based on config entry, clean-up Makefile
musb_hdrc: Clean-up MUSB init code for next merge window
musb_hdrc: Set musb_resources dynamically
arch/arm/mach-omap2/Makefile | 17 +++++--------- arch/arm/mach-omap2/board-2430sdp.c | 2 +- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/board-ldp.c | 2 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3evm.c | 2 +- arch/arm/mach-omap2/board-omap3pandora.c | 2 +- arch/arm/mach-omap2/board-overo.c | 2 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/mach-omap2/usb-musb.c | 28 ++++++++++------------ arch/arm/plat-omap/include/mach/usb-musb.h | 35 ---------------------------- arch/arm/plat-omap/include/mach/usb.h | 11 +++++++-- 12 files changed, 35 insertions(+), 72 deletions(-) delete mode 100644 arch/arm/plat-omap/include/mach/usb-musb.h
Signature · 1 line
Signature
Tony Lindgren
maintainerPATCH 1/3 musb_hdrc: Set musb_resources dynamically
The cpu_is_omap34xx() may not be static.
--- arch/arm/mach-omap2/usb-musb.c | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-)
arch/arm/mach-omap2/usb-musb.c +13 -10
@@ -35,13 +35,7 @@ #ifdef CONFIG_USB_MUSB_SOC static struct resource musb_resources[] = { - [0] = { - .start = cpu_is_omap34xx() - ? OMAP34XX_HSUSB_OTG_BASE - : OMAP243X_HS_BASE, - .end = cpu_is_omap34xx() - ? OMAP34XX_HSUSB_OTG_BASE + SZ_8K - 1 - : OMAP243X_HS_BASE + SZ_8K - 1, + [0] = { /* start and end set dynamically */ .flags = IORESOURCE_MEM, }, [1] = { /* general IRQ */
@@ -128,9 +122,7 @@ static struct musb_hdrc_platform_data musb_plat = {#elif defined(CONFIG_USB_GADGET_MUSB_HDRC ) .mode = MUSB_PERIPHERAL,#endif - .clock =cpu_is_omap34xx () - ?"hsotgusb_ick" - : "usbhs_ick", +/* .clock is set dynamically */ .set_clock = musb_set_clock, .config = &musb_config,
@@ -160,6 +152,17 @@ static struct platform_device musb_device = {void __init usb_musb_init (void ) {#ifdef CONFIG_USB_MUSB_SOC + +if (cpu_is_omap243x ()) { + musb_resources[0 ].start =OMAP243X_HS_BASE ; + musb_plat.clock ="usbhs_ick" ; + }else { + musb_resources[0 ].start =OMAP34XX_HSUSB_OTG_BASE ; + musb_plat.clock ="hsotgusb_ick" ; + } + + musb_resources[0 ].end = musb_resources[0 ].start +SZ_8K -1 ; +if (platform_device_register (&musb_device) <0 ) {printk (KERN_ERR "Unable to register HS-USB (MUSB) device\n" );return ;
Tony Lindgren
maintainerPATCH 2/3 musb_hdrc: Clean-up MUSB init code for next merge window
In reply to Tony LindgrenLet's just use mach/usb.h as mach/musb.h only has one entry.
--- arch/arm/mach-omap2/board-2430sdp.c | 2 +- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/board-ldp.c | 2 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3evm.c | 2 +- arch/arm/mach-omap2/board-omap3pandora.c | 2 +- arch/arm/mach-omap2/board-overo.c | 2 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/plat-omap/include/mach/usb-musb.h | 35 ---------------------------- arch/arm/plat-omap/include/mach/usb.h | 4 ++- 10 files changed, 10 insertions(+), 45 deletions(-) delete mode 100644 arch/arm/plat-omap/include/mach/usb-musb.h
arch/arm/mach-omap2/board-2430sdp.c +1 -1
@@ -36,7 +36,7 @@#include <mach/gpio.h> #include <mach/mux.h> #include <mach/board.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/common.h> #include <mach/gpmc.h> #include <mach/mcspi.h>
arch/arm/mach-omap2/board-3430sdp.c +1 -1
@@ -34,7 +34,7 @@#include <mach/gpio.h> #include <mach/mux.h> #include <mach/board.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/usb-ehci.h> #include <mach/common.h> #include <mach/dma.h>
arch/arm/mach-omap2/board-ldp.c +1 -1
@@ -35,7 +35,7 @@#include <mach/board.h> #include <mach/common.h> #include <mach/gpmc.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <asm/io.h> #include <asm/delay.h>
arch/arm/mach-omap2/board-omap3beagle.c +1 -1
@@ -38,7 +38,7 @@#include <asm/mach/flash.h> #include <mach/board.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/usb-ehci.h> #include <mach/common.h> #include <mach/gpmc.h>
arch/arm/mach-omap2/board-omap3evm.c +1 -1
@@ -31,7 +31,7 @@#include <mach/gpio.h> #include <mach/board.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/usb-ehci.h> #include <mach/common.h> #include <mach/mcspi.h>
arch/arm/mach-omap2/board-omap3pandora.c +1 -1
@@ -45,7 +45,7 @@#include <mach/hardware.h> #include <mach/nand.h> #include <mach/usb-ehci.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/mcspi.h> #include "sdram-micron-mt46h32m32lf-6.h"
arch/arm/mach-omap2/board-overo.c +1 -1
@@ -46,7 +46,7 @@#include <mach/hardware.h> #include <mach/nand.h> #include <mach/usb-ehci.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include "sdram-micron-mt46h32m32lf-6.h" #include "twl4030-generic-scripts.h"
arch/arm/mach-omap2/board-rx51.c +1 -1
@@ -28,7 +28,7 @@#include <mach/keypad.h> #include <mach/dma.h> #include <mach/gpmc.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <asm/io.h> #include <asm/delay.h>
arch/arm/plat-omap/include/mach/usb-musb.h deleted +0 -35
@@ -1,35 +0,0 @@ -/* -* arch/arm/plat-omap/include/mach/usb-musb.h -* -* Hardware definitions for Mentor Graphics MUSBMHDRC. -* -* Initial creation by Felipe Balbi. -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -* -* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ASM_ARCH_OMAP_USB_MUSB_H -#define __ASM_ARCH_OMAP_USB_MUSB_H - -extern void usb_musb_init (void ); - -#endif /* __ASM_ARCH_OMAP_USB_MUSB_H */ -
arch/arm/plat-omap/include/mach/usb.h +2 -2
@@ -27,8 +27,8 @@#define UDC_BASE OMAP2_UDC_BASE#define OMAP_OHCI_BASE OMAP2_OHCI_BASE -void __init usb_musb_init (void ); -void __init usb_ehci_init (void ); +extern void usb_musb_init (void ); +extern void usb_ehci_init (void );#endif
Tony Lindgren
maintainerPATCH 3/3 musb_hdrc: Build usb-musb based on config entry, clean-up Makefile
In reply to Tony LindgrenBuild usb-musb based on config entry, clean-up Makefile
--- arch/arm/mach-omap2/Makefile | 17 ++++++----------- arch/arm/mach-omap2/usb-musb.c | 7 ------- arch/arm/plat-omap/include/mach/usb.h | 7 +++++++ 3 files changed, 13 insertions(+), 18 deletions(-)
arch/arm/mach-omap2/Makefile +6 -11
@@ -44,27 +44,24 @@ obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o board-h4-mmc.o obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o \ board-2430sdp-flash.o \ mmc-twl4030.o \ - usb-musb.o \ usb-ehci.o obj-$(CONFIG_MACH_OMAP2EVM) += board-omap2evm.o \ mmc-twl4030.o obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o \ mmc-twl4030.o \ - usb-musb.o \ usb-ehci.o \ board-3430sdp-flash.o obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o \ mmc-twl4030.o \ - usb-musb.o usb-ehci.o \ + usb-ehci.o \ board-omap3evm-flash.o \ twl4030-generic-scripts.o obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o \ - usb-musb.o usb-ehci.o \ + usb-ehci.o \ mmc-twl4030.o \ twl4030-generic-scripts.o obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o \ - mmc-twl4030.o \ - usb-musb.o + mmc-twl4030.o obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o \ board-apollon-mmc.o \ board-apollon-keys.o
@@ -80,19 +77,17 @@ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ board-rx51-sdram.o \ board-rx51-video.o \ board-rx51-peripherals.o \ - mmc-twl4030.o \ - usb-musb.o + mmc-twl4030.o obj-$(CONFIG_MACH_OVERO) += board-overo.o \ mmc-twl4030.o \ - usb-musb.o \ usb-ehci.o \ twl4030-generic-scripts.o obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o \ mmc-twl4030.o \ - usb-musb.o \ usb-ehci.o -# TUSB 6010 chips +# Platform specific device init code +obj-$(CONFIG_USB_MUSB_SOC) += usb-musb.o obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o
arch/arm/mach-omap2/usb-musb.c +0 -7
@@ -33,7 +33,6 @@#include <mach/mux.h> #include <mach/usb.h> -#ifdef CONFIG_USB_MUSB_SOCstatic struct resource musb_resources[] = { [0 ] = {/* start and end set dynamically */ .flags =IORESOURCE_MEM ,
@@ -146,13 +145,9 @@ static struct platform_device musb_device = { .num_resources = ARRAY_SIZE(musb_resources), .resource = musb_resources, }; -#endif -void __init usb_musb_init (void ) { -#ifdef CONFIG_USB_MUSB_SOC -if (cpu_is_omap243x ()) { musb_resources[0 ].start =OMAP243X_HS_BASE ; musb_plat.clock ="usbhs_ick" ;
@@ -167,6 +162,4 @@ void __init usb_musb_init(void)printk (KERN_ERR "Unable to register HS-USB (MUSB) device\n" );return ; } -#endif } -
arch/arm/plat-omap/include/mach/usb.h +7 -0
@@ -27,7 +27,14 @@#define UDC_BASE OMAP2_UDC_BASE#define OMAP_OHCI_BASE OMAP2_OHCI_BASE +#ifdef CONFIG_USB_MUSB_SOC extern void usb_musb_init (void ); +#else +static inline void usb_musb_init (void ) +{ +} +#endif +extern void usb_ehci_init (void );#endif
Tony Lindgren
maintainerQuoted 6 lines · Tony Lindgren
Hi Felipe & Dave,
While creating a patch for
usb-musb.cinit code for mainline kernel, I ended up cleaning up following stuff in the l-o tree.Does it look OK to you?
And here's what the musb_init patch for the mainline. No boards are calling musb_init() yet, but that's easy to append.
The clock function might cause some merge issues.. I guess eventually the driver should just call clk_enable/disable once the omap2 clock merge is done.
Regards,
Tony
Quoted 1 line
From
545f2a61242ca4d27bb22d54a1f0b0bfcea86c5fMon Sep 17 00:00:00 2001
From: Felipe Balbi <[email protected]>
Date: Wed, 11 Feb 2009 17:33:49 -0800
Subject: [PATCH] ARM: OMAP3: MUSB initialization for omap hw
Create a generic board-file for initializing usb
on omap2430 and omap3 boards.
Patch modified by Tony to build the module based on CONFIG_USB_MUSB_SOC.
arch/arm/mach-omap2/Makefile +2 -0
@@ -44,3 +44,5 @@ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ board-rx51-peripherals.o \ mmc-twl4030.o +# Platform specific device init code +obj-$(CONFIG_USB_MUSB_SOC) += usb-musb.o
arch/arm/mach-omap2/usb-musb.c new file +165 -0
165 lines not on this page · raw message
arch/arm/plat-omap/include/mach/usb.h +8 -0
@@ -27,6 +27,14 @@#define UDC_BASE OMAP2_UDC_BASE#define OMAP_OHCI_BASE OMAP2_OHCI_BASE +#ifdef CONFIG_USB_MUSB_SOC +extern void usb_musb_init (void ); +#else +static inline void usb_musb_init (void ) +{ +} +#endif +#endif /*-------------------------------------------------------------------------*/
Re: [PATCH 1/3] musb_hdrc: Set musb_resources dynamically
In reply to Tony LindgrenQuoted 5 lines · Tony Lindgren
The
cpu_is_omap34xx()may not be static.Cc Felipe Balbi <[email protected]>Cc David Brownell <[email protected]>Signed-off-by Tony Lindgren <[email protected]>
This looks ok
Quoted 57 lines
--- arch/arm/mach-omap2/usb-musb.c | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-)arch/arm/mach-omap2/usb-musb.c +13
-11@@ -35,13 +35,7 @@ #ifdef CONFIG_USB_MUSB_SOC static struct resource musb_resources[] = { - [0] = { - .start = cpu_is_omap34xx() - ? OMAP34XX_HSUSB_OTG_BASE - : OMAP243X_HS_BASE, - .end = cpu_is_omap34xx() - ? OMAP34XX_HSUSB_OTG_BASE + SZ_8K - 1 - : OMAP243X_HS_BASE + SZ_8K - 1, + [0] = { /* start and end set dynamically */ .flags = IORESOURCE_MEM, }, [1] = { /* general IRQ */@@ -128,9 +122,7 @@ static struct musb_hdrc_platform_data musb_plat = {#elif defined(CONFIG_USB_GADGET_MUSB_HDRC ) .mode = MUSB_PERIPHERAL,#endif - .clock =cpu_is_omap34xx () - ?"hsotgusb_ick" - : "usbhs_ick", +/* .clock is set dynamically */ .set_clock = musb_set_clock, .config = &musb_config,@@ -160,6 +152,17 @@ static struct platform_device musb_device = {void __init usb_musb_init (void ) {#ifdef CONFIG_USB_MUSB_SOC + +if (cpu_is_omap243x ()) { + musb_resources[0 ].start =OMAP243X_HS_BASE ; + musb_plat.clock ="usbhs_ick" ; + }else { + musb_resources[0 ].start =OMAP34XX_HSUSB_OTG_BASE ; + musb_plat.clock ="hsotgusb_ick" ; + } + + musb_resources[0 ].end = musb_resources[0 ].start +SZ_8K -1 ; +if (platform_device_register (&musb_device) <0 ) {printk (KERN_ERR "Unable to register HS-USB (MUSB) device\n" );return ; --To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
balbi
Re: [PATCH 2/3] musb_hdrc: Clean-up MUSB init code for next merge window
In reply to Tony LindgrenQuoted 169 lines · Tony Lindgren
Let's just use
mach/usb.hasmach/musb.honly has one entry.Cc Felipe Balbi <[email protected]>Cc David Brownell <[email protected]>Signed-off-by Tony Lindgren <[email protected]>--- arch/arm/mach-omap2/board-2430sdp.c | 2 +- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/board-ldp.c | 2 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3evm.c | 2 +- arch/arm/mach-omap2/board-omap3pandora.c | 2 +- arch/arm/mach-omap2/board-overo.c | 2 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/plat-omap/include/mach/usb-musb.h | 35 ---------------------------- arch/arm/plat-omap/include/mach/usb.h | 4 ++- 10 files changed, 10 insertions(+), 45 deletions(-) delete mode 100644 arch/arm/plat-omap/include/mach/usb-musb.harch/arm/mach-omap2/board-2430sdp.c +1
-1@@ -36,7 +36,7 @@#include <mach/gpio.h> #include <mach/mux.h> #include <mach/board.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/common.h> #include <mach/gpmc.h> #include <mach/mcspi.h> arch/arm/mach-omap2/board-3430sdp.c +1
-1@@ -34,7 +34,7 @@#include <mach/gpio.h> #include <mach/mux.h> #include <mach/board.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/usb-ehci.h> #include <mach/common.h> #include <mach/dma.h> arch/arm/mach-omap2/board-ldp.c +1
-1@@ -35,7 +35,7 @@#include <mach/board.h> #include <mach/common.h> #include <mach/gpmc.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <asm/io.h> #include <asm/delay.h> arch/arm/mach-omap2/board-omap3beagle.c +1
-1@@ -38,7 +38,7 @@#include <asm/mach/flash.h> #include <mach/board.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/usb-ehci.h> #include <mach/common.h> #include <mach/gpmc.h> arch/arm/mach-omap2/board-omap3evm.c +1
-1@@ -31,7 +31,7 @@#include <mach/gpio.h> #include <mach/board.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/usb-ehci.h> #include <mach/common.h> #include <mach/mcspi.h> arch/arm/mach-omap2/board-omap3pandora.c +1
-1@@ -45,7 +45,7 @@#include <mach/hardware.h> #include <mach/nand.h> #include <mach/usb-ehci.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/mcspi.h> #include "sdram-micron-mt46h32m32lf-6.h" arch/arm/mach-omap2/board-overo.c +1
-1@@ -46,7 +46,7 @@#include <mach/hardware.h> #include <mach/nand.h> #include <mach/usb-ehci.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include "sdram-micron-mt46h32m32lf-6.h" #include "twl4030-generic-scripts.h" arch/arm/mach-omap2/board-rx51.c +1
-1@@ -28,7 +28,7 @@#include <mach/keypad.h> #include <mach/dma.h> #include <mach/gpmc.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <asm/io.h> #include <asm/delay.h> arch/arm/plat-omap/include/mach/usb-musb.h deleted +0
-35@@ -1,35 +0,0 @@ -/* -* arch/arm/plat-omap/include/mach/usb-musb.h -* -* Hardware definitions for Mentor Graphics MUSBMHDRC. -* -* Initial creation by Felipe Balbi. -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -* -* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ASM_ARCH_OMAP_USB_MUSB_H -#define __ASM_ARCH_OMAP_USB_MUSB_H - -extern void usb_musb_init (void ); - -#endif /* __ASM_ARCH_OMAP_USB_MUSB_H */ -arch/arm/plat-omap/include/mach/usb.h +0
-0
arch/arm/plat-omap/include/mach/usb.h line 31
Quoted 7 lines
arch/arm/plat-omap/include/mach/usb.h +2
-2@@ -27,8 +27,8 @@#define UDC_BASE OMAP2_UDC_BASE#define OMAP_OHCI_BASE OMAP2_OHCI_BASE -void __init usb_musb_init (void ); -void __init usb_ehci_init (void ); +extern void usb_musb_init (void ); +extern void usb_ehci_init (void );
This second line has nothing to with musb, right ? You should move to usb-ehci.h removal patch.
Signature · 1 line
balbi
Re: [PATCH 3/3] musb_hdrc: Build usb-musb based on config entry, clean-up Makefile
In reply to Tony LindgrenQuoted 5 lines · Tony Lindgren
Build usb-musb based on config entry, clean-up
MakefileCc Felipe Balbi <[email protected]>Cc David Brownell <[email protected]>Signed-off-by Tony Lindgren <[email protected]>
Makes sense to me
Quoted 121 lines
--- arch/arm/mach-omap2/Makefile | 17 ++++++----------- arch/arm/mach-omap2/usb-musb.c | 7 ------- arch/arm/plat-omap/include/mach/usb.h | 7 +++++++ 3 files changed, 13 insertions(+), 18 deletions(-)arch/arm/mach-omap2/Makefile +6
-11@@ -44,27 +44,24 @@ obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o board-h4-mmc.o obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o \ board-2430sdp-flash.o \ mmc-twl4030.o \ - usb-musb.o \ usb-ehci.o obj-$(CONFIG_MACH_OMAP2EVM) += board-omap2evm.o \ mmc-twl4030.o obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o \ mmc-twl4030.o \ - usb-musb.o \ usb-ehci.o \ board-3430sdp-flash.o obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o \ mmc-twl4030.o \ - usb-musb.o usb-ehci.o \ + usb-ehci.o \ board-omap3evm-flash.o \ twl4030-generic-scripts.o obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o \ - usb-musb.o usb-ehci.o \ + usb-ehci.o \ mmc-twl4030.o \ twl4030-generic-scripts.o obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o \ - mmc-twl4030.o \ - usb-musb.o + mmc-twl4030.o obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o \ board-apollon-mmc.o \ board-apollon-keys.o@@ -80,19 +77,17 @@ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ board-rx51-sdram.o \ board-rx51-video.o \ board-rx51-peripherals.o \ - mmc-twl4030.o \ - usb-musb.o + mmc-twl4030.o obj-$(CONFIG_MACH_OVERO) += board-overo.o \ mmc-twl4030.o \ - usb-musb.o \ usb-ehci.o \ twl4030-generic-scripts.o obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o \ mmc-twl4030.o \ - usb-musb.o \ usb-ehci.o -# TUSB 6010 chips +# Platform specific device init code +obj-$(CONFIG_USB_MUSB_SOC) += usb-musb.o obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.oarch/arm/mach-omap2/usb-musb.c +0
-7@@ -33,7 +33,6 @@#include <mach/mux.h> #include <mach/usb.h> -#ifdef CONFIG_USB_MUSB_SOCstatic struct resource musb_resources[] = { [0 ] = {/* start and end set dynamically */ .flags =IORESOURCE_MEM ,@@ -146,13 +145,9 @@ static struct platform_device musb_device = { .num_resources = ARRAY_SIZE(musb_resources), .resource = musb_resources, }; -#endif -void __init usb_musb_init (void ) { -#ifdef CONFIG_USB_MUSB_SOC -if (cpu_is_omap243x ()) { musb_resources[0 ].start =OMAP243X_HS_BASE ; musb_plat.clock ="usbhs_ick" ;@@ -167,6 +162,4 @@ void __init usb_musb_init(void)printk (KERN_ERR "Unable to register HS-USB (MUSB) device\n" );return ; } -#endif } -arch/arm/plat-omap/include/mach/usb.h +7
-1@@ -27,7 +27,14 @@#define UDC_BASE OMAP2_UDC_BASE#define OMAP_OHCI_BASE OMAP2_OHCI_BASE +#ifdef CONFIG_USB_MUSB_SOC extern void usb_musb_init (void ); +#else +static inline void usb_musb_init (void ) +{ +} +#endif +extern void usb_ehci_init (void );#endif --To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
balbi
Quoted 10 lines · Tony Lindgren
Quoted 6 lines · Tony Lindgren
Hi Felipe & Dave,
While creating a patch for
usb-musb.cinit code for mainline kernel, I ended up cleaning up following stuff in the l-o tree.Does it look OK to you?
And here's what the
musb_initpatch for the mainline. No boards are callingmusb_init()yet, but that's easy to append.
The attached patch looks nice as well.
Quoted 3 lines
The clock function might cause some merge issues.. I guess eventually the driver should just call clk_enable/disable once the omap2 clock merge is done.
Yeah, hopefully Russell's work will let us get rid of this musb_set_clock and use only standard clk_enable/disable() calls.
We only keep that due to different clock names anyway.
Signature · 1 line
balbi
Tony Lindgren
maintainerRe: [PATCH 2/3] musb_hdrc: Clean-up MUSB init code for next merge window
In reply to Felipe BalbiQuoted 173 lines · Felipe Balbi
Quoted 172 lines · Tony Lindgren
Let's just use
mach/usb.hasmach/musb.honly has one entry.Cc Felipe Balbi <[email protected]>Cc David Brownell <[email protected]>Signed-off-by Tony Lindgren <[email protected]>--- arch/arm/mach-omap2/board-2430sdp.c | 2 +- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/board-ldp.c | 2 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3evm.c | 2 +- arch/arm/mach-omap2/board-omap3pandora.c | 2 +- arch/arm/mach-omap2/board-overo.c | 2 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/plat-omap/include/mach/usb-musb.h | 35 ---------------------------- arch/arm/plat-omap/include/mach/usb.h | 4 ++- 10 files changed, 10 insertions(+), 45 deletions(-) delete mode 100644 arch/arm/plat-omap/include/mach/usb-musb.harch/arm/mach-omap2/board-2430sdp.c +1
-1@@ -36,7 +36,7 @@#include <mach/gpio.h> #include <mach/mux.h> #include <mach/board.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/common.h> #include <mach/gpmc.h> #include <mach/mcspi.h> arch/arm/mach-omap2/board-3430sdp.c +1
-1@@ -34,7 +34,7 @@#include <mach/gpio.h> #include <mach/mux.h> #include <mach/board.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/usb-ehci.h> #include <mach/common.h> #include <mach/dma.h> arch/arm/mach-omap2/board-ldp.c +1
-1@@ -35,7 +35,7 @@#include <mach/board.h> #include <mach/common.h> #include <mach/gpmc.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <asm/io.h> #include <asm/delay.h> arch/arm/mach-omap2/board-omap3beagle.c +1
-1@@ -38,7 +38,7 @@#include <asm/mach/flash.h> #include <mach/board.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/usb-ehci.h> #include <mach/common.h> #include <mach/gpmc.h> arch/arm/mach-omap2/board-omap3evm.c +1
-1@@ -31,7 +31,7 @@#include <mach/gpio.h> #include <mach/board.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/usb-ehci.h> #include <mach/common.h> #include <mach/mcspi.h> arch/arm/mach-omap2/board-omap3pandora.c +1
-1@@ -45,7 +45,7 @@#include <mach/hardware.h> #include <mach/nand.h> #include <mach/usb-ehci.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <mach/mcspi.h> #include "sdram-micron-mt46h32m32lf-6.h" arch/arm/mach-omap2/board-overo.c +1
-1@@ -46,7 +46,7 @@#include <mach/hardware.h> #include <mach/nand.h> #include <mach/usb-ehci.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include "sdram-micron-mt46h32m32lf-6.h" #include "twl4030-generic-scripts.h" arch/arm/mach-omap2/board-rx51.c +1
-1@@ -28,7 +28,7 @@#include <mach/keypad.h> #include <mach/dma.h> #include <mach/gpmc.h> -#include <mach/usb-musb.h> +#include <mach/usb.h> #include <asm/io.h> #include <asm/delay.h> arch/arm/plat-omap/include/mach/usb-musb.h deleted +0
-35@@ -1,35 +0,0 @@ -/* -* arch/arm/plat-omap/include/mach/usb-musb.h -* -* Hardware definitions for Mentor Graphics MUSBMHDRC. -* -* Initial creation by Felipe Balbi. -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -* -* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED -* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef __ASM_ARCH_OMAP_USB_MUSB_H -#define __ASM_ARCH_OMAP_USB_MUSB_H - -extern void usb_musb_init (void ); - -#endif /* __ASM_ARCH_OMAP_USB_MUSB_H */ -arch/arm/plat-omap/include/mach/usb.h +0
-0@@ -27,8 +27,8 @@#define UDC_BASE OMAP2_UDC_BASE#define OMAP_OHCI_BASE OMAP2_OHCI_BASE
Quoted 7 lines
arch/arm/plat-omap/include/mach/usb.h line 31
Quoted 4 lines
arch/arm/plat-omap/include/mach/usb.h +2
-2-void __init usb_musb_init (void ); -void __init usb_ehci_init (void ); +extern void usb_musb_init (void ); +extern void usb_ehci_init (void );This second line has nothing to with musb, right ? You should move to
usb-ehci.hremoval patch.
OK, good point, I'll get rid of usb-ehci.h as well then.
Tony
Quoted 4 lines · Tony Lindgren
While creating a patch for
usb-musb.cinit code for mainline kernel, I ended up cleaning up following stuff in the l-o tree.Does it look OK to you?
It all looked fine to me.
Quoted 3 lines · Tony Lindgren
And here's what the
musb_initpatch for the mainline. No boards are callingmusb_init()yet, but that's easy to append.
Looks fair to me -- though I didn't try it.