[PATCH 05/11] ARM: rpi: support raspberry pi 1 and zero mini-uart

Ahmad Fatoum ahmad at a3f.at
Sat Nov 28 16:39:28 EST 2020


We don't have a clock driver for the raspberry pi, so board code needs
to list which used devices have clocks that are already known to be active
on boot. The Mini UART is one such device. We already wave away the
clock on the BCM2836, do the same for the BCM2835 as well.

Cc: Roland Hieber <rhi at pengutronix.de>
Signed-off-by: Ahmad Fatoum <ahmad at a3f.at>
---
 arch/arm/boards/raspberry-pi/rpi-common.c     | 1 +
 arch/arm/mach-bcm283x/include/mach/platform.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c
index 292bcba608d4..46c8ad6f52d9 100644
--- a/arch/arm/boards/raspberry-pi/rpi-common.c
+++ b/arch/arm/boards/raspberry-pi/rpi-common.c
@@ -347,6 +347,7 @@ static int rpi_console_clock_init(void)
 	if (IS_ERR(clk))
 		return PTR_ERR(clk);
 
+	clkdev_add_physbase(clk, BCM2835_MINIUART_BASE, NULL);
 	clkdev_add_physbase(clk, BCM2836_MINIUART_BASE, NULL);
 
 	clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000);
diff --git a/arch/arm/mach-bcm283x/include/mach/platform.h b/arch/arm/mach-bcm283x/include/mach/platform.h
index d8561c1610f1..310f2463f2e5 100644
--- a/arch/arm/mach-bcm283x/include/mach/platform.h
+++ b/arch/arm/mach-bcm283x/include/mach/platform.h
@@ -32,6 +32,7 @@
 
 #define BCM2835_PL011_BASE 0x20201000
 #define BCM2836_PL011_BASE 0x3f201000
+#define BCM2835_MINIUART_BASE 0x20215040
 #define BCM2836_MINIUART_BASE 0x3f215040
 
 #endif
-- 
2.28.0




More information about the barebox mailing list