[U-Boot] [PATCH v2 2/8] ARM: bcm283x: Add BCM283x_BASE define
Alexander Graf
graf at amazon.com
Fri Jul 26 11:16:33 UTC 2019
On 24.07.19 16:39, Andrei Gherzan wrote:
> From: Matthias Brugger <mbrugger at suse.com>
>
> Devices of bcm283x have different base address, depending if they are on
> bcm2835 or bcm2836/7. Use BCM283x_BASE depending on the SoC you want to
> build and only add the offset in the header files.
>
> Signed-off-by: Matthias Brugger <mbrugger at suse.com>
> Signed-off-by: Andrei Gherzan <andrei at balena.io>
> ---
> arch/arm/mach-bcm283x/Kconfig | 5 +++++
> arch/arm/mach-bcm283x/include/mach/mbox.h | 6 +-----
> arch/arm/mach-bcm283x/include/mach/sdhci.h | 6 +-----
> arch/arm/mach-bcm283x/include/mach/timer.h | 6 +-----
> arch/arm/mach-bcm283x/include/mach/wdog.h | 6 +-----
> 5 files changed, 9 insertions(+), 20 deletions(-)
>
> diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig
> index 3eb5a9a897..8e69914a83 100644
> --- a/arch/arm/mach-bcm283x/Kconfig
> +++ b/arch/arm/mach-bcm283x/Kconfig
> @@ -141,4 +141,9 @@ config SYS_SOC
> config SYS_CONFIG_NAME
> default "rpi"
>
> +config BCM283x_BASE
> + hex
> + default "0x20000000" if BCM2835
> + default "0x3f000000" if BCM2836 || BCM2837
How hard would it be to make the base a global variable instead and just
set it early on board init based on the FDT or maybe even CPU core
revision registers?
That would allow us to support RPi3 & 4 with the same U-Boot binary.
Alex
More information about the U-Boot
mailing list