diff mbox series

[RFC,3/8] rockchip: remove unneeded CONFIG_SPL_PAD_TO

Message ID 20220715153655.955874-4-foss+uboot@0leil.net
State RFC
Delegated to: Kever Yang
Headers show
Series migrate u-boot-rockchip.bin to binman and generate an image for SPI | expand

Commit Message

Quentin Schulz July 15, 2022, 3:36 p.m. UTC
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

Since binman takes care of setting the appropriate offset for the SPL
payload, there's no need to define this variable anymore.

Moreover, it is technically incorrect since the padding is different
depending on whether the first stage bootloader is for a SPI flash or
MMC storage medium.

Finally, this allows to use the CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
config option without redefining CONFIG_SPL_PAD_TO in other board header
files.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 arch/arm/dts/rockchip-u-boot.dtsi | 2 +-
 include/configs/rockchip-common.h | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/arch/arm/dts/rockchip-u-boot.dtsi b/arch/arm/dts/rockchip-u-boot.dtsi
index aef6c379e2..fc28ce5187 100644
--- a/arch/arm/dts/rockchip-u-boot.dtsi
+++ b/arch/arm/dts/rockchip-u-boot.dtsi
@@ -38,7 +38,7 @@ 
 #else
 		u-boot-img {
 #endif
-			offset = <CONFIG_SPL_PAD_TO>;
+			offset = <((CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR - 64) * 512)>;
 		};
 	};
 };
diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index 0c08776ae2..40d5a02fc8 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -9,8 +9,6 @@ 
 
 #define CONFIG_SYS_NS16550_MEM32
 
-/* ((CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR - 64) * 512) */
-#define CONFIG_SPL_PAD_TO		8355840
 
 #ifndef CONFIG_SPL_BUILD