]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00174128-2 Revert "Remove the discharge for VBUS and DP-2"
authorPeter Chen <peter.chen@freescale.com>
Fri, 10 Feb 2012 02:35:32 +0000 (10:35 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:33:58 +0000 (08:33 +0200)
This reverts commit 4f025d73de4a55077691096eacf60f90c3b9e7af.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
arch/arm/mach-mx6/usb_dr.c

index 4c7c21dd2f56a00c7734d9cde7823056704fefc3..21cf3d80699aaf061e8d3ea5f264ef9c5605ba2c 100644 (file)
@@ -395,6 +395,19 @@ static void host_wakeup_handler(struct fsl_usb2_platform_data *pdata)
 
 #ifdef CONFIG_USB_GADGET_ARC
 /* Beginning of device related operation for DR port */
+static void _gadget_discharge_dp(bool enable)
+{
+       void __iomem *phy_reg = MX6_IO_ADDRESS(USB_PHY0_BASE_ADDR);
+       if (enable) {
+               __raw_writel(BF_USBPHY_DEBUG_ENHSTPULLDOWN(0x2), phy_reg + HW_USBPHY_DEBUG_SET);
+               __raw_writel(BF_USBPHY_DEBUG_HSTPULLDOWN(0x2), phy_reg + HW_USBPHY_DEBUG_SET);
+       } else {
+               __raw_writel(BF_USBPHY_DEBUG_ENHSTPULLDOWN(0x2), phy_reg + HW_USBPHY_DEBUG_CLR);
+               __raw_writel(BF_USBPHY_DEBUG_HSTPULLDOWN(0x2), phy_reg + HW_USBPHY_DEBUG_CLR);
+       }
+
+}
+
 static void _device_phy_lowpower_suspend(struct fsl_usb2_platform_data *pdata, bool enable)
 {
        __phy_lowpower_suspend(pdata, enable, ENABLED_BY_DEVICE);
@@ -489,6 +502,7 @@ void __init mx6_usb_dr_init(void)
        dr_utmi_config.platform_resume  = NULL;
        dr_utmi_config.phy_lowpower_suspend = _device_phy_lowpower_suspend;
        dr_utmi_config.is_wakeup_event = _is_device_wakeup;
+       dr_utmi_config.gadget_discharge_dp = _gadget_discharge_dp;
        dr_utmi_config.wakeup_pdata = &dr_wakeup_config;
        dr_utmi_config.wakeup_handler = device_wakeup_handler;
        pdev = imx6q_add_fsl_usb2_udc(&dr_utmi_config);