rockchip: intruduce common BROM_BOOTSOURCE_ID_ADDR
authorKever Yang <kever.yang@rock-chips.com>
Mon, 22 Jul 2019 11:59:10 +0000 (19:59 +0800)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 26 Jul 2019 09:30:26 +0000 (17:30 +0800)
The boot source from BootRom is store at a fix offset of IRAM,
update to use the common macro instead of rk3399 specific one.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/include/asm/arch-rockchip/bootrom.h
arch/arm/mach-rockchip/rk3399-board-spl.c

index d67f43f09c5ead8f7950801fe445755bcf6341ef..3499227e291710190a0d3b42c79416e765e1fb9b 100644 (file)
@@ -55,6 +55,6 @@ enum {
 /**
  * Locations of the boot-device identifier in SRAM
  */
-#define RK3399_BROM_BOOTSOURCE_ID_ADDR   0xff8c0010
+#define BROM_BOOTSOURCE_ID_ADDR   (CONFIG_IRAM_BASE + 0x10)
 
 #endif
index 7154d8e5d085919c744c59fa7a3d804c3054bfd2..3624c8ea65db5d1155ee2c69b6fe78821f5756ad 100644 (file)
@@ -35,7 +35,7 @@ static const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1] = {
 
 const char *board_spl_was_booted_from(void)
 {
-       u32  bootdevice_brom_id = readl(RK3399_BROM_BOOTSOURCE_ID_ADDR);
+       u32  bootdevice_brom_id = readl(BROM_BOOTSOURCE_ID_ADDR);
        const char *bootdevice_ofpath = NULL;
 
        if (bootdevice_brom_id < ARRAY_SIZE(boot_devices))