arm: Make jadecpu use relocation
PATCH 1/1 arm: Make jadecpu use relocation
This patch modifies jadecpu board so that it is usable with the relocation patches by Heiko Schocher
--- board/syteco/jadecpu/config.mk | 2 +- board/syteco/jadecpu/jadecpu.c | 11 +++++++++-- include/configs/jadecpu.h | 3 +++ 3 files changed, 13 insertions(+), 3 deletions(-)
board/syteco/jadecpu/config.mk +1 -1
@@ -1 +1 @@ -TEXT_BASE = 0x46000000 +TEXT_BASE = 0x10000000
board/syteco/jadecpu/jadecpu.c +9 -2
@@ -154,12 +154,19 @@ int misc_init_r(void)*/ int dram_init (void ) { - gd->bd->bi_dram[0 ].start =PHYS_SDRAM ; - gd->bd->bi_dram[0 ].size =PHYS_SDRAM_SIZE ; +/* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size =get_ram_size ((volatile void *)PHYS_SDRAM , +PHYS_SDRAM_SIZE );return 0 ; } +void dram_init_banksize (void ) +{ + gd->bd->bi_dram[0 ].start =PHYS_SDRAM ; + gd->bd->bi_dram[0 ].size = gd->ram_size; +} +int board_eth_init (bd_t *bis) {int rc =0 ;
include/configs/jadecpu.h +3 -0
@@ -146,6 +146,9 @@#define PHYS_SDRAM 0x40000000/* Start address of DDRRAM */ #define PHYS_SDRAM_SIZE 0x08000000/* 128 megs */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM +#define CONFIG_SYS_INIT_SP_ADDR 0x01008000 +/* * FLASH and environment organization */
Signature · 1 line
1.7.0.4
Wolfgang Denk
AppliedPATCH 1/1 arm: Make jadecpu use relocation
Dear Matthias Weisser,
Quoted 9 lines · In message <[email protected]> you wrote:
This patch modifies jadecpu board so that it is usable with the relocation patches by Heiko Schocher
Signed-off-by Matthias Weisser <[email protected]>--- board/syteco/jadecpu/config.mk | 2 +- board/syteco/jadecpu/jadecpu.c | 11 +++++++++-- include/configs/jadecpu.h | 3 +++ 3 files changed, 13 insertions(+), 3 deletions(-)
Applied to "next" branch, thanks.
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 Actual war is a very messy business. Very, very messy business. -- Kirk, "A Taste of Armageddon", stardate 3193.0
PATCH 1/1 arm: Make jadecpu use relocation
In reply to Matthias WeisserDear Matthias Weisser,
Quoted 22 lines · In message <[email protected]> you wrote:
This patch modifies jadecpu board so that it is usable with the relocation patches by Heiko Schocher
Signed-off-by Matthias Weisser <[email protected]>--- board/syteco/jadecpu/config.mk | 2 +- board/syteco/jadecpu/jadecpu.c | 11 +++++++++-- include/configs/jadecpu.h | 3 +++ 3 files changed, 13 insertions(+), 3 deletions(-)board/syteco/jadecpu/config.mk +1
-1@@ -1 +1 @@ -TEXT_BASE = 0x46000000 +TEXT_BASE = 0x10000000board/syteco/jadecpu/jadecpu.c +0
-0
board/syteco/jadecpu/jadecpu.c int misc_init_r(void) · line 159
Quoted 8 lines
board/syteco/jadecpu/jadecpu.c +3
-2@@ -154,12 +154,19 @@ int misc_init_r(void)*/ int dram_init (void ) { - gd->bd->bi_dram[0 ].start =PHYS_SDRAM ; - gd->bd->bi_dram[0 ].size =PHYS_SDRAM_SIZE ; +/* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size =get_ram_size ((volatile void *)PHYS_SDRAM , +PHYS_SDRAM_SIZE );
Unfortunately this breaks building for this board:
jadecpu.c: In function 'dram_init':
jadecpu.c:158: error: 'gd_t' has no member named 'ram_size' jadecpu.c: In function 'dram_init_banksize':
jadecpu.c:167: error: 'gd_t' has no member named 'ram_size'
Can you please provide a fix? Thanks.
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 My play was a complete success. The audience was a failure.
PATCH 1/1 arm: Make jadecpu use relocation
Hello Wolfgang
Am 05.10.2010 20:41, schrieb Wolfgang Denk:
Quoted 9 lines
Dear Matthias Weisser,
board/syteco/jadecpu/jadecpu.c int misc_init_r(void) · line 159
Quoted 5 lines
board/syteco/jadecpu/jadecpu.c +3
-2- gd->bd->bi_dram[0 ].start =PHYS_SDRAM ; - gd->bd->bi_dram[0 ].size =PHYS_SDRAM_SIZE ; +/* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size =get_ram_size ((volatile void *)PHYS_SDRAM , +PHYS_SDRAM_SIZE );Unfortunately this breaks building for this board:
Quoted 6 lines
jadecpu.c: In function 'dram_init':
jadecpu.c:158: error: 'gd_t' has no member named 'ram_size'jadecpu.c: In function 'dram_init_banksize':
jadecpu.c:167: error: 'gd_t' has no member named 'ram_size'Can you please provide a fix? Thanks.
I am not sure how to fix this. gd_t contains a member ram_size if CONFIG_SYS_ARM_WITHOUT_RELOC is not defined. This is the case for our jadecpu board.
Also the patch is in current master branch and builds cleanly here.
Matthias
PATCH 1/1 arm: Make jadecpu use relocation
Dear =?ISO-8859-1?Q?Matthias_Wei=DFer?=,
Quoted 2 lines · In message <[email protected]> you wrote:
Quoted 2 lines
Unfortunately this breaks building for this board:
...
Quoted 5 lines
I am not sure how to fix this.
gd_tcontains a memberram_sizeifCONFIG_SYS_ARM_WITHOUT_RELOCis not defined. This is the case for our jadecpu board.Also the patch is in current master branch and builds cleanly here.
Confirmed.
Sorry for the confusion. I just did not expect that the board might build without CONFIG_SYS_ARM_WITHOUT_RELOC ;-)
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
"More software projects have gone awry for lack of calendar time than
for all other causes combined."
- Fred Brooks, Jr., _The Mythical Man Month_