Commit 04c86fe6 authored by Andreas Kemnade's avatar Andreas Kemnade

gta04: fix phy init in twl4030_usb_charger_enable()

phy was only enabled half in twl4030_usb_charger_enable(),
parts were missing and there was a loop without a timeout
making charger_enable hang when something else has not
initialized the phy enough.
Fix that by calling the apropiate phy init function
Signed-off-by: default avatarAndreas Kemnade <>
parent c8fb1e62
......@@ -111,26 +111,7 @@ static int twl4030_usb_charger_enable(int enable)
if (ret)
return ret;
/* Enabling interfacing with usb thru OCP */
ret = clear_n_set(TWL4030_CHIP_USB, 0, PHY_DPLL_CLK,
if (ret)
return ret;
value = 0;
while (!(value & PHY_DPLL_CLK)) {
ret = twl4030_i2c_read_u8(TWL4030_CHIP_USB,
+ REG_PHY_CLK_CTRL_STS, &value);
if (ret)
return ret;
/* OTG_EN (POWER_CTRL[5]) to 1 */
ret = clear_n_set(TWL4030_CHIP_USB, 0, OTG_EN,
ret = twl4030_usb_ulpi_init();
if (ret)
return ret;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment