summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-02-23 12:28:16 -0500
committerTom Rini <trini@konsulko.com>2022-03-03 16:51:19 -0500
commit43ea56465299944afb5562f15127e70e6e3b8f38 (patch)
tree025dff056c99a1e5862fc0f2e405a8a85e106235
parenta3041d934f80b142c055c809299ef5c0ceb8fa6e (diff)
arm: exynos: Move BL1/2 SPI flash defines to their user, drop CONFIG
These particular values are not configurable and today we always set CONFIG_SECURE_BL1_ONLY. Move these to where they're used in the code, and drop from the CONFIG namespace. Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
-rw-r--r--arch/arm/mach-exynos/spl_boot.c30
-rw-r--r--include/configs/exynos5-common.h24
-rw-r--r--include/configs/origen.h5
-rw-r--r--include/configs/smdkv310.h5
4 files changed, 30 insertions, 34 deletions
diff --git a/arch/arm/mach-exynos/spl_boot.c b/arch/arm/mach-exynos/spl_boot.c
index 722449881a..93fea9c749 100644
--- a/arch/arm/mach-exynos/spl_boot.c
+++ b/arch/arm/mach-exynos/spl_boot.c
@@ -22,6 +22,36 @@
#include "common_setup.h"
#include "clock_init.h"
+#ifdef CONFIG_ARCH_EXYNOS5
+#define SECURE_BL1_ONLY
+
+/* Secure FW size configuration */
+#ifdef SECURE_BL1_ONLY
+#define SEC_FW_SIZE (8 << 10) /* 8KB */
+#else
+#define SEC_FW_SIZE 0
+#endif
+
+/* Configuration of BL1, BL2, ENV Blocks on mmc */
+#define RES_BLOCK_SIZE (512)
+#define BL1_SIZE (16 << 10) /*16 K reserved for BL1*/
+#define BL2_SIZE (512UL << 10UL) /* 512 KB */
+
+#define BL1_OFFSET (RES_BLOCK_SIZE + SEC_FW_SIZE)
+#define BL2_OFFSET (BL1_OFFSET + BL1_SIZE)
+
+/* U-Boot copy size from boot Media to DRAM.*/
+#define BL2_START_OFFSET (BL2_OFFSET/512)
+#define BL2_SIZE_BLOC_COUNT (BL2_SIZE/512)
+
+#define EXYNOS_COPY_SPI_FNPTR_ADDR 0x02020058
+#define SPI_FLASH_UBOOT_POS (SEC_FW_SIZE + BL1_SIZE)
+#elif defined(CONFIG_ARCH_EXYNOS4)
+#define COPY_BL2_SIZE 0x80000
+#define BL2_START_OFFSET ((CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)/512)
+#define BL2_SIZE_BLOC_COUNT (COPY_BL2_SIZE/512)
+#endif
+
DECLARE_GLOBAL_DATA_PTR;
/* Index into irom ptr table */
diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index 90d095d535..410243bb2c 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -58,30 +58,6 @@
#define CONFIG_SYS_MONITOR_BASE 0x00000000
-#define CONFIG_SECURE_BL1_ONLY
-
-/* Secure FW size configuration */
-#ifdef CONFIG_SECURE_BL1_ONLY
-#define CONFIG_SEC_FW_SIZE (8 << 10) /* 8KB */
-#else
-#define CONFIG_SEC_FW_SIZE 0
-#endif
-
-/* Configuration of BL1, BL2, ENV Blocks on mmc */
-#define CONFIG_RES_BLOCK_SIZE (512)
-#define CONFIG_BL1_SIZE (16 << 10) /*16 K reserved for BL1*/
-#define CONFIG_BL2_SIZE (512UL << 10UL) /* 512 KB */
-
-#define CONFIG_BL1_OFFSET (CONFIG_RES_BLOCK_SIZE + CONFIG_SEC_FW_SIZE)
-#define CONFIG_BL2_OFFSET (CONFIG_BL1_OFFSET + CONFIG_BL1_SIZE)
-
-/* U-Boot copy size from boot Media to DRAM.*/
-#define BL2_START_OFFSET (CONFIG_BL2_OFFSET/512)
-#define BL2_SIZE_BLOC_COUNT (CONFIG_BL2_SIZE/512)
-
-#define EXYNOS_COPY_SPI_FNPTR_ADDR 0x02020058
-#define SPI_FLASH_UBOOT_POS (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE)
-
/* SPI */
/* Ethernet Controllor Driver */
diff --git a/include/configs/origen.h b/include/configs/origen.h
index 1caeed6ba5..22325180ce 100644
--- a/include/configs/origen.h
+++ b/include/configs/origen.h
@@ -58,9 +58,4 @@
#define CONFIG_SYS_INIT_SP_ADDR 0x02040000
-/* U-Boot copy size from boot Media to DRAM.*/
-#define COPY_BL2_SIZE 0x80000
-#define BL2_START_OFFSET ((CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)/512)
-#define BL2_SIZE_BLOC_COUNT (COPY_BL2_SIZE/512)
-
#endif /* __CONFIG_H */
diff --git a/include/configs/smdkv310.h b/include/configs/smdkv310.h
index f113fa4404..32196a5aef 100644
--- a/include/configs/smdkv310.h
+++ b/include/configs/smdkv310.h
@@ -51,11 +51,6 @@
#define CONFIG_SYS_INIT_SP_ADDR 0x02040000
-/* U-Boot copy size from boot Media to DRAM.*/
-#define COPY_BL2_SIZE 0x80000
-#define BL2_START_OFFSET ((CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)/512)
-#define BL2_SIZE_BLOC_COUNT (COPY_BL2_SIZE/512)
-
/* Ethernet Controllor Driver */
#ifdef CONFIG_CMD_NET
#define CONFIG_ENV_SROM_BANK 1