public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] i.MX31: Fix Litekit board to use new ARM relocation support.
@ 2010-10-16 17:47 Magnus Lilja
  2010-10-18  8:30 ` Stefano Babic
  2010-10-19 10:36 ` Stefano Babic
  0 siblings, 2 replies; 4+ messages in thread
From: Magnus Lilja @ 2010-10-16 17:47 UTC (permalink / raw)
  To: u-boot

Tested on hardware. Boots Linux nicely.

Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
---
 board/logicpd/imx31_litekit/config.mk       |    2 +-
 board/logicpd/imx31_litekit/imx31_litekit.c |   10 ++++++++--
 include/configs/imx31_litekit.h             |    7 +++++++
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/board/logicpd/imx31_litekit/config.mk b/board/logicpd/imx31_litekit/config.mk
index d34dc02..a12c182 100644
--- a/board/logicpd/imx31_litekit/config.mk
+++ b/board/logicpd/imx31_litekit/config.mk
@@ -1 +1 @@
-TEXT_BASE = 0x87f00000
+TEXT_BASE = 0xa0000000
diff --git a/board/logicpd/imx31_litekit/imx31_litekit.c b/board/logicpd/imx31_litekit/imx31_litekit.c
index 2ac622d..a07ba0e 100644
--- a/board/logicpd/imx31_litekit/imx31_litekit.c
+++ b/board/logicpd/imx31_litekit/imx31_litekit.c
@@ -31,12 +31,18 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init (void)
 {
-	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+	gd->ram_size = PHYS_SDRAM_1_SIZE;
 
 	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;
+}
+
 int board_init (void)
 {
 	__REG(CSCR_U(0)) = 0x0000cf03; /* CS0: Nor Flash */
diff --git a/include/configs/imx31_litekit.h b/include/configs/imx31_litekit.h
index 4904856..c21d74e 100644
--- a/include/configs/imx31_litekit.h
+++ b/include/configs/imx31_litekit.h
@@ -147,6 +147,13 @@
 #define PHYS_SDRAM_1		CSD0_BASE
 #define PHYS_SDRAM_1_SIZE	(128 * 1024 * 1024)
 
+#undef CONFIG_SYS_ARM_WITHOUT_RELOC
+#define CONFIG_SYS_SDRAM_BASE		CSD0_BASE
+#define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
+#define CONFIG_SYS_INIT_RAM_END		IRAM_SIZE
+#define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET)
+
 /*-----------------------------------------------------------------------
  * FLASH and environment organization
  */
-- 
1.6.4.2

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

* [U-Boot] [PATCH] i.MX31: Fix Litekit board to use new ARM relocation support.
  2010-10-16 17:47 [U-Boot] [PATCH] i.MX31: Fix Litekit board to use new ARM relocation support Magnus Lilja
@ 2010-10-18  8:30 ` Stefano Babic
  2010-10-18 19:50   ` Magnus Lilja
  2010-10-19 10:36 ` Stefano Babic
  1 sibling, 1 reply; 4+ messages in thread
From: Stefano Babic @ 2010-10-18  8:30 UTC (permalink / raw)
  To: u-boot

On 10/16/2010 07:47 PM, Magnus Lilja wrote:
> Tested on hardware. Boots Linux nicely.
> 
> Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
> ---

Hi Magnus,

> @@ -31,12 +31,18 @@ DECLARE_GLOBAL_DATA_PTR;
>  
>  int dram_init (void)
>  {
> -	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
> -	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
> +	gd->ram_size = PHYS_SDRAM_1_SIZE;

Any reason to not use get_ram_size() ?

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] i.MX31: Fix Litekit board to use new ARM relocation support.
  2010-10-18  8:30 ` Stefano Babic
@ 2010-10-18 19:50   ` Magnus Lilja
  0 siblings, 0 replies; 4+ messages in thread
From: Magnus Lilja @ 2010-10-18 19:50 UTC (permalink / raw)
  To: u-boot

Hi Stefano,

On 2010-10-18 10:30, Stefano Babic wrote:
> On 10/16/2010 07:47 PM, Magnus Lilja wrote:
>> Tested on hardware. Boots Linux nicely.
>>
>> Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
>> ---
> 
> Hi Magnus,
> 
>> @@ -31,12 +31,18 @@ DECLARE_GLOBAL_DATA_PTR;
>>  
>>  int dram_init (void)
>>  {
>> -	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
>> -	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
>> +	gd->ram_size = PHYS_SDRAM_1_SIZE;
> 
> Any reason to not use get_ram_size() ?

Yes, lowlevel_init.S for the litekit board doesn't support autodetection of ram size. I suppose the SDRAM controller needs to be reprogrammed with the actual ool/row settings depending on the RAM size. 

Also, I prefer making one change in each patch so this patch updates the Litekit board to use the new relocation stuff.

Regards, Magnus

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

* [U-Boot] [PATCH] i.MX31: Fix Litekit board to use new ARM relocation support.
  2010-10-16 17:47 [U-Boot] [PATCH] i.MX31: Fix Litekit board to use new ARM relocation support Magnus Lilja
  2010-10-18  8:30 ` Stefano Babic
@ 2010-10-19 10:36 ` Stefano Babic
  1 sibling, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2010-10-19 10:36 UTC (permalink / raw)
  To: u-boot

On 10/16/2010 07:47 PM, Magnus Lilja wrote:
> Tested on hardware. Boots Linux nicely.
> 
> Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
> ---
>  board/logicpd/imx31_litekit/config.mk       |    2 +-
>  board/logicpd/imx31_litekit/imx31_litekit.c |   10 ++++++++--
>  include/configs/imx31_litekit.h             |    7 +++++++
>  3 files changed, 16 insertions(+), 3 deletions(-)

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=====================================================================
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

end of thread, other threads:[~2010-10-19 10:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-16 17:47 [U-Boot] [PATCH] i.MX31: Fix Litekit board to use new ARM relocation support Magnus Lilja
2010-10-18  8:30 ` Stefano Babic
2010-10-18 19:50   ` Magnus Lilja
2010-10-19 10:36 ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox