[PATCH 2/8] iopoll: Add readl_poll_sleep_timeout

Jagan Teki jagan at amarulasolutions.com
Sat Apr 25 13:03:48 CEST 2020


Add readl poll API with sleep and timeout support.

Cc: Tom Rini <trini at konsulko.com>
Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
---
 include/linux/iopoll.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h
index 0bbd757939..e087f23271 100644
--- a/include/linux/iopoll.h
+++ b/include/linux/iopoll.h
@@ -42,6 +42,9 @@
 	(cond) ? 0 : -ETIMEDOUT; \
 })
 
+#define readl_poll_sleep_timeout(addr, val, cond, sleep_us, timeout_us) \
+	readx_poll_timeout(readl, addr, val, cond, sleep_us, timeout_us)
+
 #define readb_poll_timeout(addr, val, cond, timeout_us) \
 	readx_poll_timeout(readb, addr, val, cond, false, timeout_us)
 
-- 
2.17.1



More information about the U-Boot mailing list