How to reproduce compilation error:

1. make multi_v7_defconfig
2. enable CONFIG_DEBUG_LL=y and CONFIG_DEBUG_RPI3_MINI_UART=y
3. make
...

include/mach/bcm283x/debug_ll.h: In function ‘debug_ll_init’:
include/mach/bcm283x/debug_ll.h:56:41: error: implicit declaration of
function ‘BIT’ [-Werror=imp
licit-function-declaration]
   56 | #define BCM2836_AUX_CLOCK_EN_UART       BIT(0) /* Bit 0 enables
      the Miniuart */
      |                                         ^~~

Signed-off-by: Antony Pavlov <antonynpav...@gmail.com>
---
 include/mach/bcm283x/debug_ll.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/mach/bcm283x/debug_ll.h b/include/mach/bcm283x/debug_ll.h
index 844305109aa..8bbff4fd9a2 100644
--- a/include/mach/bcm283x/debug_ll.h
+++ b/include/mach/bcm283x/debug_ll.h
@@ -52,6 +52,8 @@ static inline void debug_ll_write_reg(void __iomem *base, int 
reg, uint8_t val)
        writeb(val, base + (reg << 2));
 }
 
+#include <linux/bits.h>
+
 #define BCM2836_AUX_CLOCK_ENB          0x3f215004 /* BCM2835 AUX Clock enable 
register */
 #define BCM2836_AUX_CLOCK_EN_UART      BIT(0) /* Bit 0 enables the Miniuart */
 
-- 
2.39.0


Reply via email to