[PATCH V2 3/4] configs: imx8m: use common imx8m.h for i.MX8MP
Peng Fan (OSS)
peng.fan at oss.nxp.com
Thu May 5 11:10:45 CEST 2022
From: Peng Fan <peng.fan at nxp.com>
Some SPL definitions could be generalized, so use imx8m.h for iMX8MP.
Tested-by: Tim Harvey <tharvey at gateworks.com> #imx8mp-venice-*
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
include/configs/imx8m.h | 8 ++++++++
include/configs/imx8mp_evk.h | 17 +----------------
include/configs/imx8mp_rsb3720.h | 16 +---------------
include/configs/imx8mp_venice.h | 18 +-----------------
include/configs/phycore_imx8mp.h | 16 +---------------
include/configs/verdin-imx8mp.h | 16 +---------------
6 files changed, 13 insertions(+), 78 deletions(-)
diff --git a/include/configs/imx8m.h b/include/configs/imx8m.h
index e041bab0805..9dc92f7b2df 100644
--- a/include/configs/imx8m.h
+++ b/include/configs/imx8m.h
@@ -34,6 +34,14 @@
#define CONFIG_SYS_SPL_MALLOC_START 0x42200000
#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K
+#elif defined(CONFIG_IMX8MP)
+/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/
+#define CONFIG_SPL_STACK 0x960000
+#define CONFIG_SPL_BSS_START_ADDR 0x0098FC00
+#define CONFIG_SPL_BSS_MAX_SIZE 0x400
+#define CONFIG_SYS_SPL_MALLOC_START 0x42200000
+#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K
+
#endif
#endif
#endif
diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h
index 55691821f90..60c2d9ee4e4 100644
--- a/include/configs/imx8mp_evk.h
+++ b/include/configs/imx8mp_evk.h
@@ -6,27 +6,12 @@
#ifndef __IMX8MP_EVK_H
#define __IMX8MP_EVK_H
-#include <linux/sizes.h>
-#include <linux/stringify.h>
-#include <asm/arch/imx-regs.h>
+#include <configs/imx8m.h>
#define CONFIG_SYS_BOOTM_LEN (32 * SZ_1M)
-#define CONFIG_SPL_MAX_SIZE (152 * 1024)
-#define CONFIG_SYS_MONITOR_LEN (512 * 1024)
-#define CONFIG_SYS_UBOOT_BASE (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-
#ifdef CONFIG_SPL_BUILD
-/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/
-#define CONFIG_SPL_STACK 0x960000
-#define CONFIG_SPL_BSS_START_ADDR 0x0098FC00
-#define CONFIG_SPL_BSS_MAX_SIZE 0x400 /* 1 KB */
-#define CONFIG_SYS_SPL_MALLOC_START 0x42200000
-#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K /* 512 KB */
-
-
#define CONFIG_POWER_PCA9450
-
#endif
#if defined(CONFIG_CMD_NET)
diff --git a/include/configs/imx8mp_rsb3720.h b/include/configs/imx8mp_rsb3720.h
index 7c2babbb0ae..008439915d8 100644
--- a/include/configs/imx8mp_rsb3720.h
+++ b/include/configs/imx8mp_rsb3720.h
@@ -7,17 +7,11 @@
#ifndef __IMX8MP_RSB3720_H
#define __IMX8MP_RSB3720_H
-#include <linux/sizes.h>
-#include <linux/stringify.h>
-#include <asm/arch/imx-regs.h>
+#include <configs/imx8m.h>
#include <config_distro_bootcmd.h>
#define CONFIG_SYS_BOOTM_LEN (32 * SZ_1M)
-#define CONFIG_SPL_MAX_SIZE (152 * 1024)
-#define CONFIG_SYS_MONITOR_LEN (512 * 1024)
-#define CONFIG_SYS_UBOOT_BASE (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-
/* GUIDs for capsule updatable firmware images */
#define IMX8MP_RSB3720A1_4G_FIT_IMAGE_GUID \
EFI_GUID(0xb1251e89, 0x384a, 0x4635, 0xa8, 0x06, \
@@ -28,18 +22,10 @@
0x5f, 0xd3, 0x6b, 0x9b, 0xe5, 0xb9)
#ifdef CONFIG_SPL_BUILD
-#define CONFIG_SPL_STACK 0x960000
-#define CONFIG_SPL_BSS_START_ADDR 0x0098FC00
-#define CONFIG_SPL_BSS_MAX_SIZE 0x400 /* 1 KB */
-#define CONFIG_SYS_SPL_MALLOC_START 0x42200000
-#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K /* 512 KB */
-
#define CONFIG_MALLOC_F_ADDR 0x184000 /* malloc f used before \
* GD_FLG_FULL_MALLOC_INIT \
* set \
*/
-
-
#if defined(CONFIG_NAND_BOOT)
#define CONFIG_SPL_NAND_MXS
#endif
diff --git a/include/configs/imx8mp_venice.h b/include/configs/imx8mp_venice.h
index 161f2e8d366..0697a48b7ea 100644
--- a/include/configs/imx8mp_venice.h
+++ b/include/configs/imx8mp_venice.h
@@ -6,23 +6,7 @@
#ifndef __IMX8MP_VENICE_H
#define __IMX8MP_VENICE_H
-#include <asm/arch/imx-regs.h>
-#include <linux/sizes.h>
-
-#define CONFIG_SPL_MAX_SIZE (152 * 1024)
-#define CONFIG_SYS_MONITOR_LEN SZ_512K
-#define CONFIG_SYS_UBOOT_BASE \
- (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-
-#ifdef CONFIG_SPL_BUILD
-#define CONFIG_SPL_STACK 0x960000
-#define CONFIG_SPL_BSS_START_ADDR 0x0098FC00
-#define CONFIG_SPL_BSS_MAX_SIZE 0x400 /* 1 KB */
-#define CONFIG_SYS_SPL_MALLOC_START 0x42200000
-#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K /* 512 KB */
-
-/* For RAW image gives a error info not panic */
-#endif
+#include <configs/imx8m.h>
#define MEM_LAYOUT_ENV_SETTINGS \
"kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
diff --git a/include/configs/phycore_imx8mp.h b/include/configs/phycore_imx8mp.h
index 95d70bb92d1..eaa91f66bfd 100644
--- a/include/configs/phycore_imx8mp.h
+++ b/include/configs/phycore_imx8mp.h
@@ -7,26 +7,12 @@
#ifndef __PHYCORE_IMX8MP_H
#define __PHYCORE_IMX8MP_H
-#include <linux/sizes.h>
-#include <asm/arch/imx-regs.h>
+#include <configs/imx8m.h>
#define CONFIG_SYS_BOOTM_LEN SZ_64M
-#define CONFIG_SPL_MAX_SIZE (152 * SZ_1K)
-#define CONFIG_SYS_MONITOR_LEN SZ_512K
-#define CONFIG_SYS_UBOOT_BASE \
- (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
-
#ifdef CONFIG_SPL_BUILD
-#define CONFIG_SPL_STACK 0x960000
-#define CONFIG_SPL_BSS_START_ADDR 0x98FC00
-#define CONFIG_SPL_BSS_MAX_SIZE SZ_1K
-#define CONFIG_SYS_SPL_MALLOC_START 0x42200000
-#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K
-
-
#define CONFIG_POWER_PCA9450
-
#endif
#define CONFIG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/verdin-imx8mp.h b/include/configs/verdin-imx8mp.h
index 4f61a5e0582..941f3a95906 100644
--- a/include/configs/verdin-imx8mp.h
+++ b/include/configs/verdin-imx8mp.h
@@ -6,25 +6,11 @@
#ifndef __VERDIN_IMX8MP_H
#define __VERDIN_IMX8MP_H
-#include <asm/arch/imx-regs.h>
-#include <linux/sizes.h>
-
-#define CONFIG_SPL_MAX_SIZE (152 * 1024)
-#define CONFIG_SYS_MONITOR_LEN SZ_512K
-#define CONFIG_SYS_UBOOT_BASE \
- (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
+#include <configs/imx8m.h>
#ifdef CONFIG_SPL_BUILD
-/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/
-#define CONFIG_SPL_STACK 0x960000
-#define CONFIG_SPL_BSS_START_ADDR 0x0098fc00
-#define CONFIG_SPL_BSS_MAX_SIZE SZ_1K
-#define CONFIG_SYS_SPL_MALLOC_START 0x42200000
-#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K
-
/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
#define CONFIG_MALLOC_F_ADDR 0x184000
-/* For RAW image gives a error info not panic */
#define CONFIG_POWER_PCA9450
--
2.36.0
More information about the U-Boot
mailing list