[PATCH 07/12] rockchip: rk3588: Add boot device detection

Kever Yang kever.yang at rock-chips.com
Tue Mar 14 04:22:58 CET 2023


On 2023/3/14 08:38, Jonas Karlman wrote:
> Enable SPL on RK3588 to detect which device it was booted from.
> Fixes use of same-as-spl in u-boot,spl-boot-order prop.
>
> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>

Thanks,
- Kever
> ---
>   arch/arm/mach-rockchip/rk3588/rk3588.c | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/mach-rockchip/rk3588/rk3588.c b/arch/arm/mach-rockchip/rk3588/rk3588.c
> index 2ee1db47671f..18e67b5ca9b2 100644
> --- a/arch/arm/mach-rockchip/rk3588/rk3588.c
> +++ b/arch/arm/mach-rockchip/rk3588/rk3588.c
> @@ -8,6 +8,7 @@
>   #include <spl.h>
>   #include <asm/armv8/mmu.h>
>   #include <asm/io.h>
> +#include <asm/arch-rockchip/bootrom.h>
>   #include <asm/arch-rockchip/hardware.h>
>   #include <asm/arch-rockchip/ioc_rk3588.h>
>   
> @@ -36,6 +37,12 @@ DECLARE_GLOBAL_DATA_PTR;
>   #define BUS_IOC_GPIO2D_IOMUX_SEL_H	0x5c
>   #define BUS_IOC_GPIO3A_IOMUX_SEL_L	0x60
>   
> +const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
> +	[BROM_BOOTSOURCE_EMMC] = "/mmc at fe2e0000",
> +	[BROM_BOOTSOURCE_SPINOR] = "/spi at fe2b0000/flash at 0",
> +	[BROM_BOOTSOURCE_SD] = "/mmc at fe2c0000",
> +};
> +
>   static struct mm_region rk3588_mem_map[] = {
>   	{
>   		.virt = 0x0UL,


More information about the U-Boot mailing list