Skip to contentSkip to conversation

mfd: TWL6030: OMAP4: Registering the TWL6030-usb device

PATCH In review Hema HK 1 participant 1 message Dec 10, 2010

Subsystems (4)
lore
Share & tools
lore

Hema HK

author
#0 lore raw

PATCH v3 5/8 mfd: TWL6030: OMAP4: Registering the TWL6030-usb device

Registering the twl6030-usb transceiver device as a child to twl6030 core. Removed the NOP transceiver init call from board file.

Populated twl4030_usb_data platform data structure with the function pointers for OMAP4430 internal PHY operation to be used by twl630-usb driver.

Cc Samuel Ortiz <[email protected]>
Cc Felipe Balbi <[email protected]>
Cc Tony Lindgren <[email protected]>
---
 arch/arm/mach-omap2/board-4430sdp.c    |   11 ++++++--
 arch/arm/mach-omap2/board-omap4panda.c |    8 ++++++
 drivers/mfd/twl-core.c                 |   44 +++++++++++++++++++++++++++++----
 include/linux/i2c/twl.h                |    7 +++++
 4 files changed, 62 insertions(+), 8 deletions(-)
arch/arm/mach-omap2/board-4430sdp.c +8 -3
Index: usb/arch/arm/mach-omap2/board-4430sdp.c
===================================================================
@@ -242,6 +242,13 @@ static struct omap_musb_board_data musb_
 	.power			= 100,
 };
 
+static struct twl4030_usb_data omap4_usbphy_data = {
+	.phy_init	= omap4430_phy_init,
+	.phy_exit	= omap4430_phy_exit,
+	.phy_power	= omap4430_phy_power,
+	.phy_set_clock	= omap4430_phy_set_clk,
+};
+
 static struct omap2_hsmmc_info mmc[] = {
 	{
 		.mmc		= 1,
@@ -461,6 +468,7 @@ static struct twl4030_platform_data sdp4
 	.vaux1		= &sdp4430_vaux1,
 	.vaux2		= &sdp4430_vaux2,
 	.vaux3		= &sdp4430_vaux3,
+	.usb		= &omap4_usbphy_data
 };
 
 static struct i2c_board_info __initdata sdp4430_i2c_boardinfo[] = {
@@ -533,9 +541,6 @@ static void __init omap_4430sdp_init(voi
 		gpio_direction_output(OMAP4SDP_MDM_PWR_EN_GPIO, 1);
 	}
 	usb_ehci_init(&ehci_pdata);
-
-	/* OMAP4 SDP uses internal transceiver so register nop transceiver */
-	usb_nop_xceiv_register();
 	usb_musb_init(&musb_board_data);
 
 	status = omap_ethernet_init();
drivers/mfd/twl-core.c +39 -5

62 lines not on this page · raw message

include/linux/i2c/twl.h +7 -0
Index: usb/include/linux/i2c/twl.h
===================================================================
@@ -593,6 +593,13 @@ enum twl4030_usb_mode {
 
 struct twl4030_usb_data {
 	enum twl4030_usb_mode	usb_mode;
+
+	int		(*phy_init)(struct device *dev);
+	int		(*phy_exit)(struct device *dev);
+	/* Power on/off the PHY */
+	int		(*phy_power)(struct device *dev, int iD, int on);
+	/* enable/disable  phy clocks */
+	int		(*phy_set_clock)(struct device *dev, int on);
 };
 
 struct twl4030_ins {
arch/arm/mach-omap2/board-omap4panda.c +8 -0
Index: usb/arch/arm/mach-omap2/board-omap4panda.c
===================================================================
@@ -137,6 +137,13 @@ static struct omap_musb_board_data musb_
 	.power			= 100,
 };
 
+static struct twl4030_usb_data omap4_usbphy_data = {
+	.phy_init	= omap4430_phy_init,
+	.phy_exit	= omap4430_phy_exit,
+	.phy_power	= omap4430_phy_power,
+	.phy_set_clock	= omap4430_phy_set_clk,
+};
+
 static struct omap2_hsmmc_info mmc[] = {
 	{
 		.mmc		= 1,
@@ -345,6 +352,7 @@ static struct twl4030_platform_data omap
 	.vaux1		= &omap4_panda_vaux1,
 	.vaux2		= &omap4_panda_vaux2,
 	.vaux3		= &omap4_panda_vaux3,
+	.usb		= &omap4_usbphy_data,
 };
 
 static struct i2c_board_info __initdata omap4_panda_i2c_boardinfo[] = {