Merge branch 'depends/omap-cleanup-headers-usb' into next/headers
authorOlof Johansson <olof@lixom.net>
Mon, 5 Nov 2012 18:27:09 +0000 (10:27 -0800)
committerOlof Johansson <olof@lixom.net>
Mon, 5 Nov 2012 18:27:33 +0000 (10:27 -0800)
Conflicts resolved same as Tony did in his later dependent branch:

arch/arm/mach-omap1/clock.c
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/board-omap3logic.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-rm680.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/twl-common.c
arch/arm/mach-omap2/usb-host.c
arch/arm/mach-omap2/usb-musb.c

Signed-off-by: Olof Johansson <olof@lixom.net>
42 files changed:
arch/arm/mach-omap1/clock.c
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-3630sdp.c
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-am3517crane.c
arch/arm/mach-omap2/board-am3517evm.c
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-cm-t3517.c
arch/arm/mach-omap2/board-devkit8000.c
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-omap3logic.c
arch/arm/mach-omap2/board-omap3pandora.c
arch/arm/mach-omap2/board-omap3stalker.c
arch/arm/mach-omap2/board-omap3touchbook.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-rm680.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/board-ti8168evm.c
arch/arm/mach-omap2/board-zoom-peripherals.c
arch/arm/mach-omap2/board-zoom.c
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/omap_phy_internal.c
arch/arm/mach-omap2/twl-common.c
arch/arm/mach-omap2/usb-host.c
arch/arm/mach-omap2/usb-musb.c
arch/arm/mach-omap2/usb-tusb6010.c
arch/arm/mach-omap2/usb.h [new file with mode: 0644]
arch/arm/plat-omap/include/plat/usb.h [deleted file]
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 [new file with mode: 0644]

index 9e74aa664acb1cfd20c785577995c245db640865..931f3f6d396b368aacf088431c1a0060c9b3b8ed 100644 (file)
 
 #include <asm/mach-types.h>
 
-#include "soc.h"
-#include <plat/usb.h>
-
 #include <mach/hardware.h>
 
 #include "../plat-omap/sram.h"
 
+#include "soc.h"
 #include "iomap.h"
 #include "clock.h"
 #include "opp.h"
index 49e49d0b7cf5a8dc7ce7d308762cf3143f532a5a..3fc6d839fb3a900b47087468eb93cca4433c5a2d 100644 (file)
@@ -35,7 +35,6 @@
 
 #include "common.h"
 #include "gpmc.h"
-#include <plat/usb.h>
 #include "gpmc-smc91x.h"
 
 #include <video/omapdss.h>
index d2a419fcfce33fb782bcdc3b0f89c9aaf8888b8a..79fd9048fd7952d1acc1aff141205e322fb49119 100644 (file)
@@ -30,7 +30,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/usb.h>
 #include "common.h"
 #include <plat-omap/dma-omap.h>
 #include <video/omapdss.h>
index f1df60102a65f050be68d7741048a2bfc70cca85..81871b1c735cd3193358925cb52f1847395eca92 100644 (file)
@@ -18,7 +18,6 @@
 
 #include "common.h"
 #include "gpmc-smc91x.h"
-#include <plat/usb.h>
 
 #include "board-zoom.h"
 
index 2ab267ec3b75e8922e2895a9e001267c27d18e32..fd80d976872dfc2dfc8ce3d7621c239ae6f1f81c 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>
@@ -34,7 +35,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 #include "omap4-keypad.h"
 #include <video/omapdss.h>
 #include <video/omap-panel-nokia-dsi.h>
index 318feadb1d6e7ed4f6df2f6a9b152969a2d0f286..603503c587b77be41e8e4b3df60a6763d479ad31 100644 (file)
@@ -26,7 +26,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 
 #include "am35xx-emac.h"
 #include "mux.h"
index e16289755f2e39b98674f8a10654c9805950c7d3..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"
@@ -33,7 +34,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 #include <video/omapdss.h>
 #include <video/omap-panel-generic-dpi.h>
 #include <video/omap-panel-tfp410.h>
index 73e2ba9b343ba41b1c7ac74bb57d6cd182a37a3c..cf9449bde1865689b22faf21bf581836ac06bde3 100644 (file)
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include "common.h"
 #include <linux/platform_data/mtd-nand-omap2.h>
-#include "gpmc.h"
-#include <plat/usb.h>
 #include <video/omapdss.h>
 #include <video/omap-panel-generic-dpi.h>
 #include <video/omap-panel-tfp410.h>
 
 #include <mach/hardware.h>
 
+#include "common.h"
 #include "mux.h"
 #include "sdram-micron-mt46h32m32lf-6.h"
 #include "hsmmc.h"
 #include "common-board-devices.h"
+#include "gpmc.h"
 #include "gpmc-nand.h"
 
 #define CM_T35_GPIO_PENDOWN            57
index b5495e41502469bfc662bed017d6400553682f1f..278664731d2cd5506005eae3c8c471fe1c84ea4a 100644 (file)
@@ -39,7 +39,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 #include <linux/platform_data/mtd-nand-omap2.h>
 #include "gpmc.h"
 
index 3eedb8fd037040ba806dcb7120547e563d6f1c24..933479e36737c2cec7c189765b43e08de6181097 100644 (file)
@@ -41,7 +41,6 @@
 #include "common.h"
 #include "gpmc.h"
 #include <linux/platform_data/mtd-nand-omap2.h>
-#include <plat/usb.h>
 #include <video/omapdss.h>
 #include <video/omap-panel-generic-dpi.h>
 #include <video/omap-panel-tfp410.h>
index 9a9a9b5f78b6362cdea5347a0e035d8f69749cf7..dbc705ac4334222d6da12754871ad4feef100ae9 100644 (file)
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
-#include "common.h"
-#include "gpmc.h"
-#include <plat/usb.h>
-
 #include <video/omapdss.h>
 #include <video/omap-panel-tfp410.h>
 #include <linux/platform_data/mtd-onenand-omap2.h>
 
+#include "common.h"
+#include "gpmc.h"
 #include "mux.h"
 #include "hsmmc.h"
 #include "sdram-numonyx-m65kxxxxam.h"
index 35ee018d9289603484ec4d3fc34ca78c93315732..1164b1061038156a80089b9178b61bdb863374e4 100644 (file)
@@ -35,9 +35,8 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include "gpmc.h"
 #include "board-zoom.h"
-#include <plat/usb.h>
+#include "gpmc.h"
 #include "gpmc-smsc911x.h"
 
 #include <video/omapdss.h>
index a5497ce0a6c80e5fc6eb1782f1cc02f4104da925..85c09a09c5e38d8936f7a31376c30000e915152e 100644 (file)
 #include <asm/mach/map.h>
 #include <asm/mach/flash.h>
 
-#include "common.h"
 #include <video/omapdss.h>
 #include <video/omap-panel-tfp410.h>
-#include "gpmc.h"
 #include <linux/platform_data/mtd-nand-omap2.h>
-#include <plat/usb.h>
-#include "omap_device.h"
 
+#include "common.h"
+#include "omap_device.h"
+#include "gpmc.h"
 #include "soc.h"
 #include "mux.h"
 #include "hsmmc.h"
index 8479779fd346ad7809f97149dcfab426a64bb7ea..3c0b9a90f3b339d795b47f7e958bb671eb31ed5e 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>
 
@@ -45,7 +46,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/usb.h>
 #include <linux/platform_data/mtd-nand-omap2.h>
 #include "common.h"
 #include <linux/platform_data/spi-omap2-mcspi.h>
index 6f58cad5bf740fadcda81925f754fd467625418b..e84e2a875378134aaae80b8416c7edc9aea76aa5 100644 (file)
@@ -34,8 +34,6 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
-#include <plat/usb.h>
-
 #include "common.h"
 #include "mux.h"
 #include "hsmmc.h"
index f286b4b4bd5bd5dfa6ee6c5859a262c8c833a886..ce31bd329f380d6687c2c0b4f9146002890886de 100644 (file)
@@ -42,7 +42,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 #include <video/omapdss.h>
 #include <linux/platform_data/mtd-nand-omap2.h>
 
index 3c83b9fbff4558f65cb5575b510b53899c149086..ba1124538b9c3f8c2cc7e5b1b8a54e111cc0116d 100644 (file)
@@ -42,7 +42,6 @@
 #include "common.h"
 #include "gpmc.h"
 #include <linux/platform_data/mtd-nand-omap2.h>
-#include <plat/usb.h>
 #include <video/omapdss.h>
 #include <video/omap-panel-generic-dpi.h>
 #include <video/omap-panel-tfp410.h>
index cd282ae0856b619933474fc68a179aa319062f58..a225d819633fd2a3b7a8231332d65da04cf35341 100644 (file)
@@ -46,7 +46,6 @@
 #include "common.h"
 #include "gpmc.h"
 #include <linux/platform_data/mtd-nand-omap2.h>
-#include <plat/usb.h>
 
 #include "mux.h"
 #include "hsmmc.h"
index e9ce9fb9ffaccfdcb0d6bcfead798a6746e4591b..8c00b99cd2a315821f1784c6891b9065385a5b66 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>
 
 #include <asm/mach/map.h>
 #include <video/omapdss.h>
 
-#include "common.h"
-#include <plat/usb.h>
 #include <video/omap-panel-tfp410.h>
 
+#include "common.h"
 #include "soc.h"
 #include "mmc.h"
 #include "hsmmc.h"
index 3a9d1fa8bebdcac42ff3870450ffe9a52e4c11e4..1cfb0374f5e27e3564d06a4ef47ed931e875abb9 100644 (file)
 #include <video/omapdss.h>
 #include <video/omap-panel-generic-dpi.h>
 #include <video/omap-panel-tfp410.h>
-#include "gpmc.h"
-#include <plat/usb.h>
 
+#include "common.h"
 #include "mux.h"
 #include "sdram-micron-mt46h32m32lf-6.h"
+#include "gpmc.h"
 #include "hsmmc.h"
 #include "board-flash.h"
 #include "common-board-devices.h"
index d0a33130aaaf0113695eb1ff59f27c6b57936e24..1997e0e722a1551d2d13b97f1c706d942a86c9ea 100644 (file)
 #include <asm/mach/arch.h>
 #include <asm/mach-types.h>
 
-#include <plat/usb.h>
-#include "gpmc.h"
 #include "common.h"
-
 #include "mux.h"
+#include "gpmc.h"
 #include "mmc.h"
 #include "hsmmc.h"
 #include "sdram-nokia.h"
index 63b33c63bd94c418a1304175f602c4ba37cadd5b..c388aec14799ae68cc2bd8086b8e45c4beef5be6 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>
@@ -24,7 +25,6 @@
 #include <asm/mach/map.h>
 
 #include <plat-omap/dma-omap.h>
-#include <plat/usb.h>
 
 #include "common.h"
 #include "mux.h"
index c4f8833b4c3c66a7eaa433622be930e7f5833f97..5e672c2b6a437d37db67a777e12de5979b59c5aa 100644 (file)
  */
 #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>
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 
 static struct omap_musb_board_data musb_board_data = {
        .set_phy_power  = ti81xx_musb_phy_power,
index 74ac565ca9d05a38bc78c4ca948bb1c3f3c32d0b..26e07addc9d72b1c5540c1020043d171fe00a211 100644 (file)
@@ -26,7 +26,6 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/usb.h>
 
 #include "board-zoom.h"
 
index 50e98795b09cb07436d282d0d987cb9b08fae991..8feb4d99b96d75deaac16392887e9eaf1801930d 100644 (file)
@@ -22,7 +22,6 @@
 #include <asm/mach/arch.h>
 
 #include "common.h"
-#include <plat/usb.h>
 
 #include "board-zoom.h"
 
index c85022ab22d559f73bc9836a2dd49ca895113461..c925c805969fd5997711655ef283f06adc6a9d5e 100644 (file)
@@ -39,6 +39,8 @@
 #include "i2c.h"
 #include "serial.h"
 
+#include "usb.h"
+
 #define OMAP_INTC_START                NR_IRQS
 
 #ifdef CONFIG_SOC_OMAP2420
index d992db8ff0b07481fe21f24b410f9771dd3cda83..4d76a3ca5bf3de373b08104bc1792e013671e835 100644 (file)
 #include <linux/io.h>
 #include <linux/err.h>
 #include <linux/usb.h>
-
-#include <plat/usb.h>
+#include <linux/usb/musb.h>
 
 #include "soc.h"
 #include "control.h"
+#include "usb.h"
 
 void am35x_musb_reset(void)
 {
index 1a0739d397f37181d1a7d4eb9da4facd666d3c5f..827f54a1dd1d6fdb0deff2549bcd0ef65aea12d2 100644 (file)
@@ -26,8 +26,6 @@
 #include <linux/regulator/machine.h>
 #include <linux/regulator/fixed.h>
 
-#include <plat/usb.h>
-
 #include "soc.h"
 #include "twl-common.h"
 #include "pm.h"
index 4fe67129643d31e51354edf006ff1a1302f8628f..d1dbe125b34fa343e5aab112f060429096045fbf 100644 (file)
 
 #include <asm/io.h>
 
-#include <plat/usb.h>
 #include "soc.h"
 #include "omap_device.h"
-
 #include "mux.h"
+#include "usb.h"
 
 #ifdef CONFIG_MFD_OMAP_USB_HOST
 
index 07f385a2900c1971f06e56c5283145aba1491cda..7b33b375fe77d0f816268b0ce0e8f2f189203d3f 100644 (file)
 #include <linux/io.h>
 #include <linux/usb/musb.h>
 
-#include <plat/usb.h>
 #include "omap_device.h"
-
 #include "soc.h"
 #include "mux.h"
+#include "usb.h"
 
 static struct musb_hdrc_config musb_config = {
        .multipoint     = 1,
index 6064425ed47bab595c2d641b72ad1956b7f56be5..a8795ff19e6deb6f415ee01b584fb0047e40e27b 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>
 
diff --git a/arch/arm/mach-omap2/usb.h b/arch/arm/mach-omap2/usb.h
new file mode 100644 (file)
index 0000000..9b986ea
--- /dev/null
@@ -0,0 +1,82 @@
+#include <linux/platform_data/usb-omap.h>
+
+/* AM35x */
+/* USB 2.0 PHY Control */
+#define CONF2_PHY_GPIOMODE     (1 << 23)
+#define CONF2_OTGMODE          (3 << 14)
+#define CONF2_NO_OVERRIDE      (0 << 14)
+#define CONF2_FORCE_HOST       (1 << 14)
+#define CONF2_FORCE_DEVICE     (2 << 14)
+#define CONF2_FORCE_HOST_VBUS_LOW (3 << 14)
+#define CONF2_SESENDEN         (1 << 13)
+#define CONF2_VBDTCTEN         (1 << 12)
+#define CONF2_REFFREQ_24MHZ    (2 << 8)
+#define CONF2_REFFREQ_26MHZ    (7 << 8)
+#define CONF2_REFFREQ_13MHZ    (6 << 8)
+#define CONF2_REFFREQ          (0xf << 8)
+#define CONF2_PHYCLKGD         (1 << 7)
+#define CONF2_VBUSSENSE                (1 << 6)
+#define CONF2_PHY_PLLON                (1 << 5)
+#define CONF2_RESET            (1 << 4)
+#define CONF2_PHYPWRDN         (1 << 3)
+#define CONF2_OTGPWRDN         (1 << 2)
+#define CONF2_DATPOL           (1 << 1)
+
+/* TI81XX specific definitions */
+#define USBCTRL0       0x620
+#define USBSTAT0       0x624
+
+/* TI816X PHY controls bits */
+#define TI816X_USBPHY0_NORMAL_MODE     (1 << 0)
+#define TI816X_USBPHY_REFCLK_OSC       (1 << 8)
+
+/* TI814X PHY controls bits */
+#define USBPHY_CM_PWRDN                (1 << 0)
+#define USBPHY_OTG_PWRDN       (1 << 1)
+#define USBPHY_CHGDET_DIS      (1 << 2)
+#define USBPHY_CHGDET_RSTRT    (1 << 3)
+#define USBPHY_SRCONDM         (1 << 4)
+#define USBPHY_SINKONDP                (1 << 5)
+#define USBPHY_CHGISINK_EN     (1 << 6)
+#define USBPHY_CHGVSRC_EN      (1 << 7)
+#define USBPHY_DMPULLUP                (1 << 8)
+#define USBPHY_DPPULLUP                (1 << 9)
+#define USBPHY_CDET_EXTCTL     (1 << 10)
+#define USBPHY_GPIO_MODE       (1 << 12)
+#define USBPHY_DPOPBUFCTL      (1 << 13)
+#define USBPHY_DMOPBUFCTL      (1 << 14)
+#define USBPHY_DPINPUT         (1 << 15)
+#define USBPHY_DMINPUT         (1 << 16)
+#define USBPHY_DPGPIO_PD       (1 << 17)
+#define USBPHY_DMGPIO_PD       (1 << 18)
+#define USBPHY_OTGVDET_EN      (1 << 19)
+#define USBPHY_OTGSESSEND_EN   (1 << 20)
+#define USBPHY_DATA_POLARITY   (1 << 23)
+
+struct usbhs_omap_board_data {
+       enum usbhs_omap_port_mode       port_mode[OMAP3_HS_USB_PORTS];
+
+       /* have to be valid if phy_reset is true and portx is in phy mode */
+       int     reset_gpio_port[OMAP3_HS_USB_PORTS];
+
+       /* Set this to true for ES2.x silicon */
+       unsigned                        es2_compatibility:1;
+
+       unsigned                        phy_reset:1;
+
+       /*
+        * Regulators for USB PHYs.
+        * Each PHY can have a separate regulator.
+        */
+       struct regulator                *regulator[OMAP3_HS_USB_PORTS];
+};
+
+extern void usb_musb_init(struct omap_musb_board_data *board_data);
+extern void usbhs_init(const struct usbhs_omap_board_data *pdata);
+
+extern void am35x_musb_reset(void);
+extern void am35x_musb_phy_power(u8 on);
+extern void am35x_musb_clear_irq(void);
+extern void am35x_set_mode(u8 musb_mode);
+extern void ti81xx_musb_phy_power(u8 on);
+
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h
deleted file mode 100644 (file)
index 87ee140..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-// 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>
-
-#define OMAP3_HS_USB_PORTS     3
-
-enum usbhs_omap_port_mode {
-       OMAP_USBHS_PORT_MODE_UNUSED,
-       OMAP_EHCI_PORT_MODE_PHY,
-       OMAP_EHCI_PORT_MODE_TLL,
-       OMAP_EHCI_PORT_MODE_HSIC,
-       OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0,
-       OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM,
-       OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0,
-       OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM,
-       OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0,
-       OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM,
-       OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0,
-       OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM,
-       OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0,
-       OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM
-};
-
-struct usbhs_omap_board_data {
-       enum usbhs_omap_port_mode       port_mode[OMAP3_HS_USB_PORTS];
-
-       /* have to be valid if phy_reset is true and portx is in phy mode */
-       int     reset_gpio_port[OMAP3_HS_USB_PORTS];
-
-       /* Set this to true for ES2.x silicon */
-       unsigned                        es2_compatibility:1;
-
-       unsigned                        phy_reset:1;
-
-       /*
-        * Regulators for USB PHYs.
-        * Each PHY can have a separate regulator.
-        */
-       struct regulator                *regulator[OMAP3_HS_USB_PORTS];
-};
-
-#ifdef CONFIG_ARCH_OMAP2PLUS
-
-struct ehci_hcd_omap_platform_data {
-       enum usbhs_omap_port_mode       port_mode[OMAP3_HS_USB_PORTS];
-       int                             reset_gpio_port[OMAP3_HS_USB_PORTS];
-       struct regulator                *regulator[OMAP3_HS_USB_PORTS];
-       unsigned                        phy_reset:1;
-};
-
-struct ohci_hcd_omap_platform_data {
-       enum usbhs_omap_port_mode       port_mode[OMAP3_HS_USB_PORTS];
-       unsigned                        es2_compatibility:1;
-};
-
-struct usbhs_omap_platform_data {
-       enum usbhs_omap_port_mode               port_mode[OMAP3_HS_USB_PORTS];
-
-       struct ehci_hcd_omap_platform_data      *ehci_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 {
-       u8      interface_type;
-       u8      mode;
-       u16     power;
-       unsigned extvbus:1;
-       void    (*set_phy_power)(u8 on);
-       void    (*clear_irq)(void);
-       void    (*set_mode)(u8 mode);
-       void    (*reset)(void);
-};
-
-enum musb_interface    {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
-
-extern void usb_musb_init(struct omap_musb_board_data *board_data);
-
-extern void usbhs_init(const struct usbhs_omap_board_data *pdata);
-extern int omap_tll_enable(void);
-extern int omap_tll_disable(void);
-
-extern int omap4430_phy_power(struct device *dev, int ID, int on);
-extern int omap4430_phy_set_clk(struct device *dev, int on);
-extern int omap4430_phy_init(struct device *dev);
-extern int omap4430_phy_exit(struct device *dev);
-extern int omap4430_phy_suspend(struct device *dev, int suspend);
-
-#endif
-
-extern void am35x_musb_reset(void);
-extern void am35x_musb_phy_power(u8 on);
-extern void am35x_musb_clear_irq(void);
-extern void am35x_set_mode(u8 musb_mode);
-extern void ti81xx_musb_phy_power(u8 on);
-
-/* AM35x */
-/* USB 2.0 PHY Control */
-#define CONF2_PHY_GPIOMODE     (1 << 23)
-#define CONF2_OTGMODE          (3 << 14)
-#define CONF2_NO_OVERRIDE      (0 << 14)
-#define CONF2_FORCE_HOST       (1 << 14)
-#define CONF2_FORCE_DEVICE     (2 << 14)
-#define CONF2_FORCE_HOST_VBUS_LOW (3 << 14)
-#define CONF2_SESENDEN         (1 << 13)
-#define CONF2_VBDTCTEN         (1 << 12)
-#define CONF2_REFFREQ_24MHZ    (2 << 8)
-#define CONF2_REFFREQ_26MHZ    (7 << 8)
-#define CONF2_REFFREQ_13MHZ    (6 << 8)
-#define CONF2_REFFREQ          (0xf << 8)
-#define CONF2_PHYCLKGD         (1 << 7)
-#define CONF2_VBUSSENSE                (1 << 6)
-#define CONF2_PHY_PLLON                (1 << 5)
-#define CONF2_RESET            (1 << 4)
-#define CONF2_PHYPWRDN         (1 << 3)
-#define CONF2_OTGPWRDN         (1 << 2)
-#define CONF2_DATPOL           (1 << 1)
-
-/* TI81XX specific definitions */
-#define USBCTRL0       0x620
-#define USBSTAT0       0x624
-
-/* TI816X PHY controls bits */
-#define TI816X_USBPHY0_NORMAL_MODE     (1 << 0)
-#define TI816X_USBPHY_REFCLK_OSC       (1 << 8)
-
-/* TI814X PHY controls bits */
-#define USBPHY_CM_PWRDN                (1 << 0)
-#define USBPHY_OTG_PWRDN       (1 << 1)
-#define USBPHY_CHGDET_DIS      (1 << 2)
-#define USBPHY_CHGDET_RSTRT    (1 << 3)
-#define USBPHY_SRCONDM         (1 << 4)
-#define USBPHY_SINKONDP                (1 << 5)
-#define USBPHY_CHGISINK_EN     (1 << 6)
-#define USBPHY_CHGVSRC_EN      (1 << 7)
-#define USBPHY_DMPULLUP                (1 << 8)
-#define USBPHY_DPPULLUP                (1 << 9)
-#define USBPHY_CDET_EXTCTL     (1 << 10)
-#define USBPHY_GPIO_MODE       (1 << 12)
-#define USBPHY_DPOPBUFCTL      (1 << 13)
-#define USBPHY_DMOPBUFCTL      (1 << 14)
-#define USBPHY_DPINPUT         (1 << 15)
-#define USBPHY_DMINPUT         (1 << 16)
-#define USBPHY_DPGPIO_PD       (1 << 17)
-#define USBPHY_DMGPIO_PD       (1 << 18)
-#define USBPHY_OTGVDET_EN      (1 << 19)
-#define USBPHY_OTGSESSEND_EN   (1 << 20)
-#define USBPHY_DATA_POLARITY   (1 << 23)
-
-#if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_USB)
-u32 omap1_usb0_init(unsigned nwires, unsigned is_device);
-u32 omap1_usb1_init(unsigned nwires);
-u32 omap1_usb2_init(unsigned nwires, unsigned alt_pingroup);
-#else
-static inline u32 omap1_usb0_init(unsigned nwires, unsigned is_device)
-{
-       return 0;
-}
-static inline u32 omap1_usb1_init(unsigned nwires)
-{
-       return 0;
-
-}
-static inline u32 omap1_usb2_init(unsigned nwires, unsigned alt_pingroup)
-{
-       return 0;
-}
-#endif
-
-#endif /* __ASM_ARCH_OMAP_USB_H */
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
diff --git a/include/linux/platform_data/usb-omap.h b/include/linux/platform_data/usb-omap.h
new file mode 100644 (file)
index 0000000..8570bcf
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * 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
+
+enum usbhs_omap_port_mode {
+       OMAP_USBHS_PORT_MODE_UNUSED,
+       OMAP_EHCI_PORT_MODE_PHY,
+       OMAP_EHCI_PORT_MODE_TLL,
+       OMAP_EHCI_PORT_MODE_HSIC,
+       OMAP_OHCI_PORT_MODE_PHY_6PIN_DATSE0,
+       OMAP_OHCI_PORT_MODE_PHY_6PIN_DPDM,
+       OMAP_OHCI_PORT_MODE_PHY_3PIN_DATSE0,
+       OMAP_OHCI_PORT_MODE_PHY_4PIN_DPDM,
+       OMAP_OHCI_PORT_MODE_TLL_6PIN_DATSE0,
+       OMAP_OHCI_PORT_MODE_TLL_6PIN_DPDM,
+       OMAP_OHCI_PORT_MODE_TLL_3PIN_DATSE0,
+       OMAP_OHCI_PORT_MODE_TLL_4PIN_DPDM,
+       OMAP_OHCI_PORT_MODE_TLL_2PIN_DATSE0,
+       OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM
+};
+
+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];
+       int                             reset_gpio_port[OMAP3_HS_USB_PORTS];
+       struct regulator                *regulator[OMAP3_HS_USB_PORTS];
+       unsigned                        phy_reset:1;
+};
+
+struct ohci_hcd_omap_platform_data {
+       enum usbhs_omap_port_mode       port_mode[OMAP3_HS_USB_PORTS];
+       unsigned                        es2_compatibility:1;
+};
+
+struct usbhs_omap_platform_data {
+       enum usbhs_omap_port_mode               port_mode[OMAP3_HS_USB_PORTS];
+
+       struct ehci_hcd_omap_platform_data      *ehci_data;
+       struct ohci_hcd_omap_platform_data      *ohci_data;
+};
+
+/*-------------------------------------------------------------------------*/
+
+struct omap_musb_board_data {
+       u8      interface_type;
+       u8      mode;
+       u16     power;
+       unsigned extvbus:1;
+       void    (*set_phy_power)(u8 on);
+       void    (*clear_irq)(void);
+       void    (*set_mode)(u8 mode);
+       void    (*reset)(void);
+};
+
+enum musb_interface {
+       MUSB_INTERFACE_ULPI,
+       MUSB_INTERFACE_UTMI
+};