]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: OMAP: move OMAP USB platform data to <linux/platform_data/omap-usb.h>
authorFelipe Balbi <balbi@ti.com>
Wed, 24 Oct 2012 21:26:19 +0000 (14:26 -0700)
committerTony Lindgren <tony@atomide.com>
Wed, 24 Oct 2012 21:26:55 +0000 (14:26 -0700)
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 <linux/platform_data/omap-usb.h>
and add a minimal drivers/mfd/usb-omap.h.

Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Partha Basak <parthab@india.ti.com>
Cc: Keshava Munegowda <keshava_mgowda@ti.com>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Felipe Balbi <balbi@ti.com>
[tony@atomide.com: updated for local mfd/usb-omap.h]
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 files changed:
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-am3517evm.c
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/board-ti8168evm.c
arch/arm/mach-omap2/usb-tusb6010.c
arch/arm/mach-omap2/usb.h
drivers/mfd/omap-usb-host.c
drivers/mfd/omap-usb-tll.c
drivers/mfd/omap-usb.h [new file with mode: 0644]
drivers/usb/host/ehci-omap.c
drivers/usb/host/ohci-omap3.c
drivers/usb/musb/am35x.c
drivers/usb/musb/musb_dsps.c
drivers/usb/musb/omap2430.h
include/linux/platform_data/usb-omap.h [moved from arch/arm/plat-omap/include/plat/usb.h with 56% similarity]

index 5700fc5b77a242984543ca9ce44074bdf0e904d6..52534ba3398434afcf7c2f5c29eaa931f75e85bf 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/leds.h>
 #include <linux/leds_pwm.h>
 #include <linux/platform_data/omap4-keypad.h>
+#include <linux/usb/musb.h>
 
 #include <asm/hardware/gic.h>
 #include <asm/mach-types.h>
index 0dbeb77aad68b286abf545a350dcf81586509b8e..96d6c5ab5d4c8cfb109ff4c6bece4e17ef712879 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/can/platform/ti_hecc.h>
 #include <linux/davinci_emac.h>
 #include <linux/mmc/host.h>
+#include <linux/usb/musb.h>
 #include <linux/platform_data/gpio-omap.h>
 
 #include "am35xx.h"
index 6e7e69bf5c7eb3b1200b151f89b6ce4400308fac..a22a5b61db49f98a63e367a1caa000cf0f655509 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/spi/ads7846.h>
 #include <linux/i2c/twl.h>
 #include <linux/usb/otg.h>
+#include <linux/usb/musb.h>
 #include <linux/usb/nop-usb-xceiv.h>
 #include <linux/smsc911x.h>
 
index 74e39bbb3ca3712b018399ba0df0d51590efe9c4..3f0b92afd9572e9f40f801b92f1e94e531f77c06 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/regulator/machine.h>
 #include <linux/regulator/fixed.h>
 #include <linux/ti_wilink_st.h>
+#include <linux/usb/musb.h>
 #include <linux/wl12xx.h>
 #include <linux/platform_data/omap-abe-twl6040.h>
 
index 8c4d27ef160b36b8b2a89dd7d3c035c7e1e107f8..c2f8f6c16b8f5164139785d1fa9a58221ade851b 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/gpio.h>
 #include <linux/leds.h>
+#include <linux/usb/musb.h>
 #include <linux/platform_data/spi-omap2-mcspi.h>
 
 #include <asm/mach-types.h>
index 4977c77ce22331715cc42840174aed199b8be7fb..5e672c2b6a437d37db67a777e12de5979b59c5aa 100644 (file)
@@ -14,6 +14,8 @@
  */
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/platform_device.h>
+#include <linux/usb/musb.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
index 805bea6edf1711adf0de68e8f68318bdd4c44b80..5e2428989c1382a1c851e383a4dda301f5b570db 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
 #include <linux/export.h>
+#include <linux/platform_data/usb-omap.h>
 
 #include <linux/usb/musb.h>
 
index b2c4ff15557eb7521454b669e85e7ebf63170d7e..9b986ead7c45c64d4c34407f2ca80eacfc8a4861 100644 (file)
@@ -1,4 +1,4 @@
-#include <plat/usb.h>
+#include <linux/platform_data/usb-omap.h>
 
 /* AM35x */
 /* USB 2.0 PHY Control */
index 23cec57c02ba9d7e995900ce5d66e1d4e3704bb7..cebfe0a68aa7666f0749412741f803d3867eb425 100644 (file)
 #include <linux/spinlock.h>
 #include <linux/gpio.h>
 #include <plat/cpu.h>
-#include <plat/usb.h>
+#include <linux/platform_device.h>
+#include <linux/platform_data/usb-omap.h>
 #include <linux/pm_runtime.h>
 
+#include "omap-usb.h"
+
 #define USBHS_DRIVER_NAME      "usbhs_omap"
 #define OMAP_EHCI_DEVICE       "ehci-omap"
 #define OMAP_OHCI_DEVICE       "ohci-omap3"
index 4b7757b8430195dbb8683cab2e21b3d3ca51b738..0db0dfa3d08c312c89d760e199e59692e3cf1550 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/err.h>
-#include <plat/usb.h>
 #include <linux/pm_runtime.h>
+#include <linux/platform_data/usb-omap.h>
 
 #define USBTLL_DRIVER_NAME     "usbhs_tll"
 
diff --git a/drivers/mfd/omap-usb.h b/drivers/mfd/omap-usb.h
new file mode 100644 (file)
index 0000000..972aa96
--- /dev/null
@@ -0,0 +1,2 @@
+extern int omap_tll_enable(void);
+extern int omap_tll_disable(void);
index d7fe287d067803e484d56efdf53060546634ea1e..0d5ac36fdf47aab8dec5cf96e082ac48ad1e0f65 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/usb/ulpi.h>
-#include <plat/usb.h>
 #include <linux/regulator/consumer.h>
 #include <linux/pm_runtime.h>
 #include <linux/gpio.h>
 #include <linux/clk.h>
 
+#include <linux/platform_data/usb-omap.h>
+
 /* EHCI Register Set */
 #define EHCI_INSNREG04                                 (0xA0)
 #define EHCI_INSNREG04_DISABLE_UNSUSPEND               (1 << 5)
index 1b8133b6e451a7a30965eae265a4106c3050521f..bd7803dce9bed70e2d9802dfe9c8a508e5959752 100644 (file)
@@ -30,7 +30,6 @@
  */
 
 #include <linux/platform_device.h>
-#include <plat/usb.h>
 #include <linux/pm_runtime.h>
 
 /*-------------------------------------------------------------------------*/
index c964d6af178bd0196e20a80bd482529c38369900..a87cdd2387cf5dc1f8b44834585b032a5940c843 100644 (file)
@@ -34,8 +34,7 @@
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/usb/nop-usb-xceiv.h>
-
-#include <plat/usb.h>
+#include <linux/platform_data/usb-omap.h>
 
 #include "musb_core.h"
 
index 444346e1e10d768086b1e10487f6b6428c892897..a67af21c1460125c5bb1eb23dd4ced8552973c4a 100644 (file)
 #include <linux/pm_runtime.h>
 #include <linux/module.h>
 #include <linux/usb/nop-usb-xceiv.h>
+#include <linux/platform_data/usb-omap.h>
 
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/of_address.h>
 
-#include <plat/usb.h>
-
 #include "musb_core.h"
 
 #ifdef CONFIG_OF
index b85f3973e78c372061221a9e4e75852af5944629..8ef656659fcbdbf9d3d98854ce76c880e1414fb1 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef __MUSB_OMAP243X_H__
 #define __MUSB_OMAP243X_H__
 
-#include <plat/usb.h>
+#include <linux/platform_data/usb-omap.h>
 
 /*
  * OMAP2430-specific definitions
similarity index 56%
rename from arch/arm/plat-omap/include/plat/usb.h
rename to include/linux/platform_data/usb-omap.h
index 1dd6522a0eddd657233ac630b395bf6cf44c8a24..8570bcfe6311470cfa32ec14ce17175c7c0ffe77 100644 (file)
@@ -1,11 +1,23 @@
-// include/asm-arm/mach-omap/usb.h
-
-#ifndef        __ASM_ARCH_OMAP_USB_H
-#define        __ASM_ARCH_OMAP_USB_H
-
-#include <linux/io.h>
-#include <linux/platform_device.h>
-#include <linux/usb/musb.h>
+/*
+ * 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
+};