Merge tag 'omap-for-v3.9/usb-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
These changes contain the OMAP USB related platform data changes
that were dropped from linux next because of the merge conflicts
as requested by me and Olof. The reason was that at this point
we really should be able to do the arch/arm related changes
separately from driver changes to avoid dependencies between
branches.
These patches were initially part of the USB related MFD patches.
Based on our comments, Roger Quadros quickly reworked these
patches into a shared branch between ARM SoC tree and the MFD
tree, then separate patches for the OMAP platform data and
MFD driver.
Note that this branch will conflict with c1d1cd597f
("ARM: OMAP2+: omap_device: remove obsolete pm_lats and
early_device code"). Please see http://lkml.org/lkml/2013/2/11/16
for the merge resolution.
[arnd - resolved the merge conflict]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -424,7 +424,7 @@ static void enable_board_wakeup_source(void)
|
||||
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
|
||||
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
|
||||
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
|
@@ -53,7 +53,7 @@ static void enable_board_wakeup_source(void)
|
||||
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
|
||||
}
|
||||
|
||||
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
|
||||
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
|
@@ -40,7 +40,7 @@ static struct omap_board_mux board_mux[] __initdata = {
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct usbhs_omap_board_data usbhs_bdata __initdata = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
|
@@ -274,7 +274,7 @@ static __init void am3517_evm_mcbsp1_init(void)
|
||||
omap_ctrl_writel(devconf0, OMAP2_CONTROL_DEVCONF0);
|
||||
}
|
||||
|
||||
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
#if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \
|
||||
defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE)
|
||||
|
@@ -418,7 +418,7 @@ static struct omap2_hsmmc_info mmc[] = {
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
static struct usbhs_omap_board_data usbhs_bdata __initdata = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
|
@@ -166,7 +166,7 @@ static inline void cm_t3517_init_rtc(void) {}
|
||||
#define HSUSB2_RESET_GPIO (147)
|
||||
#define USB_HUB_RESET_GPIO (152)
|
||||
|
||||
static struct usbhs_omap_board_data cm_t3517_ehci_pdata __initdata = {
|
||||
static struct usbhs_omap_platform_data cm_t3517_ehci_pdata __initdata = {
|
||||
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
|
@@ -435,7 +435,7 @@ static struct platform_device *devkit8000_devices[] __initdata = {
|
||||
&omap_dm9000_dev,
|
||||
};
|
||||
|
||||
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
|
||||
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
|
@@ -526,7 +526,7 @@ static void __init igep_i2c_init(void)
|
||||
omap3_pmic_init("twl4030", &igep_twldata);
|
||||
}
|
||||
|
||||
static const struct usbhs_omap_board_data igep2_usbhs_bdata __initconst = {
|
||||
static struct usbhs_omap_platform_data igep2_usbhs_bdata __initdata = {
|
||||
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
@@ -537,7 +537,7 @@ static const struct usbhs_omap_board_data igep2_usbhs_bdata __initconst = {
|
||||
.reset_gpio_port[2] = -EINVAL,
|
||||
};
|
||||
|
||||
static const struct usbhs_omap_board_data igep3_usbhs_bdata __initconst = {
|
||||
static struct usbhs_omap_platform_data igep3_usbhs_bdata __initdata = {
|
||||
.port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
|
@@ -430,7 +430,7 @@ static struct platform_device *omap3_beagle_devices[] __initdata = {
|
||||
&madc_hwmon,
|
||||
};
|
||||
|
||||
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
|
||||
.port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
|
@@ -538,7 +538,7 @@ static int __init omap3_evm_i2c_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct usbhs_omap_board_data usbhs_bdata __initdata = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
|
||||
.port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
|
@@ -567,7 +567,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
|
||||
&pandora_backlight,
|
||||
};
|
||||
|
||||
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
|
||||
.port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
|
@@ -361,7 +361,7 @@ static struct platform_device *omap3_stalker_devices[] __initdata = {
|
||||
&keys_gpio,
|
||||
};
|
||||
|
||||
static struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
.port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
|
@@ -309,7 +309,7 @@ static struct platform_device *omap3_touchbook_devices[] __initdata = {
|
||||
&keys_gpio,
|
||||
};
|
||||
|
||||
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
|
||||
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
|
@@ -139,7 +139,7 @@ static struct platform_device *panda_devices[] __initdata = {
|
||||
&btwilink_device,
|
||||
};
|
||||
|
||||
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
|
@@ -457,7 +457,7 @@ static int __init overo_spi_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
.port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
|
@@ -92,7 +92,7 @@ static struct mtd_partition zoom_nand_partitions[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
|
||||
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
|
||||
.port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
||||
.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
|
||||
|
@@ -37,11 +37,6 @@
|
||||
#define USBHS_UHH_HWMODNAME "usb_host_hs"
|
||||
#define USBHS_TLL_HWMODNAME "usb_tll_hs"
|
||||
|
||||
static struct usbhs_omap_platform_data usbhs_data;
|
||||
static struct usbtll_omap_platform_data usbtll_data;
|
||||
static struct ehci_hcd_omap_platform_data ehci_data;
|
||||
static struct ohci_hcd_omap_platform_data ohci_data;
|
||||
|
||||
/* MUX settings for EHCI pins */
|
||||
/*
|
||||
* setup_ehci_io_mux - initialize IO pad mux for USBHOST
|
||||
@@ -477,32 +472,18 @@ void __init setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode)
|
||||
}
|
||||
}
|
||||
|
||||
void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
|
||||
void __init usbhs_init(struct usbhs_omap_platform_data *pdata)
|
||||
{
|
||||
struct omap_hwmod *uhh_hwm, *tll_hwm;
|
||||
struct platform_device *pdev;
|
||||
int bus_id = -1;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < OMAP3_HS_USB_PORTS; i++) {
|
||||
usbhs_data.port_mode[i] = pdata->port_mode[i];
|
||||
usbtll_data.port_mode[i] = pdata->port_mode[i];
|
||||
ohci_data.port_mode[i] = pdata->port_mode[i];
|
||||
ehci_data.port_mode[i] = pdata->port_mode[i];
|
||||
ehci_data.reset_gpio_port[i] = pdata->reset_gpio_port[i];
|
||||
ehci_data.regulator[i] = pdata->regulator[i];
|
||||
}
|
||||
ehci_data.phy_reset = pdata->phy_reset;
|
||||
ohci_data.es2_compatibility = pdata->es2_compatibility;
|
||||
usbhs_data.ehci_data = &ehci_data;
|
||||
usbhs_data.ohci_data = &ohci_data;
|
||||
|
||||
if (cpu_is_omap34xx()) {
|
||||
setup_ehci_io_mux(pdata->port_mode);
|
||||
setup_ohci_io_mux(pdata->port_mode);
|
||||
|
||||
if (omap_rev() <= OMAP3430_REV_ES2_1)
|
||||
usbhs_data.single_ulpi_bypass = true;
|
||||
pdata->single_ulpi_bypass = true;
|
||||
|
||||
} else if (cpu_is_omap44xx()) {
|
||||
setup_4430ehci_io_mux(pdata->port_mode);
|
||||
@@ -522,7 +503,7 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
|
||||
}
|
||||
|
||||
pdev = omap_device_build(OMAP_USBTLL_DEVICE, bus_id, tll_hwm,
|
||||
&usbtll_data, sizeof(usbtll_data));
|
||||
pdata, sizeof(*pdata));
|
||||
if (IS_ERR(pdev)) {
|
||||
pr_err("Could not build hwmod device %s\n",
|
||||
USBHS_TLL_HWMODNAME);
|
||||
@@ -530,7 +511,7 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
|
||||
}
|
||||
|
||||
pdev = omap_device_build(OMAP_USBHS_DEVICE, bus_id, uhh_hwm,
|
||||
&usbhs_data, sizeof(usbhs_data));
|
||||
pdata, sizeof(*pdata));
|
||||
if (IS_ERR(pdev)) {
|
||||
pr_err("Could not build hwmod devices %s\n",
|
||||
USBHS_UHH_HWMODNAME);
|
||||
@@ -540,7 +521,7 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
|
||||
|
||||
#else
|
||||
|
||||
void __init usbhs_init(const struct usbhs_omap_board_data *pdata)
|
||||
void __init usbhs_init(struct usbhs_omap_platform_data *pdata)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -53,26 +53,8 @@
|
||||
#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 usbhs_init(struct usbhs_omap_platform_data *pdata);
|
||||
|
||||
extern void am35x_musb_reset(void);
|
||||
extern void am35x_musb_phy_power(u8 on);
|
||||
|
Reference in New Issue
Block a user