提交 26250d54 编写于 作者: M Michael Trimarchi 提交者: Greg Kroah-Hartman

usb: chipidea: usbmisc: evdo can be set e/o reset

evdo bit can be set or reset. We can not trust evdo bit
status after bootloader stage
Signed-off-by: NMichael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: NPeter Chen <peter.chen@nxp.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 9618d093
......@@ -151,14 +151,18 @@ static int usbmisc_imx25_post(struct imx_usbmisc_data *data)
if (data->index)
return 0;
if (data->evdo) {
spin_lock_irqsave(&usbmisc->lock, flags);
reg = usbmisc->base + MX25_USB_PHY_CTRL_OFFSET;
val = readl(reg);
writel(val | MX25_BM_EXTERNAL_VBUS_DIVIDER, reg);
if (data->evdo)
val |= MX25_BM_EXTERNAL_VBUS_DIVIDER;
else
val &= ~MX25_BM_EXTERNAL_VBUS_DIVIDER;
writel(val, reg);
spin_unlock_irqrestore(&usbmisc->lock, flags);
usleep_range(5000, 10000); /* needed to stabilize voltage */
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册