From 2fc7c6546b7eb075f63e485d4e1e5a77bb1fc318 Mon Sep 17 00:00:00 2001
From: Luis Gerhorst <privat@luisgerhorst.de>
Date: Wed, 16 Dec 2020 10:08:55 +0100
Subject: [PATCH] Remove arm_timer printk, bcm2835-system-timer has size 0x20

---
 boards/arm/qemu_raspi3/qemu_raspi3.dts | 2 +-
 drivers/timer/bcm2835_arm_timer.c      | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/boards/arm/qemu_raspi3/qemu_raspi3.dts b/boards/arm/qemu_raspi3/qemu_raspi3.dts
index 773cbe11326..475ba056d50 100644
--- a/boards/arm/qemu_raspi3/qemu_raspi3.dts
+++ b/boards/arm/qemu_raspi3/qemu_raspi3.dts
@@ -63,7 +63,7 @@
         /* https://github.com/s-matyukevich/raspberry-pi-os/blob/master/docs/lesson03/rpi-os.md#timer-initialization */
 		timer@3f003000 {
 			compatible = "brcm,bcm2835-system-timer";
-			reg = <0x3f003000 0x1000>;
+			reg = <0x3f003000 0x20>;
 			interrupts = <1 0>, <1 1>, <1 2>, <1 3>;
 			/* This could be a reference to BCM2835_CLOCK_TIMER,
 			 * but we don't have the driver using the common clock
diff --git a/drivers/timer/bcm2835_arm_timer.c b/drivers/timer/bcm2835_arm_timer.c
index c0661d2a0c0..841b7390e9b 100644
--- a/drivers/timer/bcm2835_arm_timer.c
+++ b/drivers/timer/bcm2835_arm_timer.c
@@ -29,7 +29,6 @@
 #define ARM_TIMER_IRQ (64+0)
 
 static void put32(intptr_t addr, uint32_t value) {
-	printk("%s(%p, %x)\n", __func__, (void *) addr, value);
 	sys_write32(value, addr);
 }
 
@@ -61,7 +60,6 @@ uint32_t z_clock_elapsed(void)
 
 int z_clock_driver_init(const struct device *device)
 {
-	printk("%s\n", __func__);
 	IRQ_CONNECT(ARM_TIMER_IRQ, 0, bcm2835_arm_timer_irq_handler, NULL, 0);
 	for (int i = 0; i < (64+8); i++) {
 		irq_enable(i);
@@ -72,5 +70,4 @@ int z_clock_driver_init(const struct device *device)
 	// system timer.
 	put32(ARM_TIMER_LOAD, k_ticks_to_cyc_floor32(1));
 	put32(ARM_TIMER_CTRL, CTRL_ENABLE | CTRL_INT_ENABLE | CTRL_23BIT);
-	printk("%s done\n", __func__);
 }
-- 
GitLab