On 23/07/2016 18:23, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.este...@nxp.com>
> 
> imx_ddr_size() can be used to calculate the DDR size in runtime.
> 
> By using this function we no longer need to define PHYS_SDRAM_SIZE.
> 
> Signed-off-by: Fabio Estevam <fabio.este...@nxp.com>
> ---
>  board/warp/warp.c      | 2 +-
>  include/configs/warp.h | 1 -
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/board/warp/warp.c b/board/warp/warp.c
> index 49dfdb6..0bc0a6a 100644
> --- a/board/warp/warp.c
> +++ b/board/warp/warp.c
> @@ -46,7 +46,7 @@ DECLARE_GLOBAL_DATA_PTR;
>  
>  int dram_init(void)
>  {
> -     gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
> +     gd->ram_size = imx_ddr_size();
>  
>       return 0;
>  }
> diff --git a/include/configs/warp.h b/include/configs/warp.h
> index 4a8e270..12c7c38 100644
> --- a/include/configs/warp.h
> +++ b/include/configs/warp.h
> @@ -43,7 +43,6 @@
>  /* Physical Memory Map */
>  #define CONFIG_NR_DRAM_BANKS         1
>  #define PHYS_SDRAM                   MMDC0_ARB_BASE_ADDR
> -#define PHYS_SDRAM_SIZE                      SZ_512M
>  
>  #define CONFIG_SYS_SDRAM_BASE                PHYS_SDRAM
>  #define CONFIG_SYS_INIT_RAM_ADDR     IRAM_BASE_ADDR
> 
Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to