All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] mx53smd: Fix build issue due to BOARD_LATE_INIT
@ 2011-05-19 13:44 Fabio Estevam
  2011-05-19 13:44 ` [U-Boot] [PATCH 2/2] mx53smd: Configure two banks of DDR Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2011-05-19 13:44 UTC (permalink / raw)
  To: u-boot

board_late_init function is not used, so remove BOARD_LATE_INIT from config file.

Fix the following error:

arch/arm/lib/libarm.o: In function `board_init_r':
/home/fabio/u-boot-imx/arch/arm/lib/board.c:590: undefined reference to `board_late_init'

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 include/configs/mx53smd.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/include/configs/mx53smd.h b/include/configs/mx53smd.h
index 356ee10..e64ff98 100644
--- a/include/configs/mx53smd.h
+++ b/include/configs/mx53smd.h
@@ -42,7 +42,6 @@
 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 2 * 1024 * 1024)
 
 #define CONFIG_BOARD_EARLY_INIT_F
-#define BOARD_LATE_INIT
 #define CONFIG_MXC_GPIO
 
 #define CONFIG_MXC_UART
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] mx53smd: Configure two banks of DDR
  2011-05-19 13:44 [U-Boot] [PATCH 1/2] mx53smd: Fix build issue due to BOARD_LATE_INIT Fabio Estevam
@ 2011-05-19 13:44 ` Fabio Estevam
  2011-05-19 15:03   ` Stefano Babic
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2011-05-19 13:44 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx53smd/mx53smd.c |   18 +++++++++++++++---
 include/configs/mx53smd.h         |    3 +++
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/board/freescale/mx53smd/mx53smd.c b/board/freescale/mx53smd/mx53smd.c
index 2d158f7..f3c433f 100644
--- a/board/freescale/mx53smd/mx53smd.c
+++ b/board/freescale/mx53smd/mx53smd.c
@@ -42,11 +42,23 @@ u32 get_board_rev(void)
 
 int dram_init(void)
 {
-	/* dram_init must store complete ramsize in gd->ram_size */
-	gd->ram_size = get_ram_size((volatile void *)CONFIG_SYS_SDRAM_BASE,
-				PHYS_SDRAM_1_SIZE);
+	u32 size1, size2;
+
+	size1 = get_ram_size((volatile void *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
+	size2 = get_ram_size((volatile void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
+
+	gd->ram_size = size1 + size2;
+
 	return 0;
 }
+void dram_init_banksize(void)
+{
+	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
+	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+
+	gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
+	gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
+}
 
 static void setup_iomux_uart(void)
 {
diff --git a/include/configs/mx53smd.h b/include/configs/mx53smd.h
index e64ff98..65d5e05 100644
--- a/include/configs/mx53smd.h
+++ b/include/configs/mx53smd.h
@@ -165,6 +165,9 @@
 #define CONFIG_NR_DRAM_BANKS	2
 #define PHYS_SDRAM_1		CSD0_BASE_ADDR
 #define PHYS_SDRAM_1_SIZE	(512 * 1024 * 1024)
+#define PHYS_SDRAM_2		CSD1_BASE_ADDR
+#define PHYS_SDRAM_2_SIZE	(512 * 1024 * 1024)
+#define PHYS_SDRAM_SIZE         (PHYS_SDRAM_1_SIZE + PHYS_SDRAM_2_SIZE)
 
 #define CONFIG_SYS_SDRAM_BASE		(PHYS_SDRAM_1)
 #define CONFIG_SYS_INIT_RAM_ADDR	(IRAM_BASE_ADDR)
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] mx53smd: Configure two banks of DDR
  2011-05-19 13:44 ` [U-Boot] [PATCH 2/2] mx53smd: Configure two banks of DDR Fabio Estevam
@ 2011-05-19 15:03   ` Stefano Babic
  2011-05-19 15:06     ` Fabio Estevam
  0 siblings, 1 reply; 4+ messages in thread
From: Stefano Babic @ 2011-05-19 15:03 UTC (permalink / raw)
  To: u-boot

On 05/19/2011 03:44 PM, Fabio Estevam wrote:
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  board/freescale/mx53smd/mx53smd.c |   18 +++++++++++++++---
>  include/configs/mx53smd.h         |    3 +++
>  2 files changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/board/freescale/mx53smd/mx53smd.c b/board/freescale/mx53smd/mx53smd.c
> index 2d158f7..f3c433f 100644
> --- a/board/freescale/mx53smd/mx53smd.c
> +++ b/board/freescale/mx53smd/mx53smd.c
> @@ -42,11 +42,23 @@ u32 get_board_rev(void)
>  
>  int dram_init(void)
>  {
> -	/* dram_init must store complete ramsize in gd->ram_size */
> -	gd->ram_size = get_ram_size((volatile void *)CONFIG_SYS_SDRAM_BASE,
> -				PHYS_SDRAM_1_SIZE);
> +	u32 size1, size2;
> +
> +	size1 = get_ram_size((volatile void *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
> +	size2 = get_ram_size((volatile void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
> +
> +	gd->ram_size = size1 + size2;
> +
>  	return 0;

mmmhhh...I merged your first patch on this board, but I have not yet
request a pull to u-boot arm. These two patches solved two problems with
the first patch. What do you think if I squash all three patches together ?

Regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] mx53smd: Configure two banks of DDR
  2011-05-19 15:03   ` Stefano Babic
@ 2011-05-19 15:06     ` Fabio Estevam
  0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2011-05-19 15:06 UTC (permalink / raw)
  To: u-boot

On 5/19/2011 12:03 PM, Stefano Babic wrote:
... 
> mmmhhh...I merged your first patch on this board, but I have not yet
> request a pull to u-boot arm. These two patches solved two problems with
> the first patch. What do you think if I squash all three patches together ?

Yes, squashing the 3 patches is fine.

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-19 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19 13:44 [U-Boot] [PATCH 1/2] mx53smd: Fix build issue due to BOARD_LATE_INIT Fabio Estevam
2011-05-19 13:44 ` [U-Boot] [PATCH 2/2] mx53smd: Configure two banks of DDR Fabio Estevam
2011-05-19 15:03   ` Stefano Babic
2011-05-19 15:06     ` Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.