[U-Boot] [PATCH v3 14/22] config: pcm052: Use SZ_X{MK} from linux/sizes.h for include/configs/pcm052.h

Marcel Ziswiler marcel.ziswiler at toradex.com
Tue Feb 12 00:16:23 UTC 2019


On Sun, 2019-02-03 at 00:02 +0100, Lukasz Majewski wrote:
> Signed-off-by: Lukasz Majewski <lukma at denx.de>

Reviewed-by: Marcel Ziswiler <marcel.ziswiler at toradex.com>

> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>  include/configs/pcm052.h | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h
> index c2ecb7ec18..fb8f3c8609 100644
> --- a/include/configs/pcm052.h
> +++ b/include/configs/pcm052.h
> @@ -9,6 +9,7 @@
>  #define __CONFIG_H
>  
>  #include <asm/arch/imx-regs.h>
> +#include <linux/sizes.h>
>  
>  #define CONFIG_SKIP_LOWLEVEL_INIT
>  
> @@ -16,7 +17,7 @@
>  #define CONFIG_CMDLINE_TAG
>  
>  /* Size of malloc() pool */
> -#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 2 *
> 1024 * 1024)
> +#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 2 *
> SZ_1M)
>  
>  /* Allow to overwrite serial and ethaddr */
>  #define CONFIG_ENV_OVERWRITE
> @@ -27,7 +28,7 @@
>  #define CONFIG_SYS_MAX_NAND_DEVICE	1
>  /* QSPI Configs*/
>  #ifdef CONFIG_FSL_QSPI
> -#define FSL_QSPI_FLASH_SIZE		(1 << 24)
> +#define FSL_QSPI_FLASH_SIZE		(SZ_16M)
>  #define FSL_QSPI_FLASH_NUM		2
>  #define CONFIG_SYS_FSL_QSPI_LE
>  #endif
> @@ -154,7 +155,7 @@
>  
>  /* Physical memory map */
>  #define PHYS_SDRAM			(0x80000000)
> -#define PHYS_SDRAM_SIZE			(CONFIG_PCM052_DDR_SIZE
> * 1024 * 1024)
> +#define PHYS_SDRAM_SIZE			(CONFIG_PCM052_DDR_SIZE
> * SZ_1M)
>  
>  #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
>  #define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
> @@ -167,17 +168,17 @@
>  
>  /* environment organization */
>  #ifdef CONFIG_ENV_IS_IN_MMC
> -#define CONFIG_ENV_SIZE			(8 * 1024)
> +#define CONFIG_ENV_SIZE			(SZ_8K)
>  
> -#define CONFIG_ENV_OFFSET		(12 * 64 * 1024)
> +#define CONFIG_ENV_OFFSET		(12 * SZ_64K)
>  #define CONFIG_SYS_MMC_ENV_DEV		0
>  #endif
>  
>  #ifdef CONFIG_ENV_IS_IN_NAND
> -#define CONFIG_ENV_SECT_SIZE		(128 * 1024)
> -#define CONFIG_ENV_SIZE			(8 * 1024)
> +#define CONFIG_ENV_SECT_SIZE		(SZ_128K)
> +#define CONFIG_ENV_SIZE			(SZ_8K)
>  #define CONFIG_ENV_OFFSET		0xA0000
> -#define CONFIG_ENV_SIZE_REDUND		(8 * 1024)
> +#define CONFIG_ENV_SIZE_REDUND		(SZ_8K)
>  #define CONFIG_ENV_OFFSET_REDUND	0xC0000
>  #endif


More information about the U-Boot mailing list