dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_DEVICE);
ret = dwc3_gadget_init(dwc);
if (ret) {
- dev_err(dev, "failed to initialize gadget\n");
+ dev_err(dwc->dev, "failed to initialize gadget\n");
return ret;
}
break;
dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_HOST);
ret = dwc3_host_init(dwc);
if (ret) {
- dev_err(dev, "failed to initialize host\n");
+ dev_err(dwc->dev, "failed to initialize host\n");
return ret;
}
break;
dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_OTG);
ret = dwc3_host_init(dwc);
if (ret) {
- dev_err(dev, "failed to initialize host\n");
+ dev_err(dwc->dev, "failed to initialize host\n");
return ret;
}
ret = dwc3_gadget_init(dwc);
if (ret) {
- dev_err(dev, "failed to initialize gadget\n");
+ dev_err(dwc->dev, "failed to initialize gadget\n");
return ret;
}
break;
default:
- dev_err(dev, "Unsupported mode of operation %d\n", dwc->dr_mode);
+ dev_err(dwc->dev,
+ "Unsupported mode of operation %d\n", dwc->dr_mode);
return -EINVAL;
}
ret = dwc3_core_init(dwc);
if (ret) {
- dev_err(dev, "failed to initialize core\n");
+ dev_err(dwc->dev, "failed to initialize core\n");
goto err0;
}
ret = dwc3_core_init(dwc);
if (ret) {
- dev_err(dev, "failed to initialize core\n");
+ dev_err(dwc->dev, "failed to initialize core\n");
goto core_fail;
}
#include <cpu_func.h>
#include <log.h>
#include <malloc.h>
+#include <dm.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/bug.h>
strlcat(dep->name, "-int", sizeof(dep->name));
break;
default:
- dev_err(dwc->dev, "invalid endpoint transfer type\n");
+ dev_err(dep->dwc->dev, "invalid endpoint transfer type\n");
}
spin_lock_irqsave(&dwc->lock, flags);
{
struct dwc3_trb *trb;
- dev_vdbg(dwc->dev, "%s: req %p dma %08llx length %d%s%s\n",
- dep->name, req, (unsigned long long) dma,
- length, last ? " last" : "",
- chain ? " chain" : "");
+ dev_vdbg(dep->dwc->dev, "%s: req %p dma %08llx length %d%s%s\n",
+ dep->name, req, (unsigned long long)dma,
+ length, last ? " last" : "", chain ? " chain" : "");
trb = &dep->trb_pool[dep->free_slot & DWC3_TRB_MASK];
spin_lock_irqsave(&dwc->lock, flags);
if (!dep->endpoint.desc) {
- dev_dbg(dwc->dev, "trying to queue request %p to disabled %s\n",
- request, ep->name);
+ dev_dbg(dep->dwc->dev,
+ "trying to queue request %p to disabled %s\n", request,
+ ep->name);
ret = -ESHUTDOWN;
goto out;
}
if (req->dep != dep) {
- WARN(true, "request %p belongs to '%s'\n",
- request, req->dep->name);
+ WARN(true, "request %p belongs to '%s'\n", request,
+ req->dep->name);
ret = -EINVAL;
goto out;
}
- dev_vdbg(dwc->dev, "queing request %p to %s length %d\n",
- request, ep->name, request->length);
+ dev_vdbg(dep->dwc->dev, "queing request %p to %s length %d\n",
+ request, ep->name, request->length);
ret = __dwc3_gadget_ep_queue(dep, req);