mx51evk: support new relocation scheme
Subsystems (2)
PATCH 1/1 mx51evk: support new relocation scheme
The patchset is to support new relocation scheme and fix the build breakage on master introduced by the relocation scheme.
It depends on the following patch from Jason to fix build error introduced by incorrect u-boot.lds.
MX5: use common u-boot.lds of cpu layer
http://lists.denx.de/pipermail/u-boot/2010-October/079926.html
The patchset was tested on mx51evk 3.0 board.
Shawn Guo (2):
[PATCH 1/2] mx51evk: support new relocation scheme [PATCH 2/2] mx51evk: correct internal RAM base address
arch/arm/include/asm/arch-mx5/imx-regs.h | 2 +- board/freescale/mx51evk/mx51evk.c | 6 +++--- include/configs/mx51evk.h | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-)
PATCH 1/2 mx51evk: support new relocation scheme
This patch is to fix build breakage and support new relocatoin scheme for mx51evk.
- It includes imx-regs.h in mx51evk.h, so that CSD0_BASE_ADDR and IRAM_BASE_ADDR can be referred to.
- It uses i.mx51 internal RAM as the init stack, as the internal RAM is totally free from ROM code when u-boot lives.
--- board/freescale/mx51evk/mx51evk.c | 6 +++--- include/configs/mx51evk.h | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-)
board/freescale/mx51evk/mx51evk.c +3 -3
@@ -52,9 +52,9 @@ u32 get_board_rev(void)int dram_init (void ) { - gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; - gd->bd->bi_dram[0 ].size =get_ram_size ((long *)PHYS_SDRAM_1 , -PHYS_SDRAM_1_SIZE ); +/* 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 ; }
include/configs/mx51evk.h +4 -1
@@ -24,11 +24,11 @@#ifndef __CONFIG_H#define __CONFIG_H +#include <asm/arch/imx-regs.h> /* High Level Configuration Options */ #define CONFIG_MX51 /* in a mx51 */ -#define CONFIG_SKIP_RELOCATE_UBOOT #define CONFIG_SYS_MX5_HCLK 24000000#define CONFIG_SYS_MX5_CLK32 32768
@@ -175,6 +175,9 @@#define PHYS_SDRAM_1 CSD0_BASE_ADDR#define PHYS_SDRAM_1_SIZE (512 * 1024 * 1024) +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (IRAM_BASE_ADDR + 0x1000) +#define CONFIG_SYS_DDR_CLKSEL 0#define CONFIG_SYS_CLKTL_CBCDR 0x59E35100
Signature · 1 line
1.7.1
PATCH 1/2 mx51evk: support new relocation scheme
include/configs/mx51evk.h line 179
Quoted 2 lines · Shawn Guo
include/configs/mx51evk.h +2
-0+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (IRAM_BASE_ADDR + 0x1000)
What is the meaning of the offset at 0x1000 ? Is there something at IRAM_BASE_ADDR ?
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 1/2 mx51evk: support new relocation scheme
Hi Stefano,
Quoted 8 lines · Stefano Babic
Review
Quoted 2 lines · Shawn Guo
(quoted diff) +2
-0+#define CONFIG_SYS_SDRAM_BASE ? ? ? ?PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR ? ? ?(IRAM_BASE_ADDR + 0x1000)What is the meaning of the offset at
0x1000? Is there something atIRAM_BASE_ADDR?
I thought CONFIG_SYS_INIT_SP_ADDR is assigned to stack pointer (sp) which decrease the address. Is it not the case?
Signature · 2 lines
Regards, Shawn
PATCH 1/2 mx51evk: support new relocation scheme
Quoted 5 lines · Shawn Guo
Hi Stefano,
Quoted 2 lines · Stefano Babic
On 10/25/2010 05:14 PM, Shawn Guo wrote:
Quoted 9 lines
Quoted 6 lines
include/configs/mx51evk.h line 179
Quoted 2 lines
include/configs/mx51evk.h +2
-0+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (IRAM_BASE_ADDR + 0x1000)What is the meaning of the offset at
0x1000? Is there something atIRAM_BASE_ADDR?I thought
CONFIG_SYS_INIT_SP_ADDRis assigned to stack pointer (sp) which decrease the address. Is it not the case?
Yes, my doubt is due to the fact that we do not set the SP at the end of the IRAM and we set it to an arbitrary address in between.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 1/2 mx51evk: support new relocation scheme
Quoted 12 lines · Stefano Babic
Quoted 11 lines · Shawn Guo
Hi Stefano,
Quoted 8 lines · Stefano Babic
Review
Quoted 2 lines · Shawn Guo
(quoted diff) +2
-0+#define CONFIG_SYS_SDRAM_BASE ? ? ? ?PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR ? ? ?(IRAM_BASE_ADDR + 0x1000)What is the meaning of the offset at
0x1000? Is there something atIRAM_BASE_ADDR?
Quoted 7 lines
Quoted 3 lines
I thought
CONFIG_SYS_INIT_SP_ADDRis assigned to stack pointer (sp) which decrease the address. ?Is it not the case?Yes, my doubt is due to the fact that we do not set the SP at the end of the IRAM and we set it to an arbitrary address in between.
At this point, IRAM is totally free for u-boot to use, so I simply reserved 4 KB from start.
Signature · 2 lines
Regards, Shawn
PATCH 1/2 mx51evk: support new relocation scheme
Dear Shawn Guo,
Quoted 17 lines · In message <[email protected]> you…
Quoted 16 lines · Stefano Babic
Quoted 14 lines · Shawn Guo
Hi Stefano,
Quoted 8 lines · Stefano Babic
Review
Quoted 2 lines · Shawn Guo
(quoted diff) +2
-0+#define CONFIG_SYS_SDRAM_BASE =A0 =A0 =A0 =A0PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR =A0 =A0 =A0(IRAM_BASE_ADDR + 0x1000)What is the meaning of the offset at
0x1000? Is there something atIRAM_BASE_ADDR?I thought
CONFIG_SYS_INIT_SP_ADDRis assigned to stack pointer (sp) which decrease the address. =A0Is it not the case?
Quoted 5 lines
Quoted 3 lines
Yes, my doubt is due to the fact that we do not set the SP at the end of the IRAM and we set it to an arbitrary address in between.
At this point, IRAM is totally free for u-boot to use, so I simply reserved 4 KB from start.
It is a bad idea when everybody implement this differently, just as he feels.
I want to get rid of this. Patches following soon. As for now, please focus on defining the proper address and size of the IRAM, the rest will then be automatically derived (global data on top, then stack below).
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de One difference between a man and a machine is that a machine is quiet when well oiled.
PATCH 1/2 mx51evk: support new relocation scheme
In reply to Stefano BabicHello Stefano,
Quoted 11 lines · Stefano Babic
Quoted 10 lines · Shawn Guo
Hi Stefano,
Quoted 7 lines · Stefano Babic
include/configs/mx51evk.h line 179
Quoted 2 lines · Shawn Guo
include/configs/mx51evk.h +2
-0+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (IRAM_BASE_ADDR + 0x1000)What is the meaning of the offset at
0x1000? Is there something atIRAM_BASE_ADDR?
Quoted 6 lines
Quoted 3 lines
I thought
CONFIG_SYS_INIT_SP_ADDRis assigned to stack pointer (sp) which decrease the address. Is it not the case?Yes, my doubt is due to the fact that we do not set the SP at the end of the IRAM and we set it to an arbitrary address in between.
We should set the CONFIG_SYS_INIT_SP_ADDR @ (IRAM_BASE_ADDR + IRAM_BASE_SIZE
- CONFIG_SYS_GBL_DATA_SIZE)
Don;t know if IRAM_BASE_SIZE exists ...
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 1/2 mx51evk: support new relocation scheme
Hi Heiko,
Quoted 18 lines · Heiko Schocher
Hello Stefano,
Quoted 15 lines · Stefano Babic
Quoted 13 lines · Shawn Guo
Hi Stefano,
Quoted 7 lines · Stefano Babic
Review
Quoted 2 lines · Shawn Guo
(quoted diff) +2
-0+#define CONFIG_SYS_SDRAM_BASE ? ? ? ?PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR ? ? ?(IRAM_BASE_ADDR + 0x1000)What is the meaning of the offset at
0x1000? Is there something atIRAM_BASE_ADDR?I thought
CONFIG_SYS_INIT_SP_ADDRis assigned to stack pointer (sp) which decrease the address. ?Is it not the case?
Quoted 6 lines
Quoted 2 lines
Yes, my doubt is due to the fact that we do not set the SP at the end of the IRAM and we set it to an arbitrary address in between.
We should set the
CONFIG_SYS_INIT_SP_ADDR@ (IRAM_BASE_ADDR+IRAM_BASE_SIZE
-CONFIG_SYS_GBL_DATA_SIZE)
Since u-boot is running in external memory, shouldn't CONFIG_SYS_GBL_DATA_SIZE be using the external memory space other than IRAM?
Signature · 2 lines
Regards, Shawn
PATCH 1/2 mx51evk: support new relocation scheme
Hello Shawn,
Quoted 20 lines · Shawn Guo
Hi Heiko,
Quoted 17 lines · Heiko Schocher
Hello Stefano,
Quoted 14 lines · Stefano Babic
Quoted 13 lines · Shawn Guo
Hi Stefano,
Quoted 7 lines · Stefano Babic
include/configs/mx51evk.h line 179
Quoted 2 lines · Shawn Guo
include/configs/mx51evk.h +2
-0+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (IRAM_BASE_ADDR + 0x1000)What is the meaning of the offset at
0x1000? Is there something atIRAM_BASE_ADDR?I thought
CONFIG_SYS_INIT_SP_ADDRis assigned to stack pointer (sp) which decrease the address. Is it not the case?
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Yes, my doubt is due to the fact that we do not set the SP at the end of the IRAM and we set it to an arbitrary address in between.
We should set the
CONFIG_SYS_INIT_SP_ADDR@ (IRAM_BASE_ADDR+IRAM_BASE_SIZE
-CONFIG_SYS_GBL_DATA_SIZE)Since u-boot is running in external memory, shouldn't
CONFIG_SYS_GBL_DATA_SIZEbe using the external memory space other than IRAM?
U-Boot uses only before relocation the sp @CONFIG_SYS_INIT_SP_ADDR. This is for example for boards, which boots from NOR flash, and they have no working RAM before relocation. So Stackpointer should be setup in some none SDRAM. After relocation, Stackpointer is setup in SDRAM, and CONFIG_SYS_INIT_SP_ADDR is not longer used.
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 1/2 mx51evk: support new relocation scheme
In reply to Heiko SchocherQuoted 18 lines · Heiko Schocher
Hello Stefano,
Quoted 15 lines · Stefano Babic
Quoted 13 lines · Shawn Guo
Hi Stefano,
Quoted 7 lines · Stefano Babic
include/configs/mx51evk.h line 179
Quoted 2 lines · Shawn Guo
include/configs/mx51evk.h +2
-0+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (IRAM_BASE_ADDR + 0x1000)What is the meaning of the offset at
0x1000? Is there something atIRAM_BASE_ADDR?I thought
CONFIG_SYS_INIT_SP_ADDRis assigned to stack pointer (sp) which decrease the address. Is it not the case?
Quoted 5 lines
Quoted 2 lines
Yes, my doubt is due to the fact that we do not set the SP at the end of the IRAM and we set it to an arbitrary address in between.
We should set the
CONFIG_SYS_INIT_SP_ADDR@ (IRAM_BASE_ADDR+IRAM_BASE_SIZE
-CONFIG_SYS_GBL_DATA_SIZE)
Agree, this is what I set for the vision2 board. We should be consistent and do the same for the mx51evk.
Quoted 2 lines
Don;t know if
IRAM_BASE_SIZEexists ...
we must define it. I set it in the board configuration file, but it is wrong. The value should be moved into register definition file for the SoC (imx-regs.h)
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 1/2 mx51evk: support new relocation scheme
Hello Stefano,
Quoted 18 lines · Stefano Babic
Quoted 17 lines · Heiko Schocher
Hello Stefano,
Quoted 14 lines · Stefano Babic
Quoted 13 lines · Shawn Guo
Hi Stefano,
Quoted 7 lines · Stefano Babic
include/configs/mx51evk.h line 179
Quoted 2 lines · Shawn Guo
include/configs/mx51evk.h +2
-0+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (IRAM_BASE_ADDR + 0x1000)What is the meaning of the offset at
0x1000? Is there something atIRAM_BASE_ADDR?I thought
CONFIG_SYS_INIT_SP_ADDRis assigned to stack pointer (sp) which decrease the address. Is it not the case?
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Yes, my doubt is due to the fact that we do not set the SP at the end of the IRAM and we set it to an arbitrary address in between.
We should set the
CONFIG_SYS_INIT_SP_ADDR@ (IRAM_BASE_ADDR+IRAM_BASE_SIZE
-CONFIG_SYS_GBL_DATA_SIZE)Agree, this is what I set for the vision2 board. We should be consistent and do the same for the mx51evk.
Yep.
Quoted 5 lines
Quoted 1 line
Don;t know if
IRAM_BASE_SIZEexists ...we must define it. I set it in the board configuration file, but it is wrong. The value should be moved into register definition file for the SoC (
imx-regs.h)
Full-Ack. This is a SoC define, not board dependend.
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 1/2 mx51evk: support new relocation scheme
Dear Heiko Schocher,
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 6 lines
Quoted 2 lines
Don;t know if
IRAM_BASE_SIZEexists ...we must define it. I set it in the board configuration file, but it is wrong. The value should be moved into register definition file for the SoC (
imx-regs.h)Full-Ack. This is a SoC define, not board dependend.
It may be board dependent - for exmaple, when there is some large and conveniently usable SRAM on a board, you might want to use that instead of any limited area on the SoC.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Either one of us, by himself, is expendable. Both of us are not. -- Kirk, "The Devil in the Dark", stardate 3196.1
PATCH 1/2 mx51evk: support new relocation scheme
Hello Wolfgang,
Quoted 4 lines · Wolfgang Denk
Dear Heiko Schocher,
Quoted 1 line · In message <[email protected]> you wrote:
Quoted 1 line
Quoted 1 line
Don;t know if
IRAM_BASE_SIZEexists ...
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
we must define it. I set it in the board configuration file, but it is wrong. The value should be moved into register definition file for the SoC (
imx-regs.h)Full-Ack. This is a SoC define, not board dependend.
It may be board dependent - for exmaple, when there is some large and conveniently usable SRAM on a board, you might want to use that instead of any limited area on the SoC.
IRAM_BASE_SIZE is SoC dependend! You maybe mean CONFIG_SYS_INIT_SP_ADDR which can be of course board dependend.
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 1/2 mx51evk: support new relocation scheme
Quoted 10 lines · Heiko Schocher
Hello Wolfgang,
Quoted 7 lines · Wolfgang Denk
Dear Heiko Schocher,
Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 4 lines
Quoted 1 line
Don;t know if
IRAM_BASE_SIZEexists ...we must define it. I set it in the board configuration file, but it is wrong. The value should be moved into register definition file for the SoC (
imx-regs.h)
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Full-Ack. This is a SoC define, not board dependend.
It may be board dependent - for exmaple, when there is some large and conveniently usable SRAM on a board, you might want to use that instead of any limited area on the SoC.
IRAM_BASE_SIZEis SoC dependend! You maybe meanCONFIG_SYS_INIT_SP_ADDRwhich can be of course board dependend.
Agree. IRAM_BASE_SIZE and IRAM_BASE are SoC dependent and they must be set in the register definition file for the MX.51. At the moment, IRAM_BASE is set with a wrong value (that is a smaller IRAM is actually defined as the one processor has) and IRAM_BASE_SIZE is not set, but is derived in board configuration file (both things must be corrected, anyway).
Stefano
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 1/2 mx51evk: support new relocation scheme
In reply to Heiko SchocherDear Heiko Schocher,
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 4 lines
It may be board dependent - for exmaple, when there is some large and conveniently usable SRAM on a board, you might want to use that instead of any limited area on the SoC.
IRAM_BASE_SIZEis SoC dependend! You maybe meanCONFIG_SYS_INIT_SP_ADDRwhich can be of course board dependend.
No, what I mean is CONFIG_SYS_INIT_RAM_ADDR (and CONFIG_SYS_INIT_RAM_END). CONFIG_SYS_INIT_SP_ADDR is a definition that will go away because it can be computed from the other data.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Swap read error. You lose your mind.
PATCH 1/2 mx51evk: support new relocation scheme
In reply to Stefano BabicQuoted 8 lines · Stefano Babic
Quoted 2 lines · Heiko Schocher
We should set the
CONFIG_SYS_INIT_SP_ADDR@ (IRAM_BASE_ADDR+IRAM_BASE_SIZE
-CONFIG_SYS_GBL_DATA_SIZE)Agree, this is what I set for the vision2 board. We should be consistent and do the same for the mx51evk.
Quoted 1 line
Quoted 6 lines
Quoted 1 line
Don;t know if
IRAM_BASE_SIZEexists ...we must define it. I set it in the board configuration file, but it is wrong. The value should be moved into register definition file for the SoC (
imx-regs.h)
I see many other platforms using 0x1000 offset way to define CONFIG_SYS_INIT_SP_ADDR, so I did that to make it a little bit more common. But I'm fine to start from the end, and will send v3 of this patch soon.
Signature · 2 lines
Regards, Shawn
PATCH 1/2 mx51evk: support new relocation scheme
Dear Shawn Guo,
Quoted 8 lines · Stefano Babic
Quoted 7 lines · Heiko Schocher
Quoted 2 lines
We should set the
CONFIG_SYS_INIT_SP_ADDR@ (IRAM_BASE_ADDR+IRAM_BASE_SIZE
-CONFIG_SYS_GBL_DATA_SIZE)Agree, this is what I set for the vision2 board. We should be consistent and do the same for the mx51evk.
Quoted 1 line
Don;t know if
IRAM_BASE_SIZEexists ...
Quoted 8 lines
Quoted 4 lines
we must define it. I set it in the board configuration file, but it is wrong. The value should be moved into register definition file for the SoC (
imx-regs.h)I see many other platforms using
0x1000offset way to defineCONFIG_SYS_INIT_SP_ADDR, so I did that to make it a little bit more common. But I'm fine to start from the end, and will send v3 of this patch soon.
I just tried to add the symbolic version
#define CONFIG_SYS_INIT_SP_ADDR (xxx_SRAM_BASE + xxx_SRAM_SIZE - CONFIG_SYS_GBL_DATA_SIZE)
in AT91, but that means (assuming those xxx- defines come from an SoC specific file) that in start.s the includes
#if defined(CONFIG_OMAP1610)
#include <./configs/omap1510.h>
#elif defined(CONFIG_OMAP730)
#include <./configs/omap730.h>
#endif
have to be expanded for every SoC in question. Or to include the <soc>.h into the <board>.h...
Which way to go?
Reinhard
PATCH 1/2 mx51evk: support new relocation scheme
Hi Reinhard
Quoted 31 lines · Reinhard Meyer
Dear Shawn Guo,
Quoted 8 lines · Stefano Babic
Quoted 7 lines · Heiko Schocher
Quoted 2 lines
We should set the
CONFIG_SYS_INIT_SP_ADDR@ (IRAM_BASE_ADDR+IRAM_BASE_SIZE
-CONFIG_SYS_GBL_DATA_SIZE)Agree, this is what I set for the vision2 board. We should be consistent and do the same for the mx51evk.
Quoted 1 line
Don;t know if
IRAM_BASE_SIZEexists ...Quoted 8 lines
Quoted 4 lines
we must define it. I set it in the board configuration file, but it is wrong. The value should be moved into register definition file for the SoC (
imx-regs.h)I see many other platforms using
0x1000offset way to defineCONFIG_SYS_INIT_SP_ADDR, so I did that to make it a little bit more common. ?But I'm fine to start from the end, and will send v3 of this patch soon.I just tried to add the symbolic version
#define
CONFIG_SYS_INIT_SP_ADDR(xxx_SRAM_BASE+xxx_SRAM_SIZE-CONFIG_SYS_GBL_DATA_SIZE)in AT91, but that means (assuming those xxx- defines come from an SoC specific file) that in start.s the includes
#if
defined(CONFIG_OMAP1610)
#include <./configs/omap1510.h>
#elifdefined(CONFIG_OMAP730)
#include <./configs/omap730.h>
#endif
Quoted 5 lines
have to be expanded for every SoC in question. Or to include the <soc>.h into the <board>.h...
Which way to go?
I'm going the way of including <soc>.h into <board>.h, as I see omap3_beagle.h is doing this way.
Signature · 2 lines
Regards, Shawn
PATCH 1/2 mx51evk: support new relocation scheme
Dear Shawn Guo,
Quoted 5 lines · In message <[email protected]> you…
Quoted 3 lines
Which way to go?
I'm going the way of including <soc>.h into <board>.h, as I see
omap3_beagle.his doing this way.
Please wait. Patches in the works.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Without facts, the decision cannot be made logically. You must rely on your human intuition. -- Spock, "Assignment: Earth", stardate unknown
PATCH 1/2 mx51evk: support new relocation scheme
In reply to Reinhard MeyerDear Reinhard Meyer,
Quoted 10 lines · In message <[email protected]> you wrote:
in AT91, but that means (assuming those xxx- defines come from an SoC specific file) that in start.s the includes
#if
defined(CONFIG_OMAP1610)
#include <./configs/omap1510.h>
#elifdefined(CONFIG_OMAP730)
#include <./configs/omap730.h>
#endif
Quoted 4 lines
have to be expanded for every SoC in question. Or to include the <soc>.h into the <board>.h...
Which way to go?
Wait for my patches :-)
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de What is wanted is not the will to believe, but the will to find out, which is the exact opposite. -- Bertrand Russell, "Skeptical Essays", 1928
PATCH 1/2 mx51evk: support new relocation scheme
In reply to Shawn GuoDear Shawn Guo,
Quoted 5 lines · In message <[email protected]> you…
Hi Stefano,
Quoted 2 lines · Stefano Babic
On 10/25/2010 05:14 PM, Shawn Guo wrote:
Quoted 8 lines
Quoted 6 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+#define CONFIG_SYS_SDRAM_BASE =A0 =A0 =A0 =A0PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR =A0 =A0 =A0(IRAM_BASE_ADDR + 0x1000)What is the meaning of the offset at
0x1000? Is there something atIRAM_BASE_ADDR?I thought
CONFIG_SYS_INIT_SP_ADDRis assigned to stack pointer (sp) which decrease the address. Is it not the case?
Boards should define CONFIG_SYS_INIT_RAM_ADDR (the start address) and CONFIG_SYS_INIT_RAM_END (actually the size of the initial RAM).
I'm working on patches that will auto-calculate CONFIG_SYS_INIT_SP* from that.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de In the strict scientific sense we all feed on death -- even vegetarians. -- Spock, "Wolf in the Fold", stardate 3615.4
PATCH 2/2 mx51evk: correct internal RAM base address
In reply to Shawn Guoi.mx51 internal RAM starts from 0x1FFE0000 than 0x1FFE8000
--- arch/arm/include/asm/arch-mx5/imx-regs.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/include/asm/arch-mx5/imx-regs.h +1 -1
@@ -26,7 +26,7 @@/* * IRAM */ -#define IRAM_BASE_ADDR 0x1FFE8000/* internal ram */ +#define IRAM_BASE_ADDR 0x1FFE0000/* internal ram */ /* * Graphics Memory of GPU */
Signature · 1 line
1.7.1
PATCH 2/2 mx51evk: correct internal RAM base address
HI, Shawn
2010/10/25 Shawn Guo <[email protected]>:
Quoted 1 line
i.mx51 internal RAM starts from
0x1FFE0000than0x1FFE8000
Correctly speaking, i.mx51 TO1 SCCv2 RAM strart from 0x1FF80000 TO3 should be starting from 0x1FFE0000
Maybe you need fix the commit log and state it clearly.
Quoted 27 lines
Signed-off-by Shawn Guo <[email protected]>---
?arch/arm/include/asm/arch-mx5/imx-regs.h | ? ?2 +- ?1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/include/asm/arch-mx5/imx-regs.h +0
-0@@ -26,7 +26,7 @@?/*
?* IRAM
?*/arch/arm/include/asm/arch-mx5/imx-regs.h +1
-1-#define IRAM_BASE_ADDR ? ? ? ? 0x1FFE8000 ? ? ?/* internal ram */ +#define IRAM_BASE_ADDR ? ? ? ? 0x1FFE0000 ? ? ?/* internal ram */ ?/*
?* Graphics Memory of GPU
?*/
--
1.7.1_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 2/2 mx51evk: correct internal RAM base address
Quoted 6 lines · Jason Liu
HI, Shawn
2010/10/25 Shawn Guo <[email protected]>:
Quoted 1 line
i.mx51 internal RAM starts from
0x1FFE0000than0x1FFE8000Correctly speaking, i.mx51 TO1 SCCv2 RAM strart from
0x1FF80000
0x1FFE8000, you mean.
Quoted 3 lines
TO3
should be starting from0x1FFE0000
Maybe you need fix the commit log and state it clearly.
Then there could be a problem. If we set the IRAM as for TO3, u-boot does not run on boards with TO1 (never seen) and TO2 (I used a board with it. Freescale sold several boards with TO2, so I do not think we can simply drop it). The stackpointer used before the relocation should be in an area common at least for TO2 and TO3.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 2/2 mx51evk: correct internal RAM base address
Hi Stefano,
Quoted 6 lines · Stefano Babic
Then there could be a problem. If we set the IRAM as for TO3, u-boot does not run on boards with TO1 (never seen) and TO2 (I used a board with it. Freescale sold several boards with TO2, so I do not think we can simply drop it). The stackpointer used before the relocation should be in an area common at least for TO2 and TO3.
TO2 and TO3 shares the same memory map, so IRAM starts from 0x1FFE0000 on both TO2 and TO3.
Signature · 2 lines
Regards, Shawn
PATCH v2 2/2 mx51evk: correct internal RAM base address
In reply to Shawn GuoThe internal RAM starts from 0x1FFE0000 on final revsion i.mx51 than 0x1FFE8000 which is for older revision.
---
Changes for v2:
Rewrite the commit message for a better change log.
arch/arm/include/asm/arch-mx5/imx-regs.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/include/asm/arch-mx5/imx-regs.h +1 -1
@@ -26,7 +26,7 @@/* * IRAM */ -#define IRAM_BASE_ADDR 0x1FFE8000/* internal ram */ +#define IRAM_BASE_ADDR 0x1FFE0000/* internal ram */ /* * Graphics Memory of GPU */
Signature · 1 line
1.7.1