public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] arm1136: Fix NAND boot
@ 2011-02-09 11:17 Fabio Estevam
  2011-02-09 11:17 ` [U-Boot] [PATCH 2/3] mx31pdk: Use the new relocation scheme Fabio Estevam
  2011-02-11 18:58 ` [U-Boot] [PATCH 1/3] arm1136: Fix NAND boot Magnus Lilja
  0 siblings, 2 replies; 10+ messages in thread
From: Fabio Estevam @ 2011-02-09 11:17 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
---
 arch/arm/cpu/arm1136/start.S |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
index b771d31..bab2868 100644
--- a/arch/arm/cpu/arm1136/start.S
+++ b/arch/arm/cpu/arm1136/start.S
@@ -163,15 +163,7 @@ call_board_init_f:
 	bic	sp, sp, #7 /* 8-byte alignment for ABI compliance */
 	ldr	r0,=0x00000000
 
-#ifdef CONFIG_NAND_SPL
-	bl	nand_boot
-#else
-#ifdef CONFIG_ONENAND_IPL
-	bl	start_oneboot
-#else
 	bl	board_init_f
-#endif /* CONFIG_ONENAND_IPL */
-#endif /* CONFIG_NAND_SPL */
 
 /*------------------------------------------------------------------------------*/
 
@@ -267,10 +259,10 @@ clbss_l:str	r2, [r0]		/* clear loop...		    */
  */
 #ifdef CONFIG_NAND_SPL
 	ldr     r0, _nand_boot_ofs
-	adr	r1, _start
-	add	pc, r0, r1
-_nand_boot_ofs
-	: .word nand_boot - _start
+	mov	pc, r0
+
+_nand_boot_ofs:
+	.word nand_boot
 #else
 jump_2_ram:
 	ldr	r0, _board_init_r_ofs
-- 
1.6.0.4

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

* [U-Boot] [PATCH 2/3] mx31pdk: Use the new relocation scheme
  2011-02-09 11:17 [U-Boot] [PATCH 1/3] arm1136: Fix NAND boot Fabio Estevam
@ 2011-02-09 11:17 ` Fabio Estevam
  2011-02-09 11:17   ` [U-Boot] [PATCH 3/3] mx31pdk: Make the full boot log visible Fabio Estevam
  2011-02-13  9:52   ` [U-Boot] [PATCH 2/3] mx31pdk: Use the new relocation scheme Stefano Babic
  2011-02-11 18:58 ` [U-Boot] [PATCH 1/3] arm1136: Fix NAND boot Magnus Lilja
  1 sibling, 2 replies; 10+ messages in thread
From: Fabio Estevam @ 2011-02-09 11:17 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx31pdk/mx31pdk.c           |   10 ++++-
 include/configs/mx31pdk.h                   |    6 +++
 nand_spl/board/freescale/mx31pdk/u-boot.lds |   59 +++++++++++++++++++++++---
 3 files changed, 66 insertions(+), 9 deletions(-)

diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
index 9f47169..2756e5a 100644
--- a/board/freescale/mx31pdk/mx31pdk.c
+++ b/board/freescale/mx31pdk/mx31pdk.c
@@ -33,10 +33,16 @@ DECLARE_GLOBAL_DATA_PTR;
 
 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);
+	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;
-
-	return 0;
 }
 
 int board_init(void)
diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h
index 3b90a01..d7286c0 100644
--- a/include/configs/mx31pdk.h
+++ b/include/configs/mx31pdk.h
@@ -155,6 +155,12 @@
 #define PHYS_SDRAM_1		CSD0_BASE
 #define PHYS_SDRAM_1_SIZE	(128 * 1024 * 1024)
 
+#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
+#define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
+#define CONFIG_SYS_INIT_RAM_SIZE	IRAM_SIZE
+#define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET)
+
 /*-----------------------------------------------------------------------
  * FLASH and environment organization
  */
diff --git a/nand_spl/board/freescale/mx31pdk/u-boot.lds b/nand_spl/board/freescale/mx31pdk/u-boot.lds
index edd8430..ff289fb 100644
--- a/nand_spl/board/freescale/mx31pdk/u-boot.lds
+++ b/nand_spl/board/freescale/mx31pdk/u-boot.lds
@@ -1,3 +1,25 @@
+/*
+ * (C) Copyright 2009
+ * Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
 OUTPUT_ARCH(arm)
 ENTRY(_start)
@@ -19,18 +41,41 @@ SECTIONS
 	.rodata : { *(.rodata) }
 
 	. = ALIGN(4);
-	.data : { *(.data) }
+	.data : {
+		*(.data)
+	}
 
 	. = ALIGN(4);
-	.got : { *(.got) }
-
-	. = .;
 	__u_boot_cmd_start = .;
 	.u_boot_cmd : { *(.u_boot_cmd) }
 	__u_boot_cmd_end = .;
 
 	. = ALIGN(4);
-	__bss_start = .;
-	.bss : { *(.bss) }
-	_end = .;
+
+	.rel.dyn : {
+		__rel_dyn_start = .;
+		*(.rel*)
+		__rel_dyn_end = .;
+	}
+
+	.dynsym : {
+		__dynsym_start = .;
+		*(.dynsym)
+	}
+
+	.bss __rel_dyn_start (OVERLAY) : {
+		__bss_start = .;
+		*(.bss)
+		 . = ALIGN(4);
+		_end = .;
+	}
+
+	/DISCARD/ : { *(.bss*) }
+	/DISCARD/ : { *(.dynstr*) }
+	/DISCARD/ : { *(.dynsym*) }
+	/DISCARD/ : { *(.dynamic*) }
+	/DISCARD/ : { *(.hash*) }
+	/DISCARD/ : { *(.plt*) }
+	/DISCARD/ : { *(.interp*) }
+	/DISCARD/ : { *(.gnu*) }
 }
-- 
1.6.0.4

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

* [U-Boot] [PATCH 3/3] mx31pdk: Make the full boot log visible
  2011-02-09 11:17 ` [U-Boot] [PATCH 2/3] mx31pdk: Use the new relocation scheme Fabio Estevam
@ 2011-02-09 11:17   ` Fabio Estevam
  2011-02-13  9:53     ` Stefano Babic
  2011-02-13  9:52   ` [U-Boot] [PATCH 2/3] mx31pdk: Use the new relocation scheme Stefano Babic
  1 sibling, 1 reply; 10+ messages in thread
From: Fabio Estevam @ 2011-02-09 11:17 UTC (permalink / raw)
  To: u-boot

Use board_early_init_f so that the full boot log output can be displayed.

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

diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
index 2756e5a..a9f0fb4 100644
--- a/board/freescale/mx31pdk/mx31pdk.c
+++ b/board/freescale/mx31pdk/mx31pdk.c
@@ -45,7 +45,7 @@ void dram_init_banksize(void)
 	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
 }
 
-int board_init(void)
+int board_early_init_f(void)
 {
 	/* CS5: CPLD incl. network controller */
 	__REG(CSCR_U(5)) = 0x0000d843;
@@ -56,6 +56,11 @@ int board_init(void)
 	mx31_uart1_hw_init();
 	mx31_spi2_hw_init();
 
+	return 0;
+}
+
+int board_init(void)
+{
 	gd->bd->bi_arch_number = MACH_TYPE_MX31_3DS; /* board id for linux */
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h
index d7286c0..86c758f 100644
--- a/include/configs/mx31pdk.h
+++ b/include/configs/mx31pdk.h
@@ -154,6 +154,7 @@
 #define CONFIG_NR_DRAM_BANKS	1
 #define PHYS_SDRAM_1		CSD0_BASE
 #define PHYS_SDRAM_1_SIZE	(128 * 1024 * 1024)
+#define CONFIG_BOARD_EARLY_INIT_F	1
 
 #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] 10+ messages in thread

* [U-Boot] [PATCH 1/3] arm1136: Fix NAND boot
  2011-02-09 11:17 [U-Boot] [PATCH 1/3] arm1136: Fix NAND boot Fabio Estevam
  2011-02-09 11:17 ` [U-Boot] [PATCH 2/3] mx31pdk: Use the new relocation scheme Fabio Estevam
@ 2011-02-11 18:58 ` Magnus Lilja
  2011-02-12  7:07   ` Albert ARIBAUD
  1 sibling, 1 reply; 10+ messages in thread
From: Magnus Lilja @ 2011-02-11 18:58 UTC (permalink / raw)
  To: u-boot

Hi

I've tested Fabio's patch series and it makes the i.MX31 PDK boot nicely from NAND again. So from my point of view I
recommend to use these patches.


Best regards, Magnus

On 02/09/2011 12:17 PM, Fabio Estevam wrote:
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
> ---
>  arch/arm/cpu/arm1136/start.S |   16 ++++------------
>  1 files changed, 4 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
> index b771d31..bab2868 100644
> --- a/arch/arm/cpu/arm1136/start.S
> +++ b/arch/arm/cpu/arm1136/start.S
> @@ -163,15 +163,7 @@ call_board_init_f:
>  	bic	sp, sp, #7 /* 8-byte alignment for ABI compliance */
>  	ldr	r0,=0x00000000
>  
> -#ifdef CONFIG_NAND_SPL
> -	bl	nand_boot
> -#else
> -#ifdef CONFIG_ONENAND_IPL
> -	bl	start_oneboot
> -#else
>  	bl	board_init_f
> -#endif /* CONFIG_ONENAND_IPL */
> -#endif /* CONFIG_NAND_SPL */
>  
>  /*------------------------------------------------------------------------------*/
>  
> @@ -267,10 +259,10 @@ clbss_l:str	r2, [r0]		/* clear loop...		    */
>   */
>  #ifdef CONFIG_NAND_SPL
>  	ldr     r0, _nand_boot_ofs
> -	adr	r1, _start
> -	add	pc, r0, r1
> -_nand_boot_ofs
> -	: .word nand_boot - _start
> +	mov	pc, r0
> +
> +_nand_boot_ofs:
> +	.word nand_boot
>  #else
>  jump_2_ram:
>  	ldr	r0, _board_init_r_ofs

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

* [U-Boot] [PATCH 1/3] arm1136: Fix NAND boot
  2011-02-11 18:58 ` [U-Boot] [PATCH 1/3] arm1136: Fix NAND boot Magnus Lilja
@ 2011-02-12  7:07   ` Albert ARIBAUD
  2011-02-13 14:43     ` Magnus Lilja
  0 siblings, 1 reply; 10+ messages in thread
From: Albert ARIBAUD @ 2011-02-12  7:07 UTC (permalink / raw)
  To: u-boot

Le 11/02/2011 19:58, Magnus Lilja a ?crit :
> Hi
>
> I've tested Fabio's patch series and it makes the i.MX31 PDK boot nicely from NAND again. So from my point of view I
> recommend to use these patches.

Which is the ideal case for sending out a "Tested-By:" line. :)

> Best regards, Magnus

Amicalement,
-- 
Albert.

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

* [U-Boot] [PATCH 2/3] mx31pdk: Use the new relocation scheme
  2011-02-09 11:17 ` [U-Boot] [PATCH 2/3] mx31pdk: Use the new relocation scheme Fabio Estevam
  2011-02-09 11:17   ` [U-Boot] [PATCH 3/3] mx31pdk: Make the full boot log visible Fabio Estevam
@ 2011-02-13  9:52   ` Stefano Babic
  1 sibling, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2011-02-13  9:52 UTC (permalink / raw)
  To: u-boot

On 02/09/2011 12:17 PM, Fabio Estevam wrote:
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  board/freescale/mx31pdk/mx31pdk.c           |   10 ++++-
>  include/configs/mx31pdk.h                   |    6 +++
>  nand_spl/board/freescale/mx31pdk/u-boot.lds |   59 +++++++++++++++++++++++---
>  3 files changed, 66 insertions(+), 9 deletions(-)
> 
> diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
> index 9f47169..2756e5a 100644
> --- a/board/freescale/mx31pdk/mx31pdk.c
> +++ b/board/freescale/mx31pdk/mx31pdk.c
> @@ -33,10 +33,16 @@ DECLARE_GLOBAL_DATA_PTR;

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] 10+ messages in thread

* [U-Boot] [PATCH 3/3] mx31pdk: Make the full boot log visible
  2011-02-09 11:17   ` [U-Boot] [PATCH 3/3] mx31pdk: Make the full boot log visible Fabio Estevam
@ 2011-02-13  9:53     ` Stefano Babic
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2011-02-13  9:53 UTC (permalink / raw)
  To: u-boot

On 02/09/2011 12:17 PM, Fabio Estevam wrote:
> Use board_early_init_f so that the full boot log output can be displayed.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  board/freescale/mx31pdk/mx31pdk.c |    7 ++++++-
>  include/configs/mx31pdk.h         |    1 +
>  2 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c
> index 2756e5a..a9f0fb4 100644

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] 10+ messages in thread

* [U-Boot] [PATCH 1/3] arm1136: Fix NAND boot
  2011-02-12  7:07   ` Albert ARIBAUD
@ 2011-02-13 14:43     ` Magnus Lilja
  2011-02-16 11:58       ` Fabio Estevam
  0 siblings, 1 reply; 10+ messages in thread
From: Magnus Lilja @ 2011-02-13 14:43 UTC (permalink / raw)
  To: u-boot

On 02/12/2011 08:07 AM, Albert ARIBAUD wrote:
> Le 11/02/2011 19:58, Magnus Lilja a ?crit :
>> Hi
>>
>> I've tested Fabio's patch series and it makes the i.MX31 PDK boot nicely from NAND again. So from my point of view I
>> recommend to use these patches.
> 
> Which is the ideal case for sending out a "Tested-By:" line. :)

Tested-by: Magnus Lilja <lilja.magnus@gmail.com>

Regards, Magnus

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

* [U-Boot] [PATCH 1/3] arm1136: Fix NAND boot
  2011-02-13 14:43     ` Magnus Lilja
@ 2011-02-16 11:58       ` Fabio Estevam
  2011-02-17 20:43         ` Albert ARIBAUD
  0 siblings, 1 reply; 10+ messages in thread
From: Fabio Estevam @ 2011-02-16 11:58 UTC (permalink / raw)
  To: u-boot

Hi Albert,

On 2/13/2011 12:43 PM, Magnus Lilja wrote:
> On 02/12/2011 08:07 AM, Albert ARIBAUD wrote:
>> Le 11/02/2011 19:58, Magnus Lilja a ?crit :
>>> Hi
>>>
>>> I've tested Fabio's patch series and it makes the i.MX31 PDK boot nicely from NAND again. So from my point of view I
>>> recommend to use these patches.
>>
>> Which is the ideal case for sending out a "Tested-By:" line. :)
> 
> Tested-by: Magnus Lilja <lilja.magnus@gmail.com>
> 
> Regards, Magnus
> 
Ping?

Stefano has already applied the patches 2/3 and 3/3 from this series, but without 1/3 MX31PDK boot is still broken.

Regards,

Fabio Estevam

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

* [U-Boot] [PATCH 1/3] arm1136: Fix NAND boot
  2011-02-16 11:58       ` Fabio Estevam
@ 2011-02-17 20:43         ` Albert ARIBAUD
  0 siblings, 0 replies; 10+ messages in thread
From: Albert ARIBAUD @ 2011-02-17 20:43 UTC (permalink / raw)
  To: u-boot

Le 16/02/2011 12:58, Fabio Estevam a ?crit :
> Hi Albert,
>
> On 2/13/2011 12:43 PM, Magnus Lilja wrote:
>> On 02/12/2011 08:07 AM, Albert ARIBAUD wrote:
>>> Le 11/02/2011 19:58, Magnus Lilja a ?crit :
>>>> Hi
>>>>
>>>> I've tested Fabio's patch series and it makes the i.MX31 PDK boot nicely from NAND again. So from my point of view I
>>>> recommend to use these patches.
>>>
>>> Which is the ideal case for sending out a "Tested-By:" line. :)
>>
>> Tested-by: Magnus Lilja<lilja.magnus@gmail.com>
>>
>> Regards, Magnus
>>
> Ping?
>
> Stefano has already applied the patches 2/3 and 3/3 from this series, but without 1/3 MX31PDK boot is still broken.
>
> Regards,
>
> Fabio Estevam

Applied to u-boot-arm/master, thanks.

Amicalement,
-- 
Albert.

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

end of thread, other threads:[~2011-02-17 20:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-09 11:17 [U-Boot] [PATCH 1/3] arm1136: Fix NAND boot Fabio Estevam
2011-02-09 11:17 ` [U-Boot] [PATCH 2/3] mx31pdk: Use the new relocation scheme Fabio Estevam
2011-02-09 11:17   ` [U-Boot] [PATCH 3/3] mx31pdk: Make the full boot log visible Fabio Estevam
2011-02-13  9:53     ` Stefano Babic
2011-02-13  9:52   ` [U-Boot] [PATCH 2/3] mx31pdk: Use the new relocation scheme Stefano Babic
2011-02-11 18:58 ` [U-Boot] [PATCH 1/3] arm1136: Fix NAND boot Magnus Lilja
2011-02-12  7:07   ` Albert ARIBAUD
2011-02-13 14:43     ` Magnus Lilja
2011-02-16 11:58       ` Fabio Estevam
2011-02-17 20:43         ` Albert ARIBAUD

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