#include "dwc_otg_hcd.h"
#include "dwc_otg_regs.h"
#include <linux/usb.h>
+#include "dwc_otg_driver.h"
+#include "usbdev_rk.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
#include <../drivers/usb/core/hcd.h>
#else
hcint_data_t hcint;
hcintmsk_data_t hcintmsk;
int out_nak_enh = 0;
+ struct dwc_otg_platform_data *pldata = hcd->core_if->otg_dev->pldata;
/* For core with OUT NAK enhancement, the flow for high-
* speed CONTROL/BULK OUT is handled a little differently.
} else {
DWC_PRINTF("NYET/NAK/ACK/other in non-error case, 0x%08x\n",
hcint.d32);
+ pldata->soft_reset(pldata, RST_CHN_HALT);
+ mdelay(5);
if (!hcint.b.nyet && !hcint.b.nak && !hcint.b.ack)
clear_hc_int(hc_regs, chhltd);
}
reset_control_deassert(rst_otg_c);
reset_control_deassert(rst_otg_h);
break;
-
+ case RST_CHN_HALT:
+ /* PHY reset */
+ uoc_write(UOC_HIWORD_UPDATE(0x1, 0x3, 0), 0x700);
+ reset_control_assert(rst_otg_p);
+ udelay(15);
+ uoc_write(UOC_HIWORD_UPDATE(0x2, 0x3, 0), 0x700);
+ udelay(1500);
+ reset_control_deassert(rst_otg_p);
+ udelay(2);
+ break;
default:
break;
}