diff options
author | Rouven Czerwinski <r.czerwinski@pengutronix.de> | 2019-01-15 06:44:09 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-02-05 12:39:10 +0100 |
commit | 9ce9ec82d542c1ec2ce14a01cbe903f7c0dbe41f (patch) | |
tree | a9ba346cf18ef16cb80aa01dfb33acf298f336df | |
parent | f1330536c09310e267f23516bc117a7d1e12aefa (diff) | |
download | barebox-9ce9ec82d542c1ec2ce14a01cbe903f7c0dbe41f.tar.gz barebox-9ce9ec82d542c1ec2ce14a01cbe903f7c0dbe41f.tar.xz |
ARM: rpi: use defines for uart bases
Previously the clkdev_add_phybase was called on magic register values,
add defines which clarify the device for which the phybase clkdev is created.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/boards/raspberry-pi/rpi-common.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c index f22239c7cc..219c9c7d2b 100644 --- a/arch/arm/boards/raspberry-pi/rpi-common.c +++ b/arch/arm/boards/raspberry-pi/rpi-common.c @@ -298,6 +298,10 @@ static int rpi_clock_init(void) } postconsole_initcall(rpi_clock_init); +#define BCM2835_PL011_BASE 0x20201000 +#define BCM2836_PL011_BASE 0x3f201000 +#define BCM2836_MINIUART_BASE 0x3f215040 + static int rpi_console_clock_init(void) { struct clk *clk; @@ -307,15 +311,15 @@ static int rpi_console_clock_init(void) clk = clk_fixed("uart0-pl0110", 3 * 1000 * 1000); clk_register_clkdev(clk, NULL, "uart0-pl0110"); - clkdev_add_physbase(clk, 0x20201000, NULL); - clkdev_add_physbase(clk, 0x3f201000, NULL); + clkdev_add_physbase(clk, BCM2835_PL011_BASE, NULL); + clkdev_add_physbase(clk, BCM2836_PL011_BASE, NULL); clk = rpi_register_firmware_clock(BCM2835_MBOX_CLOCK_ID_CORE, "uart1-8250"); if (IS_ERR(clk)) return PTR_ERR(clk); - clkdev_add_physbase(clk, 0x3f215040, NULL); + clkdev_add_physbase(clk, BCM2836_MINIUART_BASE, NULL); clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000); clk_register_clkdev(clk, NULL, "bcm2835-cs"); |