summaryrefslogtreecommitdiff
path: root/include/wait_bit.h
diff options
context:
space:
mode:
authorKursad Oney <kursad.oney@broadcom.com>2019-08-14 15:18:33 +0200
committerTom Rini <trini@konsulko.com>2019-10-11 10:09:16 -0400
commitc50d670c56109c001875cd72930810b2ddfb29e6 (patch)
tree687f9faa74e100c9d46284626b7d62ba4e2f5d6d /include/wait_bit.h
parent9a3eddd263eeed29dadf0d6bd21ee84bd8e6209d (diff)
waitbit: Add the generic wait_for_bit macros for 16 and 32 bits.
wait_for_bit_le32 and wait_for_bit_le16 use the raw I/O functions which would default to big-endian on BE systems. Create the generic equivalents to use the native endianness. Signed-off-by: Kursad Oney <kursad.oney@broadcom.com> Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'include/wait_bit.h')
-rw-r--r--include/wait_bit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/wait_bit.h b/include/wait_bit.h
index 82e09da5ca..79da0811fe 100644
--- a/include/wait_bit.h
+++ b/include/wait_bit.h
@@ -72,10 +72,12 @@ static inline int wait_for_bit_##sfx(const void *reg, \
BUILD_WAIT_FOR_BIT(8, u8, readb)
BUILD_WAIT_FOR_BIT(le16, u16, readw)
+BUILD_WAIT_FOR_BIT(16, u16, readw)
#ifdef readw_be
BUILD_WAIT_FOR_BIT(be16, u16, readw_be)
#endif
BUILD_WAIT_FOR_BIT(le32, u32, readl)
+BUILD_WAIT_FOR_BIT(32, u32, readl)
#ifdef readl_be
BUILD_WAIT_FOR_BIT(be32, u32, readl_be)
#endif