int ret;
u32 reg;
- if (!dwc)
- return;
-
mutex_lock(&rockchip->lock);
if (extcon_get_cable_state_(edev, EXTCON_USB) > 0) {
* If dr_mode is host only, never to set
* the mode to the peripheral mode.
*/
- if (WARN_ON(dwc->dr_mode == USB_DR_MODE_HOST))
+ if (dwc->dr_mode == USB_DR_MODE_HOST) {
+ dev_warn(rockchip->dev, "USB peripheral not support!\n");
goto out;
+ }
/*
* Assert otg reset can put the dwc in P2 state, it's
* If dr_mode is device only, never to
* set the mode to the host mode.
*/
- if (WARN_ON(dwc->dr_mode == USB_DR_MODE_PERIPHERAL))
+ if (dwc->dr_mode == USB_DR_MODE_PERIPHERAL) {
+ dev_warn(rockchip->dev, "USB HOST not support!\n");
goto out;
+ }
/*
* Assert otg reset can put the dwc in P2 state, it's