On 1/10/24 04:29, Ivan T. Ivanov wrote:
From: Dmitry Malkin <dmi...@bedrocksystems.com>

MBOX and Watchdog on RPi5/bcm2712 has a different base IO offsets.

s/has a/have a /

Find them via devicetree blob passed by bootloader.

Signed-off-by: Dmitry Malkin <dmi...@bedrocksystems.com>
Reviewed-by: Matthias Brugger <mbrug...@suse.com>
Signed-off-by: Ivan T. Ivanov <iiva...@suse.de>
---
  arch/arm/mach-bcm283x/include/mach/base.h  |  5 ++-
  arch/arm/mach-bcm283x/include/mach/mbox.h  |  3 +-
  arch/arm/mach-bcm283x/include/mach/sdhci.h |  3 +-
  arch/arm/mach-bcm283x/include/mach/timer.h |  3 +-
  arch/arm/mach-bcm283x/include/mach/wdog.h  |  3 +-
  arch/arm/mach-bcm283x/init.c               | 43 ++++++++++++++++++----
  6 files changed, 43 insertions(+), 17 deletions(-)

diff --git a/arch/arm/mach-bcm283x/include/mach/base.h 
b/arch/arm/mach-bcm283x/include/mach/base.h
index 4ccaf69693..6de99e7ea1 100644
--- a/arch/arm/mach-bcm283x/include/mach/base.h
+++ b/arch/arm/mach-bcm283x/include/mach/base.h
@@ -6,7 +6,10 @@
  #ifndef _BCM283x_BASE_H_
  #define _BCM283x_BASE_H_
-extern unsigned long rpi_bcm283x_base;
+extern unsigned long rpi_mbox_base;
+extern unsigned long rpi_timer_base;
+extern unsigned long rpi_sdhci_base;
+extern unsigned long rpi_wdog_base;

Maybe suffix those variables with _phys_base to denote they are physical addresses, even if you seem to use a 1:1 mapping between virtual and physical, knowing which type of address we are dealing with right away is clearer.
--
Florian

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to