[PATCH 1/6] mach-bcm2835/core: add clkdev for uart1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a clkdev for uart1 which will be used on the Raspberry Pi 3.
Double the clockrate since the ns16550 driver used for the uart will divide by
16, while the bcm2835 peripheral manual describes that the bcm2835 miniuart will
only divide by 8.

Signed-off-by: Rouven Czerwinski <r.czerwinski@xxxxxxxxxxxxxx>
---
 arch/arm/mach-bcm283x/core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/mach-bcm283x/core.c b/arch/arm/mach-bcm283x/core.c
index f1dcda86f..66af76b09 100644
--- a/arch/arm/mach-bcm283x/core.c
+++ b/arch/arm/mach-bcm283x/core.c
@@ -42,6 +42,12 @@ static int bcm2835_clk_init(void)
 	clk_register_clkdev(clk, NULL, "uart0-pl0110");
 	clkdev_add_physbase(clk, 0x20201000, NULL);
 	clkdev_add_physbase(clk, 0x3f201000, NULL);
+	/*
+	 * We double the clock rate since the 16550 will divide by 16
+	 * (instead of 8 required by the BCM2835 peripheral manual)
+	 */
+	clk = clk_fixed("uart1-8250", 500 * 1000 * 1000);
+	clkdev_add_physbase(clk, 0x3f215040, NULL);
 
 	clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000);
 	clk_register_clkdev(clk, NULL, "bcm2835-cs");
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux