From: Philippe Reynes Date: Tue, 13 Aug 2019 18:45:18 +0200 Subject: [U-Boot] [PATCH V2 02/10] waitbit: Add the generic wait_for_bit macros for 16 and 32 bits. In-Reply-To: <1565714726-2269-1-git-send-email-philippe.reynes@softathome.com> References: <1565714726-2269-1-git-send-email-philippe.reynes@softathome.com> Message-ID: <1565714726-2269-2-git-send-email-philippe.reynes@softathome.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Kursad Oney 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 Reviewed-by: Philippe Reynes --- include/wait_bit.h | 4 ++++ 1 file changed, 4 insertions(+) Changelog: v2: - move this patch from third place to second place diff --git a/include/wait_bit.h b/include/wait_bit.h index 82e09da..e8f444b 100644 --- a/include/wait_bit.h +++ b/include/wait_bit.h @@ -72,12 +72,16 @@ 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) +BUILD_WAIT_FOR_BIT(16, 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) +BUILD_WAIT_FOR_BIT(32, u32, readl_be) #endif #endif -- 2.7.4