imx: imx8m: simplify code with a common header file
v2 cover imx: imx8m: simplify code with a common header file
From: Peng Fan <[email protected]>
V2:
write a cover-letter
Typo fix
Add T-b tags
Peng Fan (4):
configs: imx8m: use common imx8m.h for i.MX8MM
configs: imx8m: use common imx8m.h for i.MX8MN
configs: imx8m: use common imx8m.h for i.MX8MP
configs: imx8m: use common imx8m.h for i.MX8MQ
include/configs/imx8m.h | 57 +++++++++++++++++++++ include/configs/imx8mm-cl-iot-gate.h | 17 +----- include/configs/imx8mm_beacon.h | 21 +------- include/configs/imx8mm_data_modul_edm_sbc.h | 15 ++---- include/configs/imx8mm_evk.h | 21 +------- include/configs/imx8mm_icore_mx8mm.h | 20 +------- include/configs/imx8mm_venice.h | 18 +------ include/configs/imx8mn_bsh_smm_s2_common.h | 17 +----- include/configs/imx8mn_evk.h | 20 +------- include/configs/imx8mn_var_som.h | 15 +----- include/configs/imx8mn_venice.h | 18 +------ include/configs/imx8mp_evk.h | 17 +----- include/configs/imx8mp_rsb3720.h | 16 +----- include/configs/imx8mp_venice.h | 18 +------ include/configs/imx8mq_cm.h | 24 +-------- include/configs/imx8mq_evk.h | 19 +------ include/configs/imx8mq_phanbell.h | 19 +------ include/configs/kontron-sl-mx8mm.h | 14 +---- include/configs/kontron_pitx_imx8m.h | 19 +------ include/configs/phycore_imx8mm.h | 20 +------- include/configs/phycore_imx8mp.h | 16 +----- include/configs/pico-imx8mq.h | 20 +------- include/configs/verdin-imx8mm.h | 20 +------- include/configs/verdin-imx8mp.h | 16 +----- 24 files changed, 85 insertions(+), 392 deletions(-) create mode 100644 include/configs/imx8m.h
Signature · 1 line
2.36.0
PATCH v2 1/4 configs: imx8m: use common imx8m.h for i.MX8MM
From: Peng Fan <[email protected]>
Some SPL definitions could be generalized, so use imx8m.h for that. i.MX8MN/Q/P will follow up.
--- include/configs/imx8m.h | 29 +++++++++++++++++++++ include/configs/imx8mm-cl-iot-gate.h | 17 ++---------- include/configs/imx8mm_beacon.h | 21 +-------------- include/configs/imx8mm_data_modul_edm_sbc.h | 15 +++-------- include/configs/imx8mm_evk.h | 21 +-------------- include/configs/imx8mm_icore_mx8mm.h | 20 +------------- include/configs/imx8mm_venice.h | 18 ++----------- include/configs/kontron-sl-mx8mm.h | 14 +--------- include/configs/phycore_imx8mm.h | 20 +------------- include/configs/verdin-imx8mm.h | 20 +------------- 10 files changed, 42 insertions(+), 153 deletions(-) create mode 100644 include/configs/imx8m.h
include/configs/imx8m.h new file +29 -0
@@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright 2022 NXP +*/ + +#ifndef __IMX8MM_H +#define __IMX8MM_H + +#include <linux/sizes.h> +#include <linux/stringify.h> +#include <asm/arch/imx-regs.h> + +#define CONFIG_SPL_MAX_SIZE (148 * 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 0x920000 +#define CONFIG_SPL_BSS_START_ADDR 0x910000 +#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K +#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 0x930000 + +#endif +#endif
include/configs/imx8mm-cl-iot-gate.h +2 -15
@@ -6,28 +6,15 @@#ifndef __IMX8MM_CL_IOT_GATE_H#define __IMX8MM_CL_IOT_GATE_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 (148 * 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 0x920000 -#define CONFIG_SPL_BSS_START_ADDR 0x910000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K/* 8 KB */ -#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 -#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K/* 512 KB */ - +#undef CONFIG_MALLOC_F_ADDR/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ #define CONFIG_MALLOC_F_ADDR 0x912000 -/* For RAW image gives a error info not panic */ -#endif /* GUIDs for capsule updatable firmware images */
include/configs/imx8mm_beacon.h +1 -20
@@ -6,26 +6,7 @@#ifndef __IMX8MM_BEACON_H#define __IMX8MM_BEACON_H -#include <linux/sizes.h> -#include <asm/arch/imx-regs.h> - -#define CONFIG_SPL_MAX_SIZE (148 * 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 0x920000 -#define CONFIG_SPL_BSS_START_ADDR 0x910000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K/* 8 KB */ -#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 -#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K/* 512 KB */ - -/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ -#define CONFIG_MALLOC_F_ADDR 0x930000 -/* For RAW image gives a error info not panic */ - -#endif +#include <configs/imx8m.h> /* Initial environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \
include/configs/imx8mm_data_modul_edm_sbc.h +3 -12
@@ -6,26 +6,17 @@#ifndef __IMX8MM_DATA_MODUL_EDM_SBC_H#define __IMX8MM_DATA_MODUL_EDM_SBC_H -#include <linux/sizes.h> -#include <linux/stringify.h> -#include <asm/arch/imx-regs.h> +#include <configs/imx8m.h> #define CONFIG_SYS_BOOTM_LEN SZ_128M#define CONFIG_SPL_MAX_SIZE (148 * 1024) +#undef CONFIG_SYS_MONITOR_LEN#define CONFIG_SYS_MONITOR_LEN SZ_1M -#define CONFIG_SPL_STACK 0x920000#ifdef CONFIG_SPL_BUILD -#define CONFIG_SPL_BSS_START_ADDR 0x910000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K/* 8 kiB */ -#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 +#undef CONFIG_SYS_SPL_MALLOC_SIZE#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_16M/* 16 MiB */ - -#define CONFIG_MALLOC_F_ADDR 0x930000 - -/* For RAW image gives a error info not panic */ -#endif /* Link Definitions */
include/configs/imx8mm_evk.h +1 -20
@@ -6,28 +6,9 @@#ifndef __IMX8MM_EVK_H#define __IMX8MM_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 (64 * SZ_1M) -#define CONFIG_SPL_MAX_SIZE (148 * 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 0x920000 -#define CONFIG_SPL_BSS_START_ADDR 0x910000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K/* 8 KB */ -#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 -#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K/* 512 KB */ - -/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ -#define CONFIG_MALLOC_F_ADDR 0x930000 -/* For RAW image gives a error info not panic */ - -#endif #ifndef CONFIG_SPL_BUILD #define BOOT_TARGET_DEVICES (func) \
include/configs/imx8mm_icore_mx8mm.h +1 -19
@@ -7,25 +7,7 @@#ifndef __IMX8MM_ICORE_MX8MM_H#define __IMX8MM_ICORE_MX8MM_H -#include <linux/sizes.h> -#include <asm/arch/imx-regs.h> - -#define CONFIG_SPL_MAX_SIZE (148 * 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 0x920000 -# define CONFIG_SPL_BSS_START_ADDR 0x910000 -# define CONFIG_SPL_BSS_MAX_SIZE SZ_8K -# 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 0x930000 -/* For RAW image gives a error info not panic */ -#endif /* CONFIG_SPL_BUILD */ +#include <configs/imx8m.h> #ifndef CONFIG_SPL_BUILD #define BOOT_TARGET_DEVICES (func) \
include/configs/imx8mm_venice.h +2 -16
@@ -6,25 +6,11 @@#ifndef __IMX8MM_VENICE_H#define __IMX8MM_VENICE_H -#include <asm/arch/imx-regs.h> -#include <linux/sizes.h> - -#define CONFIG_SPL_MAX_SIZE (148 * 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_SPL_STACK 0x920000 -#define CONFIG_SPL_BSS_START_ADDR 0x910000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K -#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 +#undef CONFIG_SYS_SPL_MALLOC_SIZE#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_1M - -/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ -#define CONFIG_MALLOC_F_ADDR 0x930000 -/* For RAW image gives a error info not panic */ -#endif #define MEM_LAYOUT_ENV_SETTINGS \
include/configs/kontron-sl-mx8mm.h +1 -13
@@ -7,8 +7,7 @@#ifndef __KONTRON_MX8MM_CONFIG_H#define __KONTRON_MX8MM_CONFIG_H -#include <asm/arch/imx-regs.h> -#include <linux/sizes.h> +#include <configs/imx8m.h> #ifdef CONFIG_SPL_BUILD #include <config.h>
@@ -57,17 +56,6 @@#endif #define CONFIG_SYS_BOOTM_LEN SZ_64M -#define CONFIG_SPL_MAX_SIZE (148 * SZ_1K) - -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SPL_STACK 0x91fff0 -#define CONFIG_SPL_BSS_START_ADDR 0x910000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K -#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 0x930000 -#endif #define FEC_QUIRK_ENET_MAC
include/configs/phycore_imx8mm.h +1 -19
@@ -7,27 +7,9 @@#ifndef __PHYCORE_IMX8MM_H#define __PHYCORE_IMX8MM_H -#include <linux/sizes.h> -#include <linux/stringify.h> -#include <asm/arch/imx-regs.h> +#include <configs/imx8m.h> #define CONFIG_SYS_BOOTM_LEN SZ_64M -#define CONFIG_SPL_MAX_SIZE (148 * 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 0x920000 -#define CONFIG_SPL_BSS_START_ADDR 0x910000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K -#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 0x930000 -/* For RAW image gives a error info not panic */ -#endif #define CONFIG_EXTRA_ENV_SETTINGS \ "image=Image\0" \
include/configs/verdin-imx8mm.h +1 -19
@@ -6,28 +6,10 @@#ifndef __VERDIN_IMX8MM_H#define __VERDIN_IMX8MM_H -#include <asm/arch/imx-regs.h> -#include <linux/sizes.h> - -#define CONFIG_SPL_MAX_SIZE (148 * 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> #define CONFIG_SYS_BOOTM_LEN SZ_64M -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SPL_STACK 0x920000 -#define CONFIG_SPL_BSS_START_ADDR 0x910000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K/* 8 KB */ -#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 -#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K/* 512 KB */ - -/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ -#define CONFIG_MALLOC_F_ADDR 0x930000 -/* For RAW image gives a error info not panic */ -#endif -#define MEM_LAYOUT_ENV_SETTINGS \ "fdt_addr_r=0x44000000\0" \ "kernel_addr_r=0x42000000\0" \
Signature · 1 line
2.36.0
PATCH v2 2/4 configs: imx8m: use common imx8m.h for i.MX8MN
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Some SPL definitions could be generalized, so use imx8m.h for iMX8MN.
--- include/configs/imx8m.h | 10 ++++++++++ include/configs/imx8mn_bsh_smm_s2_common.h | 17 +---------------- include/configs/imx8mn_evk.h | 20 +------------------- include/configs/imx8mn_var_som.h | 15 +-------------- include/configs/imx8mn_venice.h | 18 +----------------- 5 files changed, 14 insertions(+), 66 deletions(-)
include/configs/imx8m.h +10 -0
@@ -16,6 +16,8 @@ (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)#ifdef CONFIG_SPL_BUILD + +#ifdef CONFIG_IMX8MM #define CONFIG_SPL_STACK 0x920000#define CONFIG_SPL_BSS_START_ADDR 0x910000#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K
@@ -25,5 +27,13 @@/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ #define CONFIG_MALLOC_F_ADDR 0x930000 +#elif defined(CONFIG_IMX8MN ) +#define CONFIG_SPL_STACK 0x980000 +#define CONFIG_SPL_BSS_START_ADDR 0x950000 +#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K +#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 +#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K + +#endif #endif #endif
include/configs/imx8mn_bsh_smm_s2_common.h +1 -16
@@ -6,25 +6,10 @@#ifndef __IMX8MN_BSH_SMM_S2_COMMON_H#define __IMX8MN_BSH_SMM_S2_COMMON_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 (148 * 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) - -#define CONFIG_SPL_STACK 0x980000 -#define CONFIG_SPL_BSS_START_ADDR 0x950000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K -#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 -#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K - - -#define MEM_LAYOUT_ENV_SETTINGS \ "scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ "kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
include/configs/imx8mn_evk.h +1 -19
@@ -6,28 +6,10 @@#ifndef __IMX8MN_EVK_H#define __IMX8MN_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 (148 * 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 0x980000 -#define CONFIG_SPL_BSS_START_ADDR 0x950000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K/* 8 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 -#ifndef CONFIG_SPL_BUILD #define BOOT_TARGET_DEVICES (func) \ func(MMC, mmc, 1) \
include/configs/imx8mn_var_som.h +1 -14
@@ -6,23 +6,10 @@#ifndef __IMX8MN_VAR_SOM_H#define __IMX8MN_VAR_SOM_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 (148 * 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) - -#define CONFIG_SPL_STACK 0x980000 -#define CONFIG_SPL_BSS_START_ADDR 0x950000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K -#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 -#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K -#define BOOT_TARGET_DEVICES (func) \ func(MMC, mmc, 1) \ func(MMC, mmc, 2) \
include/configs/imx8mn_venice.h +1 -17
@@ -6,23 +6,7 @@#ifndef __IMX8MM_VENICE_H#define __IMX8MM_VENICE_H -#include <asm/arch/imx-regs.h> -#include <linux/sizes.h> - -#define CONFIG_SPL_MAX_SIZE (148 * 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 0x980000 -#define CONFIG_SPL_BSS_START_ADDR 0x950000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K/* 8 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" \
Signature · 1 line
2.36.0
PATCH v2 3/4 configs: imx8m: use common imx8m.h for i.MX8MP
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Some SPL definitions could be generalized, so use imx8m.h for iMX8MP.
--- 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(-)
include/configs/imx8m.h +8 -0
@@ -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
include/configs/imx8mp_evk.h +1 -16
@@ -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 )
include/configs/imx8mp_rsb3720.h +1 -15
@@ -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
include/configs/imx8mp_venice.h +1 -17
@@ -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" \
include/configs/phycore_imx8mp.h +1 -15
@@ -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 \
include/configs/verdin-imx8mp.h +1 -15
@@ -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
Signature · 1 line
2.36.0
PATCH v2 4/4 configs: imx8m: use common imx8m.h for i.MX8MQ
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Some SPL definitions could be gerneralized, so use imx8m.h for iMX8MQ.
--- include/configs/imx8m.h | 10 ++++++++++ include/configs/imx8mq_cm.h | 24 +----------------------- include/configs/imx8mq_evk.h | 19 +------------------ include/configs/imx8mq_phanbell.h | 19 ++----------------- include/configs/kontron_pitx_imx8m.h | 19 +------------------ include/configs/pico-imx8mq.h | 20 +------------------- 6 files changed, 16 insertions(+), 95 deletions(-)
include/configs/imx8m.h +10 -0
@@ -42,6 +42,16 @@#define CONFIG_SYS_SPL_MALLOC_START 0x42200000#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K +#elif defined(CONFIG_IMX8MQ ) +/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/ +#define CONFIG_SPL_STACK 0x187FF0 +#define CONFIG_SPL_BSS_START_ADDR 0x00180000 +#define CONFIG_SPL_BSS_MAX_SIZE 0x2000/* 8 KB */ +#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000/* 512 KB */ +#define CONFIG_SYS_SPL_PTE_RAM_BASE 0x41580000 +/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ +#define CONFIG_MALLOC_F_ADDR 0x182000#endif #endif #endif
include/configs/imx8mq_cm.h +1 -23
@@ -6,32 +6,10 @@#ifndef __IMX8M_CM_H#define __IMX8M_CM_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 (124 * 1024) -#define CONFIG_SYS_MONITOR_LEN (512 * 1024) - -#ifdef CONFIG_SPL_BUILD -#define CONFIG_SPL_STACK 0x187FF0 -#define CONFIG_SPL_BSS_START_ADDR 0x00180000 -#define CONFIG_SPL_BSS_MAX_SIZE 0x2000/* 8 KB */ -#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 -#define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000/* 512 KB */ -#define CONFIG_SYS_SPL_PTE_RAM_BASE 0x41580000 - -/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ -#define CONFIG_MALLOC_F_ADDR 0x182000 -/* For RAW image gives a error info not panic */ - -#endif - -/* ENET Config */ -/* ENET1 */ -#ifndef CONFIG_SPL_BUILD #define BOOT_TARGET_DEVICES (func) \ func(MMC, mmc, 0) \
include/configs/imx8mq_evk.h +1 -18
@@ -6,28 +6,11 @@#ifndef __IMX8M_EVK_H#define __IMX8M_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 (64 * SZ_1M) -#define CONFIG_SPL_MAX_SIZE (124 * 1024) -#define CONFIG_SYS_MONITOR_LEN (512 * 1024) -#ifdef CONFIG_SPL_BUILD -/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/ -#define CONFIG_SPL_STACK 0x187FF0 -#define CONFIG_SPL_BSS_START_ADDR 0x00180000 -#define CONFIG_SPL_BSS_MAX_SIZE 0x2000/* 8 KB */ -#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 -#define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000/* 512 KB */ -#define CONFIG_SYS_SPL_PTE_RAM_BASE 0x41580000 - -/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ -#define CONFIG_MALLOC_F_ADDR 0x182000 -/* For RAW image gives a error info not panic */ -#define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08#endif
include/configs/imx8mq_phanbell.h +2 -17
@@ -6,25 +6,10 @@#ifndef __IMX8M_PHANBELL_H#define __IMX8M_PHANBELL_H -#include <linux/sizes.h> -#include <asm/arch/imx-regs.h> +#include <configs/imx8m.h> +#undef CONFIG_SPL_MAX_SIZE#define CONFIG_SPL_MAX_SIZE (172 * 1024) -#define CONFIG_SYS_MONITOR_LEN (512 * 1024) - -#ifdef CONFIG_SPL_BUILD -/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/ -#define CONFIG_SPL_STACK 0x187FF0 -#define CONFIG_SPL_BSS_START_ADDR 0x00180000 -#define CONFIG_SPL_BSS_MAX_SIZE 0x2000/* 8 KB */ -#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 -#define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000/* 512 KB */ -#define CONFIG_SYS_SPL_PTE_RAM_BASE 0x41580000 - -/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ -#define CONFIG_MALLOC_F_ADDR 0x182000 -/* For RAW image gives a error info not panic */ -#endif /* ENET Config */ /* ENET1 */
include/configs/kontron_pitx_imx8m.h +1 -18
@@ -3,33 +3,16 @@#ifndef __KONTRON_PITX_IMX8M_H#define __KONTRON_PITX_IMX8M_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 (124 * SZ_1K) -#define CONFIG_SYS_MONITOR_LEN (512 * SZ_1K) -/* GUID for capsule updatable firmware image */ #define KONTRON_PITX_IMX8M_FIT_IMAGE_GUID \ EFI_GUID(0xc898e959, 0x5b1f, 0x4e6d, 0x88, 0xe0, \ 0x40, 0xd4, 0x5c, 0xca, 0x13, 0x99)#ifdef CONFIG_SPL_BUILD -#define CONFIG_SPL_STACK 0x187FF0 -#define CONFIG_SPL_BSS_START_ADDR 0x00180000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K -#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 -#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K -#define CONFIG_SYS_SPL_PTE_RAM_BASE 0x41580000 - -/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ -#define CONFIG_MALLOC_F_ADDR 0x182000 -/* For RAW image gives a error info not panic */ - -#define CONFIG_POWER_PFUZE100 #define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08#endif
include/configs/pico-imx8mq.h +1 -19
@@ -6,25 +6,7 @@#ifndef __IMX8M_PICOPI_H#define __IMX8M_PICOPI_H -#include <linux/sizes.h> -#include <asm/arch/imx-regs.h> - -#define CONFIG_SPL_MAX_SIZE (124 * 1024) -#define CONFIG_SYS_MONITOR_LEN (512 * 1024) - -#ifdef CONFIG_SPL_BUILD -/*#define CONFIG_ENABLE_DDR_TRAINING_DEBUG*/ -#define CONFIG_SPL_STACK 0x187FF0 -#define CONFIG_SPL_BSS_START_ADDR 0x00180000 -#define CONFIG_SPL_BSS_MAX_SIZE 0x2000/* 8 KB */ -#define CONFIG_SYS_SPL_MALLOC_START 0x42200000 -#define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000/* 512 KB */ -#define CONFIG_SYS_SPL_PTE_RAM_BASE 0x41580000 - -/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ -#define CONFIG_MALLOC_F_ADDR 0x182000 -/* For RAW image gives a error info not panic */ -#endif +#include <configs/imx8m.h> /* ENET Config */ /* ENET1 */
Signature · 1 line
2.36.0