forked from luck/tmp_suning_uos_patched
ARM: OMAP: move OMAP USB platform data to <linux/platform_data/omap-usb.h>
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>
This commit is contained in:
parent
54db6eee06
commit
e8c4a7acc9
|
@ -27,6 +27,7 @@
|
||||||
#include <linux/leds.h>
|
#include <linux/leds.h>
|
||||||
#include <linux/leds_pwm.h>
|
#include <linux/leds_pwm.h>
|
||||||
#include <linux/platform_data/omap4-keypad.h>
|
#include <linux/platform_data/omap4-keypad.h>
|
||||||
|
#include <linux/usb/musb.h>
|
||||||
|
|
||||||
#include <asm/hardware/gic.h>
|
#include <asm/hardware/gic.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <linux/can/platform/ti_hecc.h>
|
#include <linux/can/platform/ti_hecc.h>
|
||||||
#include <linux/davinci_emac.h>
|
#include <linux/davinci_emac.h>
|
||||||
#include <linux/mmc/host.h>
|
#include <linux/mmc/host.h>
|
||||||
|
#include <linux/usb/musb.h>
|
||||||
#include <linux/platform_data/gpio-omap.h>
|
#include <linux/platform_data/gpio-omap.h>
|
||||||
|
|
||||||
#include "am35xx.h"
|
#include "am35xx.h"
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <linux/spi/ads7846.h>
|
#include <linux/spi/ads7846.h>
|
||||||
#include <linux/i2c/twl.h>
|
#include <linux/i2c/twl.h>
|
||||||
#include <linux/usb/otg.h>
|
#include <linux/usb/otg.h>
|
||||||
|
#include <linux/usb/musb.h>
|
||||||
#include <linux/usb/nop-usb-xceiv.h>
|
#include <linux/usb/nop-usb-xceiv.h>
|
||||||
#include <linux/smsc911x.h>
|
#include <linux/smsc911x.h>
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include <linux/regulator/machine.h>
|
#include <linux/regulator/machine.h>
|
||||||
#include <linux/regulator/fixed.h>
|
#include <linux/regulator/fixed.h>
|
||||||
#include <linux/ti_wilink_st.h>
|
#include <linux/ti_wilink_st.h>
|
||||||
|
#include <linux/usb/musb.h>
|
||||||
#include <linux/wl12xx.h>
|
#include <linux/wl12xx.h>
|
||||||
#include <linux/platform_data/omap-abe-twl6040.h>
|
#include <linux/platform_data/omap-abe-twl6040.h>
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/leds.h>
|
#include <linux/leds.h>
|
||||||
|
#include <linux/usb/musb.h>
|
||||||
#include <linux/platform_data/spi-omap2-mcspi.h>
|
#include <linux/platform_data/spi-omap2-mcspi.h>
|
||||||
|
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
*/
|
*/
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/usb/musb.h>
|
||||||
|
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
|
#include <linux/platform_data/usb-omap.h>
|
||||||
|
|
||||||
#include <linux/usb/musb.h>
|
#include <linux/usb/musb.h>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include <plat/usb.h>
|
#include <linux/platform_data/usb-omap.h>
|
||||||
|
|
||||||
/* AM35x */
|
/* AM35x */
|
||||||
/* USB 2.0 PHY Control */
|
/* USB 2.0 PHY Control */
|
||||||
|
|
|
@ -26,9 +26,12 @@
|
||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <plat/cpu.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 <linux/pm_runtime.h>
|
||||||
|
|
||||||
|
#include "omap-usb.h"
|
||||||
|
|
||||||
#define USBHS_DRIVER_NAME "usbhs_omap"
|
#define USBHS_DRIVER_NAME "usbhs_omap"
|
||||||
#define OMAP_EHCI_DEVICE "ehci-omap"
|
#define OMAP_EHCI_DEVICE "ehci-omap"
|
||||||
#define OMAP_OHCI_DEVICE "ohci-omap3"
|
#define OMAP_OHCI_DEVICE "ohci-omap3"
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <plat/usb.h>
|
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
|
#include <linux/platform_data/usb-omap.h>
|
||||||
|
|
||||||
#define USBTLL_DRIVER_NAME "usbhs_tll"
|
#define USBTLL_DRIVER_NAME "usbhs_tll"
|
||||||
|
|
||||||
|
|
2
drivers/mfd/omap-usb.h
Normal file
2
drivers/mfd/omap-usb.h
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
extern int omap_tll_enable(void);
|
||||||
|
extern int omap_tll_disable(void);
|
|
@ -39,12 +39,13 @@
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/usb/ulpi.h>
|
#include <linux/usb/ulpi.h>
|
||||||
#include <plat/usb.h>
|
|
||||||
#include <linux/regulator/consumer.h>
|
#include <linux/regulator/consumer.h>
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
|
|
||||||
|
#include <linux/platform_data/usb-omap.h>
|
||||||
|
|
||||||
/* EHCI Register Set */
|
/* EHCI Register Set */
|
||||||
#define EHCI_INSNREG04 (0xA0)
|
#define EHCI_INSNREG04 (0xA0)
|
||||||
#define EHCI_INSNREG04_DISABLE_UNSUSPEND (1 << 5)
|
#define EHCI_INSNREG04_DISABLE_UNSUSPEND (1 << 5)
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <plat/usb.h>
|
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -34,8 +34,7 @@
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/usb/nop-usb-xceiv.h>
|
#include <linux/usb/nop-usb-xceiv.h>
|
||||||
|
#include <linux/platform_data/usb-omap.h>
|
||||||
#include <plat/usb.h>
|
|
||||||
|
|
||||||
#include "musb_core.h"
|
#include "musb_core.h"
|
||||||
|
|
||||||
|
|
|
@ -38,13 +38,12 @@
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/usb/nop-usb-xceiv.h>
|
#include <linux/usb/nop-usb-xceiv.h>
|
||||||
|
#include <linux/platform_data/usb-omap.h>
|
||||||
|
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/of_device.h>
|
#include <linux/of_device.h>
|
||||||
#include <linux/of_address.h>
|
#include <linux/of_address.h>
|
||||||
|
|
||||||
#include <plat/usb.h>
|
|
||||||
|
|
||||||
#include "musb_core.h"
|
#include "musb_core.h"
|
||||||
|
|
||||||
#ifdef CONFIG_OF
|
#ifdef CONFIG_OF
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#ifndef __MUSB_OMAP243X_H__
|
#ifndef __MUSB_OMAP243X_H__
|
||||||
#define __MUSB_OMAP243X_H__
|
#define __MUSB_OMAP243X_H__
|
||||||
|
|
||||||
#include <plat/usb.h>
|
#include <linux/platform_data/usb-omap.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* OMAP2430-specific definitions
|
* OMAP2430-specific definitions
|
||||||
|
|
|
@ -1,11 +1,23 @@
|
||||||
// include/asm-arm/mach-omap/usb.h
|
/*
|
||||||
|
* usb-omap.h - Platform data for the various OMAP USB IPs
|
||||||
#ifndef __ASM_ARCH_OMAP_USB_H
|
*
|
||||||
#define __ASM_ARCH_OMAP_USB_H
|
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com
|
||||||
|
*
|
||||||
#include <linux/io.h>
|
* This software is distributed under the terms of the GNU General Public
|
||||||
#include <linux/platform_device.h>
|
* License ("GPL") version 2, as published by the Free Software Foundation.
|
||||||
#include <linux/usb/musb.h>
|
*
|
||||||
|
* 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
|
#define OMAP3_HS_USB_PORTS 3
|
||||||
|
|
||||||
|
@ -26,7 +38,9 @@ enum usbhs_omap_port_mode {
|
||||||
OMAP_OHCI_PORT_MODE_TLL_2PIN_DPDM
|
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 {
|
struct ehci_hcd_omap_platform_data {
|
||||||
enum usbhs_omap_port_mode port_mode[OMAP3_HS_USB_PORTS];
|
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 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 {
|
struct omap_musb_board_data {
|
||||||
|
@ -63,11 +74,7 @@ struct omap_musb_board_data {
|
||||||
void (*reset)(void);
|
void (*reset)(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI};
|
enum musb_interface {
|
||||||
|
MUSB_INTERFACE_ULPI,
|
||||||
extern int omap_tll_enable(void);
|
MUSB_INTERFACE_UTMI
|
||||||
extern int omap_tll_disable(void);
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __ASM_ARCH_OMAP_USB_H */
|
|
Loading…
Reference in New Issue
Block a user