Message ID | 20230714204323.27220-3-kettenis@openbsd.org |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
Series | Load ASMedia XHCI controller firmware | expand |
On 7/14/23 22:43, Mark Kettenis wrote: > Add a variant of readl_poll_sleep_timeout that reads a single > byte to match the readb_poll_timeout API that Linux has. > > Signed-off-by: Mark Kettenis <kettenis@openbsd.org> > --- > include/linux/iopoll.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h > index 0ee2bddaa8..89990e95e9 100644 > --- a/include/linux/iopoll.h > +++ b/include/linux/iopoll.h > @@ -49,6 +49,9 @@ > #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 readb_poll_sleep_timeout(addr, val, cond, sleep_us, timeout_us) \ > + readx_poll_sleep_timeout(readb, addr, val, cond, sleep_us, timeout_us) readb variant should go before readl variant I think.
> Date: Fri, 14 Jul 2023 23:22:00 +0200 > From: Marek Vasut <marex@denx.de> > > On 7/14/23 22:43, Mark Kettenis wrote: > > Add a variant of readl_poll_sleep_timeout that reads a single > > byte to match the readb_poll_timeout API that Linux has. > > > > Signed-off-by: Mark Kettenis <kettenis@openbsd.org> > > --- > > include/linux/iopoll.h | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h > > index 0ee2bddaa8..89990e95e9 100644 > > --- a/include/linux/iopoll.h > > +++ b/include/linux/iopoll.h > > @@ -49,6 +49,9 @@ > > #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 readb_poll_sleep_timeout(addr, val, cond, sleep_us, timeout_us) \ > > + readx_poll_sleep_timeout(readb, addr, val, cond, sleep_us, timeout_us) > > readb variant should go before readl variant I think. That makes to order consistent, so that makes sense. I'll fix that in the next revision.
diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h index 0ee2bddaa8..89990e95e9 100644 --- a/include/linux/iopoll.h +++ b/include/linux/iopoll.h @@ -49,6 +49,9 @@ #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 readb_poll_sleep_timeout(addr, val, cond, sleep_us, timeout_us) \ + readx_poll_sleep_timeout(readb, addr, val, cond, sleep_us, timeout_us) + #define readx_poll_timeout(op, addr, val, cond, timeout_us) \ read_poll_timeout(op, val, cond, false, timeout_us, addr)
Add a variant of readl_poll_sleep_timeout that reads a single byte to match the readb_poll_timeout API that Linux has. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> --- include/linux/iopoll.h | 3 +++ 1 file changed, 3 insertions(+)