summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJagan Teki <jagan@amarulasolutions.com>2020-05-02 12:45:03 +0530
committerJagan Teki <jagan@amarulasolutions.com>2020-05-11 01:30:49 +0530
commitce786ae3913f3a006ec959cc9538d6c4d4114345 (patch)
tree452cae1ededefcb0c4534853cf5116f55ee7ef31 /include
parentc094e219a8614b3da275ad696cdfefbb9f2c453d (diff)
iopoll: Add readl_poll_sleep_timeout
Add readl poll API with sleep and timeout support. This change is referenced from Linux from below commit: commit <5f5323a14cad19323060a8cbf9d96f2280a462dd> ("iopoll: introduce read_poll_timeout macro") Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/iopoll.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h
index 76d2f951c1..30cdea0cdc 100644
--- a/include/linux/iopoll.h
+++ b/include/linux/iopoll.h
@@ -43,6 +43,12 @@
(cond) ? 0 : -ETIMEDOUT; \
})
+#define readx_poll_sleep_timeout(op, addr, val, cond, sleep_us, timeout_us) \
+ read_poll_timeout(op, addr, val, cond, sleep_us, timeout_us)
+
+#define readl_poll_sleep_timeout(addr, val, cond, sleep_us, timeout_us) \
+ readx_poll_sleep_timeout(readl, addr, val, cond, sleep_us, timeout_us)
+
#define readx_poll_timeout(op, addr, val, cond, timeout_us) \
read_poll_timeout(op, addr, val, cond, false, timeout_us)