]> git.sur5r.net Git - u-boot/blob - include/linux/bitrev.h
imx_lpi2c: Update lpi2c driver to support imx8
[u-boot] / include / linux / bitrev.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Based on bitrev from the Linux kernel, by Akinobu Mita
4  */
5
6 #ifndef _LINUX_BITREV_H
7 #define _LINUX_BITREV_H
8
9 #include <linux/types.h>
10
11 extern u8 const byte_rev_table[256];
12
13 static inline u8 bitrev8(u8 byte)
14 {
15         return byte_rev_table[byte];
16 }
17
18 u16 bitrev16(u16 in);
19 u32 bitrev32(u32 in);
20
21 #endif /* _LINUX_BITREV_H */