瀏覽代碼

mx6sxsabreauto: Avoid hardcoded RAM size

Instead of passing the total RAM size via PHYS_SDRAM_SIZE option,
we should better use imx_ddr_size() function, which automatically
determines the RAM size.

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Vanessa Maegima 9 年之前
父節點
當前提交
432a8a5547
共有 2 個文件被更改,包括 1 次插入2 次删除
  1. 1 1
      board/freescale/mx6sxsabreauto/mx6sxsabreauto.c
  2. 0 1
      include/configs/mx6sxsabreauto.h

+ 1 - 1
board/freescale/mx6sxsabreauto/mx6sxsabreauto.c

@@ -106,7 +106,7 @@ static int port_exp_direction_output(unsigned gpio, int value)
 
 int dram_init(void)
 {
-	gd->ram_size = PHYS_SDRAM_SIZE;
+	gd->ram_size = imx_ddr_size();
 
 	return 0;
 }

+ 0 - 1
include/configs/mx6sxsabreauto.h

@@ -103,7 +103,6 @@
 /* Physical Memory Map */
 #define CONFIG_NR_DRAM_BANKS		1
 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
-#define PHYS_SDRAM_SIZE			SZ_2G
 
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
 #define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR