From e8c4a7acc9ec0ee82feedcdc3c6d0ee44d67918a Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Wed, 24 Oct 2012 14:26:19 -0700 Subject: [PATCH] ARM: OMAP: move OMAP USB platform data to In order to make single zImage work for ARM architecture, we need to make sure we don't depend on private headers. Move USB platform_data to and add a minimal drivers/mfd/usb-omap.h. Cc: Samuel Ortiz Cc: Alan Stern Cc: Greg Kroah-Hartman Cc: Partha Basak Cc: Keshava Munegowda Cc: linux-usb@vger.kernel.org Signed-off-by: Felipe Balbi [tony@atomide.com: updated for local mfd/usb-omap.h] Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-4430sdp.c | 1 + arch/arm/mach-omap2/board-am3517evm.c | 1 + arch/arm/mach-omap2/board-omap3evm.c | 1 + arch/arm/mach-omap2/board-omap4panda.c | 1 + arch/arm/mach-omap2/board-rx51.c | 1 + arch/arm/mach-omap2/board-ti8168evm.c | 2 + arch/arm/mach-omap2/usb-tusb6010.c | 1 + arch/arm/mach-omap2/usb.h | 2 +- drivers/mfd/omap-usb-host.c | 5 +- drivers/mfd/omap-usb-tll.c | 2 +- drivers/mfd/omap-usb.h | 2 + drivers/usb/host/ehci-omap.c | 3 +- drivers/usb/host/ohci-omap3.c | 1 - drivers/usb/musb/am35x.c | 3 +- drivers/usb/musb/musb_dsps.c | 3 +- drivers/usb/musb/omap2430.h | 2 +- .../linux/platform_data/usb-omap.h | 47 +++++++++++-------- 17 files changed, 48 insertions(+), 30 deletions(-) create mode 100644 drivers/mfd/omap-usb.h rename arch/arm/plat-omap/include/plat/usb.h => include/linux/platform_data/usb-omap.h (56%) diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 5700fc5b77a2..52534ba33984 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 0dbeb77aad68..96d6c5ab5d4c 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "am35xx.h" diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 6e7e69bf5c7e..a22a5b61db49 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 74e39bbb3ca3..3f0b92afd957 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index 8c4d27ef160b..c2f8f6c16b8f 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c index 4977c77ce223..5e672c2b6a43 100644 --- a/arch/arm/mach-omap2/board-ti8168evm.c +++ b/arch/arm/mach-omap2/board-ti8168evm.c @@ -14,6 +14,8 @@ */ #include #include +#include +#include #include #include diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c index 805bea6edf17..5e2428989c13 100644 --- a/arch/arm/mach-omap2/usb-tusb6010.c +++ b/arch/arm/mach-omap2/usb-tusb6010.c @@ -15,6 +15,7 @@ #include #include #include +#include #include diff --git a/arch/arm/mach-omap2/usb.h b/arch/arm/mach-omap2/usb.h index b2c4ff15557e..9b986ead7c45 100644 --- a/arch/arm/mach-omap2/usb.h +++ b/arch/arm/mach-omap2/usb.h @@ -1,4 +1,4 @@ -#include +#include /* AM35x */ /* USB 2.0 PHY Control */ diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index 23cec57c02ba..cebfe0a68aa7 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c @@ -26,9 +26,12 @@ #include #include #include -#include +#include +#include #include +#include "omap-usb.h" + #define USBHS_DRIVER_NAME "usbhs_omap" #define OMAP_EHCI_DEVICE "ehci-omap" #define OMAP_OHCI_DEVICE "ohci-omap3" diff --git a/drivers/mfd/omap-usb-tll.c b/drivers/mfd/omap-usb-tll.c index 4b7757b84301..0db0dfa3d08c 100644 --- a/drivers/mfd/omap-usb-tll.c +++ b/drivers/mfd/omap-usb-tll.c @@ -25,8 +25,8 @@ #include #include #include -#include #include +#include #define USBTLL_DRIVER_NAME "usbhs_tll" diff --git a/drivers/mfd/omap-usb.h b/drivers/mfd/omap-usb.h new file mode 100644 index 000000000000..972aa961b064 --- /dev/null +++ b/drivers/mfd/omap-usb.h @@ -0,0 +1,2 @@ +extern int omap_tll_enable(void); +extern int omap_tll_disable(void); diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index d7fe287d0678..0d5ac36fdf47 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -39,12 +39,13 @@ #include #include #include -#include #include #include #include #include +#include + /* EHCI Register Set */ #define EHCI_INSNREG04 (0xA0) #define EHCI_INSNREG04_DISABLE_UNSUSPEND (1 << 5) diff --git a/drivers/usb/host/ohci-omap3.c b/drivers/usb/host/ohci-omap3.c index 1b8133b6e451..bd7803dce9be 100644 --- a/drivers/usb/host/ohci-omap3.c +++ b/drivers/usb/host/ohci-omap3.c @@ -30,7 +30,6 @@ */ #include -#include #include /*-------------------------------------------------------------------------*/ diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c index c964d6af178b..a87cdd2387cf 100644 --- a/drivers/usb/musb/am35x.c +++ b/drivers/usb/musb/am35x.c @@ -34,8 +34,7 @@ #include #include #include - -#include +#include #include "musb_core.h" diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 444346e1e10d..a67af21c1460 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -38,13 +38,12 @@ #include #include #include +#include #include #include #include -#include - #include "musb_core.h" #ifdef CONFIG_OF diff --git a/drivers/usb/musb/omap2430.h b/drivers/usb/musb/omap2430.h index b85f3973e78c..8ef656659fcb 100644 --- a/drivers/usb/musb/omap2430.h +++ b/drivers/usb/musb/omap2430.h @@ -10,7 +10,7 @@ #ifndef __MUSB_OMAP243X_H__ #define __MUSB_OMAP243X_H__ -#include +#include /* * OMAP2430-specific definitions diff --git a/arch/arm/plat-omap/include/plat/usb.h b/include/linux/platform_data/usb-omap.h similarity index 56% rename from arch/arm/plat-omap/include/plat/usb.h rename to include/linux/platform_data/usb-omap.h index 1dd6522a0edd..8570bcfe6311 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/include/linux/platform_data/usb-omap.h @@ -1,11 +1,23 @@ -// include/asm-arm/mach-omap/usb.h - -#ifndef __ASM_ARCH_OMAP_USB_H -#define __ASM_ARCH_OMAP_USB_H - -#include -#include -#include +/* + * usb-omap.h - Platform data for the various OMAP USB IPs + * + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com + * + * This software is distributed under the terms of the GNU General Public + * License ("GPL") version 2, as published by the Free Software Foundation. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR CONTRIBUTORS 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. + */ #define OMAP3_HS_USB_PORTS 3 @@ -26,7 +38,9 @@ enum usbhs_omap_port_mode { OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM }; -#ifdef CONFIG_ARCH_OMAP2PLUS +struct usbtll_omap_platform_data { + enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; +}; struct ehci_hcd_omap_platform_data { enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; @@ -47,9 +61,6 @@ struct usbhs_omap_platform_data { struct ohci_hcd_omap_platform_data *ohci_data; }; -struct usbtll_omap_platform_data { - enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS]; -}; /*-------------------------------------------------------------------------*/ struct omap_musb_board_data { @@ -63,11 +74,7 @@ struct omap_musb_board_data { void (*reset)(void); }; -enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI}; - -extern int omap_tll_enable(void); -extern int omap_tll_disable(void); - -#endif - -#endif /* __ASM_ARCH_OMAP_USB_H */ +enum musb_interface { + MUSB_INTERFACE_ULPI, + MUSB_INTERFACE_UTMI +}; -- 2.30.2