#define invalidate_dcache_iso_td(addr) invalidate_dcache_buffer(addr, 32)
#define invalidate_dcache_hcca(addr) invalidate_dcache_buffer(addr, 256)
+#ifdef CONFIG_DM_USB
+/*
+ * The various ohci_mdelay(1) calls in the code seem unnecessary. We keep
+ * them around when building for older boards not yet converted to the dm
+ * just in case (to avoid regressions), for dm this turns them into nops.
+ */
+#define ohci_mdelay(x)
+#else
+#define ohci_mdelay(x) mdelay(x)
+#endif
+
/* global ohci_t */
static ohci_t gohci;
/* this must be aligned to a 256 byte boundary */
pkt_print(ohci, NULL, dev, pipe, buffer, transfer_len,
cmd, "SUB(rh)", usb_pipein(pipe));
#else
- mdelay(1);
+ ohci_mdelay(1);
#endif
if (usb_pipeint(pipe)) {
info("Root-Hub submit IRQ: NOT implemented");
#ifdef DEBUG
ohci_dump_roothub(ohci, 1);
#else
- mdelay(1);
+ ohci_mdelay(1);
#endif
len = min_t(int, len, leni);
pkt_print(ohci, NULL, dev, pipe, buffer,
transfer_len, cmd, "RET(rh)", 0/*usb_pipein(pipe)*/);
#else
- mdelay(1);
+ ohci_mdelay(1);
#endif
return stat;
pkt_print(ohci, urb, dev, pipe, buffer, transfer_len,
setup, "SUB", usb_pipein(pipe));
#else
- mdelay(1);
+ ohci_mdelay(1);
#endif
if (!maxsize) {
err("submit_common_message: pipesize for pipe %lx is zero",
pkt_print(ohci, urb, dev, pipe, buffer, transfer_len,
setup, "RET(ctlr)", usb_pipein(pipe));
#else
- mdelay(1);
+ ohci_mdelay(1);
#endif
urb_free_priv(urb);
return 0;
pkt_print(ohci, NULL, dev, pipe, buffer, transfer_len,
setup, "SUB", usb_pipein(pipe));
#else
- mdelay(1);
+ ohci_mdelay(1);
#endif
if (!maxsize) {
err("submit_control_message: pipesize for pipe %lx is zero",
#ifdef DEBUG
ohci_dump(ohci, 1);
#else
- mdelay(1);
+ ohci_mdelay(1);
#endif
/* FIXME: be optimistic, hope that bug won't repeat often. */
/* Make some non-interrupt context restart the controller. */
}
if (ints & OHCI_INTR_WDH) {
- mdelay(1);
+ ohci_mdelay(1);
ohci_writel(OHCI_INTR_WDH, ®s->intrdisable);
(void)ohci_readl(®s->intrdisable); /* flush */
stat = dl_done_list(ohci);
#ifdef DEBUG
ohci_dump(&gohci, 1);
#else
- mdelay(1);
+ ohci_mdelay(1);
#endif
ohci_inited = 1;
return 0;