Skip to contentSkip to conversation

warp: Use imx_ddr_size() for calculating the DDR size

PATCH New Fabio Estevam 5 participants 13 messages Jul 23, 2016 – Jul 28, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 warp: Use imx_ddr_size() for calculating the DDR size

From: Fabio Estevam <[email protected]>

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.

---
 board/warp/warp.c      | 2 +-
 include/configs/warp.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
board/warp/warp.c +1 -1
index 49dfdb6..0bc0a6a 100644
@@ -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;
 }
include/configs/warp.h +0 -1
index 4a8e270..12c7c38 100644
@@ -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
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/5 aristainetos: Use imx_ddr_size() for calculating the DDR size

From: Fabio Estevam <[email protected]>

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.

---
 board/aristainetos/aristainetos.c     | 2 +-
 include/configs/aristainetos-common.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
board/aristainetos/aristainetos.c +1 -1
index e95ec81..d1e6850 100644
@@ -102,7 +102,7 @@ iomux_v3_cfg_t const usdhc1_pads[] = {
 
 int dram_init(void)
 {
-	gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+	gd->ram_size = imx_ddr_size();
 
 	return 0;
 }
include/configs/aristainetos-common.h +0 -1
index d87d40c..640227b 100644
@@ -17,7 +17,6 @@
 
 #define CONFIG_MACH_TYPE	4501
 #define CONFIG_MMCROOT		"/dev/mmcblk0p1"
-#define PHYS_SDRAM_SIZE		(1u * 1024 * 1024 * 1024)
 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(64 * SZ_1M)
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/5 aristainetos: Use imx_ddr_size() for calculating the DDR size

Hello Fabio,

Am 23.07.2016 um 18:23 schrieb Fabio Estevam:

Quoted 4 lines

From: Fabio Estevam <[email protected]>

imx_ddr_size() can be used to calculate the DDR size in runtime.

Quoted 8 lines

By using this function we no longer need to define PHYS_SDRAM_SIZE.

---
  board/aristainetos/aristainetos.c     | 2 +-
  include/configs/aristainetos-common.h | 1 -
  2 files changed, 1 insertion(+), 2 deletions(-)

Thanks!

bye,
Heiko

Quoted 27 lines
board/aristainetos/aristainetos.c +1 -1
index e95ec81..d1e6850 100644
@@ -102,7 +102,7 @@ iomux_v3_cfg_t const usdhc1_pads[] = {
 
  int dram_init(void)
  {
-	gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+	gd->ram_size = imx_ddr_size();
 
  	return 0;
  }
include/configs/aristainetos-common.h +0 -1
index d87d40c..640227b 100644
@@ -17,7 +17,6 @@
 
  #define CONFIG_MACH_TYPE	4501
  #define CONFIG_MMCROOT		"/dev/mmcblk0p1"
-#define PHYS_SDRAM_SIZE		(1u * 1024 * 1024 * 1024)
 
  /* Size of malloc() pool */
  #define CONFIG_SYS_MALLOC_LEN		(64 * SZ_1M)
Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#3 lore raw

PATCH 2/5 aristainetos: Use imx_ddr_size() for calculating the DDR size

In reply to Fabio Estevam
Quoted 32 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

---
 board/aristainetos/aristainetos.c     | 2 +-
 include/configs/aristainetos-common.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
board/aristainetos/aristainetos.c +1 -1
index e95ec81..d1e6850 100644
@@ -102,7 +102,7 @@ iomux_v3_cfg_t const usdhc1_pads[] = {
 
 int dram_init(void)
 {
-	gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
+	gd->ram_size = imx_ddr_size();
 
 	return 0;
 }
include/configs/aristainetos-common.h +0 -0
index d87d40c..640227b 100644

include/configs/aristainetos-common.h line 22

Quoted 7 lines
include/configs/aristainetos-common.h +0 -1
@@ -17,7 +17,6 @@
 
 #define CONFIG_MACH_TYPE	4501
 #define CONFIG_MMCROOT		"/dev/mmcblk0p1"
-#define PHYS_SDRAM_SIZE		(1u * 1024 * 1024 * 1024)
 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(64 * SZ_1M)

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
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: sbabic at denx.de
=====================================================================
#4 lore raw

PATCH 3/5 bx50v3: Use imx_ddr_size() for calculating the DDR size

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

Cc Martin Donnelly <[email protected]>
---
 board/ge/bx50v3/bx50v3.c    | 2 +-
 include/configs/ge_bx50v3.h | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
board/ge/bx50v3/bx50v3.c +1 -1
index d45ed44..e9729f8 100644
@@ -60,7 +60,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;
 }
include/configs/ge_bx50v3.h +0 -2
index 4de2460..7a54546 100644
@@ -32,8 +32,6 @@
 #define CONFIG_MXC_UART_BASE	UART3_BASE
 #define CONFIG_CONSOLE_DEV	"ttymxc2"
 
-#define PHYS_SDRAM_SIZE		(2u * 1024 * 1024 * 1024)
-
 #define CONFIG_SUPPORT_EMMC_BOOT
 
 
Signature · 1 line
1.9.1
#5 lore raw

PATCH 3/5 bx50v3: Use imx_ddr_size() for calculating the DDR size

Quoted 32 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

Cc Martin Donnelly <[email protected]>
---
 board/ge/bx50v3/bx50v3.c    | 2 +-
 include/configs/ge_bx50v3.h | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
board/ge/bx50v3/bx50v3.c +1 -1
index d45ed44..e9729f8 100644
@@ -60,7 +60,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;
 }
include/configs/ge_bx50v3.h +0 -0
index 4de2460..7a54546 100644

include/configs/ge_bx50v3.h line 37

Quoted 8 lines
include/configs/ge_bx50v3.h +0 -2
@@ -32,8 +32,6 @@
 #define CONFIG_MXC_UART_BASE	UART3_BASE
 #define CONFIG_CONSOLE_DEV	"ttymxc2"
 
-#define PHYS_SDRAM_SIZE		(2u * 1024 * 1024 * 1024)
-
 #define CONFIG_SUPPORT_EMMC_BOOT
 
 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
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: sbabic at denx.de
=====================================================================
#6 lore raw

PATCH 4/5 novena: Remove uneeded PHYS_SDRAM_SIZE

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

novena uses the imx_ddr_size() function to calculate the DDR size in runtime, so there is no need to define PHYS_SDRAM_SIZE.

Remove the unneeded definition.

---
 include/configs/novena.h | 1 -
 1 file changed, 1 deletion(-)
include/configs/novena.h +0 -1
index 2382951..57d8c3e 100644
@@ -57,7 +57,6 @@
 /* Physical Memory Map */
 #define CONFIG_NR_DRAM_BANKS		1
 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
-#define PHYS_SDRAM_SIZE			0xF0000000
 
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
 #define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
Signature · 1 line
1.9.1
#7 lore raw

PATCH 4/5 novena: Remove uneeded PHYS_SDRAM_SIZE

Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

novena uses the imx_ddr_size() function to calculate the DDR size in runtime, so there is no need to define PHYS_SDRAM_SIZE.

Remove the unneeded definition.

Quoted 17 lines
---
 include/configs/novena.h | 1 -
 1 file changed, 1 deletion(-)
include/configs/novena.h +0 -1
index 2382951..57d8c3e 100644
@@ -57,7 +57,6 @@
 /* Physical Memory Map */
 #define CONFIG_NR_DRAM_BANKS		1
 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
-#define PHYS_SDRAM_SIZE			0xF0000000
 
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
 #define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
Signature · 2 lines
Best regards,
Marek Vasut
#8 lore raw

PATCH 4/5 novena: Remove uneeded PHYS_SDRAM_SIZE

In reply to Fabio Estevam
Quoted 19 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

novena uses the imx_ddr_size() function to calculate the DDR size in runtime, so there is no need to define PHYS_SDRAM_SIZE.

Remove the unneeded definition.

---
 include/configs/novena.h | 1 -
 1 file changed, 1 deletion(-)
include/configs/novena.h +0 -0
index 2382951..57d8c3e 100644

include/configs/novena.h line 62

Quoted 7 lines
include/configs/novena.h +0 -1
@@ -57,7 +57,6 @@
 /* Physical Memory Map */
 #define CONFIG_NR_DRAM_BANKS		1
 #define PHYS_SDRAM			MMDC0_ARB_BASE_ADDR
-#define PHYS_SDRAM_SIZE			0xF0000000
 
 #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

Signature · 5 lines
=====================================================================
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: sbabic at denx.de
=====================================================================
#9 lore raw

PATCH 5/5 cgtqmx6eval: Remove uneeded PHYS_SDRAM_SIZE

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

cgtqmx6eval uses the imx_ddr_size() function to calculate the DDR size in runtime, so there is no need to define PHYS_SDRAM_SIZE.

Remove the unneeded definition.

Cc Otavio Salvador <[email protected]>
---
 include/configs/cgtqmx6eval.h | 1 -
 1 file changed, 1 deletion(-)
include/configs/cgtqmx6eval.h +0 -1
index dd03936..127a28a 100644
@@ -251,7 +251,6 @@
 /* Physical Memory Map */
 #define CONFIG_NR_DRAM_BANKS	       1
 #define PHYS_SDRAM		       MMDC0_ARB_BASE_ADDR
-#define PHYS_SDRAM_SIZE			       (1u * 1024 * 1024 * 1024)
 
 #define CONFIG_SYS_SDRAM_BASE	       PHYS_SDRAM
 #define CONFIG_SYS_INIT_RAM_ADDR       IRAM_BASE_ADDR
Signature · 1 line
1.9.1
#10 lore raw

PATCH 5/5 cgtqmx6eval: Remove uneeded PHYS_SDRAM_SIZE

Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

cgtqmx6eval uses the imx_ddr_size() function to calculate the DDR size in runtime, so there is no need to define PHYS_SDRAM_SIZE.

Remove the unneeded definition.

Cc Otavio Salvador <[email protected]>
Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#11 lore raw

PATCH 5/5 cgtqmx6eval: Remove uneeded PHYS_SDRAM_SIZE

In reply to Fabio Estevam
Quoted 19 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

cgtqmx6eval uses the imx_ddr_size() function to calculate the DDR size in runtime, so there is no need to define PHYS_SDRAM_SIZE.

Remove the unneeded definition.

Cc Otavio Salvador <[email protected]>
---
 include/configs/cgtqmx6eval.h | 1 -
 1 file changed, 1 deletion(-)
include/configs/cgtqmx6eval.h +0 -0
index dd03936..127a28a 100644

include/configs/cgtqmx6eval.h line 256

Quoted 7 lines
include/configs/cgtqmx6eval.h +0 -1
@@ -251,7 +251,6 @@
 /* Physical Memory Map */
 #define CONFIG_NR_DRAM_BANKS	       1
 #define PHYS_SDRAM		       MMDC0_ARB_BASE_ADDR
-#define PHYS_SDRAM_SIZE			       (1u * 1024 * 1024 * 1024)
 
 #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

Signature · 5 lines
=====================================================================
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: sbabic at denx.de
=====================================================================
#12 lore raw

PATCH 1/5 warp: Use imx_ddr_size() for calculating the DDR size

In reply to Fabio Estevam
Quoted 31 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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.

---
 board/warp/warp.c      | 2 +-
 include/configs/warp.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
board/warp/warp.c +1 -1
index 49dfdb6..0bc0a6a 100644
@@ -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;
 }
include/configs/warp.h +0 -0
index 4a8e270..12c7c38 100644

include/configs/warp.h line 48

Quoted 7 lines
include/configs/warp.h +0 -1
@@ -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

Signature · 5 lines
=====================================================================
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: sbabic at denx.de
=====================================================================