Re: [PATCH 2/4] configs: imx8m: use common imx8m.h for i.MX8MN

2022-05-04 Thread Ariel D'Alessandro
Peng,

On 5/4/22 16:30, Ariel D'Alessandro wrote:
> Hi Peng,
> 
> On 5/3/22 12:43, Tim Harvey wrote:
>> On Tue, May 3, 2022 at 4:39 AM Peng Fan (OSS)  wrote:
>>>
>>> From: Peng Fan 
>>>
>>> Some SPL definitions could be gerneralized, so use imx8m.h for iMX8MN.
>>>
>>
>> Peng,
>>
>> s/gerneralized/generalized
>>
>> (looks like that typo is all the patches in your series)
>>
>> Great cleanup - thanks! This is a great start to getting rid of the
>> remaining items in the config headers.
>>
>> If you do end up doing a 2nd version you can probably remove the
>> comments on the sizes, for example  'SZ_8K /* 8 KB */'' as I think the
>> comment is not needed.
>>
>> Works great for imx8mn-venice-*.
>>
>> Tested-by: Tim Harvey  #imx8mm-venice-*
> 
> Thanks a lot for the cleanup! I agree with Tim's comments, would be
> worth removing those redundant sizes comments.
> 
> Tested on i.MX8MN BSH SMM S2 PRO board.
> Tested-by: Ariel D'Alessandro 

Tested on i.MX8MN Variscite Symphony board
Tested-by: Ariel D'Alessandro 

> 
>>
>>> Signed-off-by: Peng Fan 
>>> ---
>>>  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(-)
> 
> [snip]


Re: [PATCH 2/4] configs: imx8m: use common imx8m.h for i.MX8MN

2022-05-04 Thread Ariel D'Alessandro
Hi Peng,

On 5/3/22 12:43, Tim Harvey wrote:
> On Tue, May 3, 2022 at 4:39 AM Peng Fan (OSS)  wrote:
>>
>> From: Peng Fan 
>>
>> Some SPL definitions could be gerneralized, so use imx8m.h for iMX8MN.
>>
> 
> Peng,
> 
> s/gerneralized/generalized
> 
> (looks like that typo is all the patches in your series)
> 
> Great cleanup - thanks! This is a great start to getting rid of the
> remaining items in the config headers.
> 
> If you do end up doing a 2nd version you can probably remove the
> comments on the sizes, for example  'SZ_8K /* 8 KB */'' as I think the
> comment is not needed.
> 
> Works great for imx8mn-venice-*.
> 
> Tested-by: Tim Harvey  #imx8mm-venice-*

Thanks a lot for the cleanup! I agree with Tim's comments, would be
worth removing those redundant sizes comments.

Tested on i.MX8MN BSH SMM S2 PRO board.
Tested-by: Ariel D'Alessandro 

> 
>> Signed-off-by: Peng Fan 
>> ---
>>  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(-)

[snip]


Re: [PATCH 2/4] configs: imx8m: use common imx8m.h for i.MX8MN

2022-05-03 Thread Tim Harvey
On Tue, May 3, 2022 at 4:39 AM Peng Fan (OSS)  wrote:
>
> From: Peng Fan 
>
> Some SPL definitions could be gerneralized, so use imx8m.h for iMX8MN.
>

Peng,

s/gerneralized/generalized

(looks like that typo is all the patches in your series)

Great cleanup - thanks! This is a great start to getting rid of the
remaining items in the config headers.

If you do end up doing a 2nd version you can probably remove the
comments on the sizes, for example  'SZ_8K /* 8 KB */'' as I think the
comment is not needed.

Works great for imx8mn-venice-*.

Tested-by: Tim Harvey  #imx8mm-venice-*

> Signed-off-by: Peng Fan 
> ---
>  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(-)
>
> diff --git a/include/configs/imx8m.h b/include/configs/imx8m.h
> index 3d4ea834bd0..30dc01221e6 100644
> --- a/include/configs/imx8m.h
> +++ b/include/configs/imx8m.h
> @@ -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   0x92
>  #define CONFIG_SPL_BSS_START_ADDR  0x91
>  #define CONFIG_SPL_BSS_MAX_SIZESZ_8K   /* 8 KB */
> @@ -25,5 +27,13 @@
>  /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */
>  #define CONFIG_MALLOC_F_ADDR   0x93
>
> +#elif defined(CONFIG_IMX8MN)
> +#define CONFIG_SPL_STACK   0x98
> +#define CONFIG_SPL_BSS_START_ADDR  0x95
> +#define CONFIG_SPL_BSS_MAX_SIZESZ_8K   /* 8 KB */
> +#define CONFIG_SYS_SPL_MALLOC_START0x4220
> +#define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K /* 512 KB */
> +
> +#endif
>  #endif
>  #endif
> diff --git a/include/configs/imx8mn_bsh_smm_s2_common.h 
> b/include/configs/imx8mn_bsh_smm_s2_common.h
> index 57be38d9433..eb210dc597b 100644
> --- a/include/configs/imx8mn_bsh_smm_s2_common.h
> +++ b/include/configs/imx8mn_bsh_smm_s2_common.h
> @@ -6,25 +6,10 @@
>  #ifndef __IMX8MN_BSH_SMM_S2_COMMON_H
>  #define __IMX8MN_BSH_SMM_S2_COMMON_H
>
> -#include 
> -#include 
> -#include 
> +#include 
>
>  #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   0x98
> -#define CONFIG_SPL_BSS_START_ADDR  0x95
> -#define CONFIG_SPL_BSS_MAX_SIZESZ_8K
> -#define CONFIG_SYS_SPL_MALLOC_START0x4220
> -#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" \
> diff --git a/include/configs/imx8mn_evk.h b/include/configs/imx8mn_evk.h
> index c0e9b0e9872..6e21192ea03 100644
> --- a/include/configs/imx8mn_evk.h
> +++ b/include/configs/imx8mn_evk.h
> @@ -6,28 +6,10 @@
>  #ifndef __IMX8MN_EVK_H
>  #define __IMX8MN_EVK_H
>
> -#include 
> -#include 
> -#include 
> +#include 
>
>  #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   0x98
> -#define CONFIG_SPL_BSS_START_ADDR  0x95
> -#define CONFIG_SPL_BSS_MAX_SIZESZ_8K   /* 8 KB */
> -#define CONFIG_SYS_SPL_MALLOC_START0x4220
> -#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) \
> diff --git a/include/configs/imx8mn_var_som.h 
> b/include/configs/imx8mn_var_som.h
> index 6ce60b0d704..fc9c4ca4530 100644
> --- a/include/configs/imx8mn_var_som.h
> +++ b/include/configs/imx8mn_var_som.h
> @@ -6,23 +6,10 @@
>  #ifndef __IMX8MN_VAR_SOM_H
>  #define __IMX8MN_VAR_SOM_H
>
> -#include 
> -#include 
> -#include 
> +#include 
>
>  #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   0x98
> -#define CONFIG_SPL_BSS_START_ADDR  0x95
> -#define CONFIG_SPL_BSS_MAX_SIZESZ_8K
> -#define