scb9328: Add ARM relocation support
PATCH v2 1/1 scb9328: Add ARM relocation support
This patch fixes compiler errors due to missing definitions of CONFIG_SYS_SDRAM_BASE and CONFIG_SYS_INIT_SP_ADDR.
It also does some cleanup: CONFIG_SYS_TEXT_BASE was moved to scb9328.h, obsolete config.mk was removed. The scb9328 board has 1 DRAM bank, so don't ask for more banks. CONFIG_NR_DRAM_BANKS will ever be 1.
--- board/scb9328/config.mk | 10 ---------- board/scb9328/scb9328.c | 24 +++++++++--------------- include/configs/scb9328.h | 5 +++++ 3 files changed, 14 insertions(+), 25 deletions(-)
delete mode 100644 board/scb9328/config.mk
board/scb9328/config.mk deleted +0 -4
@@ -1,10 +0,0 @@ -# -# This config file is used for compilation of scb93328 sources -# -# You might change location of U-Boot in memory by setting right
CONFIG_SYS_TEXT_BASE.
-# This allows for example having one copy located at the end of ram and stored
-# in flash device and later on while developing use other location to test -# the code in RAM device only.
-#
-
-CONFIG_SYS_TEXT_BASE = 0x08f00000
board/scb9328/scb9328.c +9 -15
@@ -39,23 +39,17 @@ int board_init (void)int dram_init (void ) { -#if (CONFIG_NR_DRAM_BANKS >0 ) +/* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size =get_ram_size ((volatile void *)SCB9328_SDRAM_1 , +SCB9328_SDRAM_1_SIZE ); + +return 0 ; +} + +void dram_init_banksize (void ) +{ gd->bd->bi_dram[0 ].start =SCB9328_SDRAM_1 ; gd->bd->bi_dram[0 ].size =SCB9328_SDRAM_1_SIZE ; -#endif -#if (CONFIG_NR_DRAM_BANKS >1 ) - gd->bd->bi_dram[1 ].start =SCB9328_SDRAM_2 ; - gd->bd->bi_dram[1 ].size =SCB9328_SDRAM_2_SIZE ; -#endif -#if (CONFIG_NR_DRAM_BANKS >2 ) - gd->bd->bi_dram[2 ].start =SCB9328_SDRAM_3 ; - gd->bd->bi_dram[2 ].size =SCB9328_SDRAM_3_SIZE ; -#endif -#if (CONFIG_NR_DRAM_BANKS >3 ) - gd->bd->bi_dram[3 ].start =SCB9328_SDRAM_4 ; - gd->bd->bi_dram[3 ].size =SCB9328_SDRAM_4_SIZE ; -#endif -return 0 ; }/**
include/configs/scb9328.h +5 -0
@@ -126,6 +126,11 @@#define SCB9328_SDRAM_1 0x08000000/* SDRAM bank #1 */ #define SCB9328_SDRAM_1_SIZE 0x01000000/* 16 MB */ +#define CONFIG_SYS_TEXT_BASE 0x10000000 + +#define CONFIG_SYS_SDRAM_BASE SCB9328_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR SCB9328_SDRAM_1 + 0xf00000 +/* * Configuration for FLASH memory for the Synertronixx board */
Signature · 1 line
1.7.5.4
PATCH v2 1/1 scb9328: Add ARM relocation support
Quoted 8 lines · Torsten Koschorrek
This patch fixes compiler errors due to missing definitions of
CONFIG_SYS_SDRAM_BASEandCONFIG_SYS_INIT_SP_ADDR.
It also does some cleanup:CONFIG_SYS_TEXT_BASEwas moved toscb9328.h, obsolete config.mk was removed. The scb9328 board has 1 DRAM bank, so don't ask for more banks.CONFIG_NR_DRAM_BANKSwill ever be 1.Signed-off-by Torsten Koschorrek <[email protected]>---
Torsten,
checkpatch reports a couple of errors and your patch seems corrupted. Have you used "git send-email" to post your patch ?
WARNING: space prohibited between function name and open parenthesis '(' #60: FILE: board/scb9328/scb9328.c:48:
+void dram_init_banksize (void)
ERROR: patch seems to be corrupt (line wrapped?)
#80: FILE: board/scb9328/scb9328.c:53:
include/configs/scb9328.h +0 -0
ERROR: Macros with complex values should be enclosed in parenthesis #90: FILE: board/scb9328/scb9328.c:131:
+#define CONFIG_SYS_INIT_SP_ADDR SCB9328_SDRAM_1 + 0xf00000
total: 2 errors, 2 warnings, 46 lines checked
Can you fix them and repost ?
Quoted 1 line
+#define
CONFIG_SYS_INIT_SP_ADDRSCB9328_SDRAM_1+0xf00000
You must add parenthesis surrounding the values.
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 v2 1/1 scb9328: Add ARM relocation support
Quoted 7 lines · Stefano Babic
Quoted 6 lines · Torsten Koschorrek
This patch fixes compiler errors due to missing definitions of
CONFIG_SYS_SDRAM_BASEandCONFIG_SYS_INIT_SP_ADDR.
It also does some cleanup:CONFIG_SYS_TEXT_BASEwas moved toscb9328.h, obsolete config.mk was removed. The scb9328 board has 1 DRAM bank, so don't ask for more banks.CONFIG_NR_DRAM_BANKSwill ever be 1.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Torsten Koschorrek<[email protected]>---
Torsten,
checkpatch reports a couple of errors and your patch seems corrupted. Have you used "git send-email" to post your patch ?
I used git format-patch plus mozilla/iceape. Hmm, maybe I choose another mailer for sending patches the next time...
Quoted 5 lines
WARNING: space prohibited between function name and open parenthesis '(' #60: FILE:
board/scb9328/scb9328.c:48:
+voiddram_init_banksize(void)
fixed in v3
include/configs/scb9328.h
Quoted 4 lines
ERROR: patch seems to be corrupt (line wrapped?)
#80: FILE:board/scb9328/scb9328.c:53:include/configs/scb9328.h +0
-0
hopefully ok in v3, this most probably came from mozilla
Quoted 4 lines
ERROR: Macros with complex values should be enclosed in parenthesis #90: FILE:
board/scb9328/scb9328.c:131:
+#defineCONFIG_SYS_INIT_SP_ADDRSCB9328_SDRAM_1+0xf00000
fixed in v3
Quoted 3 lines
Best regards,
Stefano Babic
Torsten
PATCH v2 1/1 scb9328: Add ARM relocation support
Hi Torsten,
Quoted 11 lines · Torsten Koschorrek
Quoted 10 lines · Stefano Babic
Quoted 8 lines · Torsten Koschorrek
This patch fixes compiler errors due to missing definitions of
CONFIG_SYS_SDRAM_BASEandCONFIG_SYS_INIT_SP_ADDR.
It also does some cleanup:CONFIG_SYS_TEXT_BASEwas moved toscb9328.h, obsolete config.mk was removed. The scb9328 board has 1 DRAM bank, so don't ask for more banks.CONFIG_NR_DRAM_BANKSwill ever be 1.Signed-off-by Torsten Koschorrek<[email protected]>---
Quoted 8 lines
Quoted 4 lines
Torsten,
checkpatch reports a couple of errors and your patch seems corrupted. Have you used "git send-email" to post your patch ?
I used git format-patch plus mozilla/iceape. Hmm, maybe I choose another mailer for sending patches the next time...
use git send-email - trust me, this will save you a heap of pain :)
Regards,
Graeme