Message ID | 20220922121228.3243467-3-foss+uboot@0leil.net |
---|---|
State | Superseded |
Delegated to: | Kever Yang |
Headers | show |
Series | add support for Theobroma Systems PX30-��Q7 (Ringneck) with Haikou devkit | expand |
On 2022/9/22 20:12, Quentin Schulz wrote: > From: Quentin Schulz <quentin.schulz@theobroma-systems.com> > > BOOTROM sets a bit in a CPU register so that the software can know from > where the first stage bootloader was booted. One use case for this is to > specify the default loading medium for U-Boot proper to match the one > used by the BOOTROM to load the SPL (same-as-spl in > u-boot,spl-boot-order). > > Let's create the mapping between BOOTROM value and Device Tree node > names for MMC devices. > > Cc: Quentin Schulz <foss+uboot@0leil.net> > Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Thanks, - Kever > --- > arch/arm/mach-rockchip/px30/px30.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm/mach-rockchip/px30/px30.c b/arch/arm/mach-rockchip/px30/px30.c > index 0641e6af0f..481b50235e 100644 > --- a/arch/arm/mach-rockchip/px30/px30.c > +++ b/arch/arm/mach-rockchip/px30/px30.c > @@ -8,6 +8,7 @@ > #include <init.h> > #include <asm/armv8/mmu.h> > #include <asm/io.h> > +#include <asm/arch-rockchip/bootrom.h> > #include <asm/arch-rockchip/grf_px30.h> > #include <asm/arch-rockchip/hardware.h> > #include <asm/arch-rockchip/uart.h> > @@ -15,6 +16,11 @@ > #include <asm/arch-rockchip/cru_px30.h> > #include <dt-bindings/clock/px30-cru.h> > > +const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = { > + [BROM_BOOTSOURCE_EMMC] = "/mmc@ff390000", > + [BROM_BOOTSOURCE_SD] = "/mmc@ff370000", > +}; > + > static struct mm_region px30_mem_map[] = { > { > .virt = 0x0UL,
diff --git a/arch/arm/mach-rockchip/px30/px30.c b/arch/arm/mach-rockchip/px30/px30.c index 0641e6af0f..481b50235e 100644 --- a/arch/arm/mach-rockchip/px30/px30.c +++ b/arch/arm/mach-rockchip/px30/px30.c @@ -8,6 +8,7 @@ #include <init.h> #include <asm/armv8/mmu.h> #include <asm/io.h> +#include <asm/arch-rockchip/bootrom.h> #include <asm/arch-rockchip/grf_px30.h> #include <asm/arch-rockchip/hardware.h> #include <asm/arch-rockchip/uart.h> @@ -15,6 +16,11 @@ #include <asm/arch-rockchip/cru_px30.h> #include <dt-bindings/clock/px30-cru.h> +const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = { + [BROM_BOOTSOURCE_EMMC] = "/mmc@ff390000", + [BROM_BOOTSOURCE_SD] = "/mmc@ff370000", +}; + static struct mm_region px30_mem_map[] = { { .virt = 0x0UL,