aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorStefan Roese2022-09-02 14:10:46 +0200
committerStefan Roese2022-09-18 10:26:33 +0200
commit29caf9305b6fafe8f6d6b18fa1f825dff8686e61 (patch)
tree6530f6a2373b7af6fb4fdceca823b21f7c79ed7f /drivers/usb
parent881d4108257a45ac890ef27c523783dbe401e462 (diff)
cyclic: Use schedule() instead of WATCHDOG_RESET()
Globally replace all occurances of WATCHDOG_RESET() with schedule(), which handles the HW_WATCHDOG functionality and the cyclic infrastructure. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/eth/lan7x.h4
-rw-r--r--drivers/usb/gadget/f_acm.c4
-rw-r--r--drivers/usb/gadget/f_sdp.c4
-rw-r--r--drivers/usb/host/ehci-hcd.c2
-rw-r--r--drivers/usb/musb-new/musb_uboot.c2
5 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/eth/lan7x.h b/drivers/usb/eth/lan7x.h
index f71e8c7268c..9480f4f6d15 100644
--- a/drivers/usb/eth/lan7x.h
+++ b/drivers/usb/eth/lan7x.h
@@ -157,7 +157,7 @@ static inline int lan7x_wait_for_bit(struct usb_device *udev,
}
udelay(1);
- WATCHDOG_RESET();
+ schedule();
}
debug("%s: Timeout (reg=0x%x mask=%08x wait_set=%i)\n", prefix, reg,
@@ -199,7 +199,7 @@ static inline int lan7x_mdio_wait_for_bit(struct usb_device *udev,
}
udelay(1);
- WATCHDOG_RESET();
+ schedule();
}
debug("%s: Timeout (reg=0x%x mask=%08x wait_set=%i)\n", prefix, reg,
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
index 388f73d1bc8..b2ddd1ada8b 100644
--- a/drivers/usb/gadget/f_acm.c
+++ b/drivers/usb/gadget/f_acm.c
@@ -579,7 +579,7 @@ static int acm_stdio_getc(struct stdio_dev *dev)
/* Wait for a character to arrive. */
while (!acm_stdio_tstc(dev))
- WATCHDOG_RESET();
+ schedule();
buf_pop(&f_acm->rx_buf, &c, 1);
@@ -639,7 +639,7 @@ static int acm_stdio_start(struct stdio_dev *dev)
if (ctrlc())
return -ECANCELED;
- WATCHDOG_RESET();
+ schedule();
}
return 0;
diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c
index 0fa7230b992..74548ab603b 100644
--- a/drivers/usb/gadget/f_sdp.c
+++ b/drivers/usb/gadget/f_sdp.c
@@ -711,7 +711,7 @@ int sdp_init(int controller_index)
return 1;
}
- WATCHDOG_RESET();
+ schedule();
usb_gadget_handle_interrupts(controller_index);
}
@@ -927,7 +927,7 @@ int spl_sdp_handle(int controller_index, struct spl_image_info *spl_image,
if (flag == SDP_EXIT)
return 0;
- WATCHDOG_RESET();
+ schedule();
usb_gadget_handle_interrupts(controller_index);
#ifdef CONFIG_SPL_BUILD
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index f033198a7c1..d30f2a0d13b 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -641,7 +641,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long pipe, void *buffer,
token = hc32_to_cpu(vtd->qt_token);
if (!(QT_TOKEN_GET_STATUS(token) & QT_TOKEN_STATUS_ACTIVE))
break;
- WATCHDOG_RESET();
+ schedule();
} while (get_timer(ts) < timeout);
qhtoken = hc32_to_cpu(qh->qh_overlay.qt_token);
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index d186facc7e0..62c5e8e5fa4 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -378,7 +378,7 @@ static struct musb *gadget;
int usb_gadget_handle_interrupts(int index)
{
- WATCHDOG_RESET();
+ schedule();
if (!gadget || !gadget->isr)
return -EINVAL;