projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c094e21
)
iopoll: Add readl_poll_sleep_timeout
author
Jagan Teki
<jagan@amarulasolutions.com>
Sat, 2 May 2020 07:15:03 +0000
(12:45 +0530)
committer
Jagan Teki
<jagan@amarulasolutions.com>
Sun, 10 May 2020 20:00:49 +0000
(
01:30
+0530)
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>
include/linux/iopoll.h
patch
|
blob
|
history
diff --git
a/include/linux/iopoll.h
b/include/linux/iopoll.h
index 76d2f951c1573070978dd6fe664dee940fa6e047..30cdea0cdc1630c059a1aceb13defb4113fb93d9 100644
(file)
--- 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)