summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxs
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-mxs')
-rw-r--r--arch/arm/plat-mxs/usb_common.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/plat-mxs/usb_common.c b/arch/arm/plat-mxs/usb_common.c
index 5d8d0b6d9285..fa9466090e34 100644
--- a/arch/arm/plat-mxs/usb_common.c
+++ b/arch/arm/plat-mxs/usb_common.c
@@ -271,6 +271,10 @@ int usbotg_init(struct platform_device *pdev)
xops->init(xops);
usb_phy_enable(pdata);
}
+ /* Enable internal Phy clock */
+ tmp = __raw_readl(pdata->regs + UOG_PORTSC1);
+ tmp &= ~PORTSC_PHCD;
+ __raw_writel(tmp, pdata->regs + UOG_PORTSC1);
if (pdata->operating_mode == FSL_USB2_DR_HOST) {
/* enable FS/LS device */
@@ -288,11 +292,17 @@ EXPORT_SYMBOL(usbotg_init);
void usbotg_uninit(struct fsl_usb2_platform_data *pdata)
{
+ int tmp;
pr_debug("%s\n", __func__);
if (pdata->xcvr_ops && pdata->xcvr_ops->uninit)
pdata->xcvr_ops->uninit(pdata->xcvr_ops);
+ /* Disable internal Phy clock */
+ tmp = __raw_readl(pdata->regs + UOG_PORTSC1);
+ tmp |= PORTSC_PHCD;
+ __raw_writel(tmp, pdata->regs + UOG_PORTSC1);
+
pdata->regs = NULL;
otg_used--;
}