usb: dwc_otg: fix usb otg force_device_mode

TEST: set rockchip,usb-mode = <2> in dts and then the usb works

Tested-by: huang zhibao <hzb@rock-chips.com>
Signed-off-by: lyz <lyz@rock-chips.com>
This commit is contained in:
lyz
2015-04-01 10:22:06 +08:00
parent bb3979823e
commit 44a750dd53

View File

@@ -1752,6 +1752,12 @@ static void dwc_otg_pcd_work_init(dwc_otg_pcd_t *pcd,
pldata->dwc_otg_uart_mode(pldata, PHY_USB_MODE);
}
schedule_delayed_work(&pcd->check_id_work, 8 * HZ);
if (otg_dev->core_if->usb_mode == USB_MODE_FORCE_DEVICE) {
pcd->vbus_status = 0;
dwc_otg_core_init(otg_dev->core_if);
cil_pcd_start(otg_dev->core_if);
dwc_otg_pcd_start_check_vbus_work(pcd);
}
}
#endif /* DWC_HOST_ONLY */