Found a problem that after "usb stop" command, the next "usb start" can't enumerate
any devices. Need to put the xhci core to reset status in stop.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng@nxp.com>
debug("check CNR has finished\n");
}
+void imx8_xhci_reset(void)
+{
+ /* Set CORE ctrl to default value, that all rst are hold */
+ writel(0xfc000001, USB3_CORE_CTRL1);
+}
+
+
#ifdef CONFIG_DM_USB
static int xhci_imx8_probe(struct udevice *dev)
{
static int xhci_imx8_remove(struct udevice *dev)
{
- return xhci_deregister(dev);
+ int ret = xhci_deregister(dev);
+ if (!ret)
+ imx8_xhci_reset();
+
+ return ret;
}
static const struct udevice_id xhci_usb_ids[] = {
void xhci_hcd_stop(int index)
{
+ imx8_xhci_reset();
}
#endif