Commit 14d0a02a authored by Wolfgang Denk's avatar Wolfgang Denk

Rename TEXT_BASE into CONFIG_SYS_TEXT_BASE

The change is currently needed to be able to remove the board
configuration scripting from the top level Makefile and replace it by
a simple, table driven script.

Moving this configuration setting into the "CONFIG_*" name space is
also desirable because it is needed if we ever should move forward to
a Kconfig driven configuration system.
Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
parent d24f2d32
This diff is collapsed.
......@@ -2248,7 +2248,7 @@ Configuration Settings:
- CONFIG_SYS_MONITOR_BASE:
Physical start address of boot monitor code (set by
make config files to be same as the text base address
(TEXT_BASE) used when linking) - same as
(CONFIG_SYS_TEXT_BASE) used when linking) - same as
CONFIG_SYS_FLASH_BASE when booting from flash.
- CONFIG_SYS_MONITOR_LEN:
......
......@@ -87,7 +87,7 @@ _end_vect:
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
......
......@@ -97,7 +97,7 @@ _end_vect:
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
/*
* Below variable is very important because we use MMU in U-Boot.
......@@ -205,7 +205,7 @@ cpu_init_crit:
/* Prepare to disable the MMU */
adr r2, mmu_disable_phys
sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - TEXT_BASE)
sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - CONFIG_SYS_TEXT_BASE)
b mmu_disable
.align 5
......@@ -444,7 +444,7 @@ cpu_init_crit:
/* Prepare to disable the MMU */
adr r2, mmu_disable_phys
sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - TEXT_BASE)
sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - CONFIG_SYS_TEXT_BASE)
b mmu_disable
.align 5
......
......@@ -77,7 +77,7 @@ _fiq: .word fiq
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
......@@ -298,11 +298,11 @@ relocate: /* relocate U-Boot to RAM */
cmp r0, r1 /* don't reloc during debug */
beq stack_setup
#if TEXT_BASE
#if CONFIG_SYS_TEXT_BASE
#ifndef CONFIG_LPC2292 /* already done in lowlevel_init */
ldr r2, =0x0 /* Relocate the exception vectors */
cmp r1, r2 /* and associated data to address */
ldmneia r0!, {r3-r10} /* 0x0. Do nothing if TEXT_BASE is */
ldmneia r0!, {r3-r10} /* 0x0. Do nothing if CONFIG_SYS_TEXT_BASE is */
stmneia r2!, {r3-r10} /* 0x0. Copy the first 15 words. */
ldmneia r0, {r3-r9}
stmneia r2, {r3-r9}
......@@ -755,7 +755,7 @@ reset_cpu:
ldr r0, [r1, #+NETARM_MEM_CS0_BASE_ADDR]
ldr r1, =0xFFFFF000
and r0, r1, r0
ldr r1, =(relocate-TEXT_BASE)
ldr r1, =(relocate-CONFIG_SYS_TEXT_BASE)
add r0, r1, r0
ldr r4, =NETARM_GEN_MODULE_BASE
ldr r1, =NETARM_GEN_SW_SVC_RESETA
......
......@@ -39,9 +39,9 @@
_MTEXT_BASE:
#undef START_FROM_MEM
#ifdef START_FROM_MEM
.word TEXT_BASE-PHYS_FLASH_1
.word CONFIG_SYS_TEXT_BASE-PHYS_FLASH_1
#else
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#endif
.globl lowlevel_init
......
......@@ -43,9 +43,9 @@
_MTEXT_BASE:
#undef START_FROM_MEM
#ifdef START_FROM_MEM
.word TEXT_BASE-PHYS_FLASH_1
.word CONFIG_SYS_TEXT_BASE-PHYS_FLASH_1
#else
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#endif
.globl lowlevel_init
......
......@@ -72,7 +72,7 @@ _fiq: .word fiq
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
......
......@@ -83,7 +83,7 @@ _fiq: .word fiq
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
......
......@@ -43,7 +43,7 @@
#endif
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
.globl lowlevel_init
.type lowlevel_init,function
......@@ -54,7 +54,7 @@ POS1:
ldr r0, =POS1 /* r0 = POS1 compile */
ldr r2, _TEXT_BASE
sub r0, r0, r2 /* r0 = POS1-_TEXT_BASE (POS1 relative) */
sub r5, r5, r0 /* r0 = TEXT_BASE-1 */
sub r5, r5, r0 /* r0 = CONFIG_SYS_TEXT_BASE-1 */
sub r5, r5, #4 /* r1 = text base - current */
/* memory control configuration 1 */
......
......@@ -116,7 +116,7 @@ _fiq:
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
......
......@@ -87,7 +87,7 @@ _fiq:
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
......
......@@ -85,7 +85,7 @@ _fiq:
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE /* address of _start in the linked image */
.word CONFIG_SYS_TEXT_BASE /* address of _start in the linked image */
#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
......
......@@ -33,7 +33,7 @@
#include <asm/arch/clocks_omap3.h>
_TEXT_BASE:
.word TEXT_BASE /* sdram load addr from config.mk */
.word CONFIG_SYS_TEXT_BASE /* sdram load addr from config.mk */
#if !defined(CONFIG_SYS_NAND_BOOT) && !defined(CONFIG_SYS_NAND_BOOT)
/**************************************************************************
......
......@@ -67,7 +67,7 @@ _end_vect:
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
......
......@@ -95,7 +95,7 @@ _fiq: .word fiq
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
......
......@@ -74,7 +74,7 @@ _fiq: .word fiq
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
......
......@@ -84,7 +84,7 @@ _fiq: .word fiq
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
......
......@@ -65,7 +65,7 @@ _start: b reset
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
......
......@@ -75,7 +75,7 @@ _fiq: .word fiq
.globl _TEXT_BASE
_TEXT_BASE:
.word TEXT_BASE
.word CONFIG_SYS_TEXT_BASE
#if defined(CONFIG_SYS_ARM_WITHOUT_RELOC)
.globl _armboot_start
......
......@@ -221,8 +221,8 @@ void board_init_f (ulong gdp)
re_end = (Elf32_Rel *)(rel_dyn_end + ((gd_t *)gdp)->load_off);
do {
if (re_src->r_offset >= TEXT_BASE)
if (*(Elf32_Addr *)(re_src->r_offset - rel_offset) >= TEXT_BASE)
if (re_src->r_offset >= CONFIG_SYS_TEXT_BASE)
if (*(Elf32_Addr *)(re_src->r_offset - rel_offset) >= CONFIG_SYS_TEXT_BASE)
*(Elf32_Addr *)(re_src->r_offset - rel_offset) -= rel_offset;
} while (re_src++ < re_end);
......
......@@ -44,8 +44,8 @@
rte;
#if defined(CONFIG_CF_SBF)
#define ASM_DRAMINIT (asm_dram_init - TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#define ASM_SBF_IMG_HDR (asm_sbf_img_hdr - TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#define ASM_DRAMINIT (asm_dram_init - CONFIG_SYS_TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#define ASM_SBF_IMG_HDR (asm_sbf_img_hdr - CONFIG_SYS_TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#endif
.text
......@@ -138,7 +138,7 @@ vector192_255:
asm_sbf_img_hdr:
.long 0x00000000 /* checksum, not yet implemented */
.long 0x00020000 /* image length */
.long TEXT_BASE /* image to be relocated at */
.long CONFIG_SYS_TEXT_BASE /* image to be relocated at */
asm_dram_init:
move.l #(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_CTRL), %d0
......@@ -330,7 +330,7 @@ asm_dspi_rd_loop2:
jsr asm_dspi_rd_status
/* jump to memory and execute */
move.l #(TEXT_BASE + 0x400), %a0
move.l #(CONFIG_SYS_TEXT_BASE + 0x400), %a0
move.l %a0, (%a1)
jmp (%a0)
......@@ -364,7 +364,7 @@ _start:
/* Set vector base register at the beginning of the Flash */
#if defined(CONFIG_CF_SBF)
move.l #TEXT_BASE, %d0
move.l #CONFIG_SYS_TEXT_BASE, %d0
movec %d0, %VBR
#else
move.l #CONFIG_SYS_FLASH_BASE, %d0
......
......@@ -57,8 +57,8 @@
_vectors:
.long 0x00000000 /* Flash offset is 0 until we setup CS0 */
#if defined(CONFIG_M5282) && (TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
.long _start - TEXT_BASE
#if defined(CONFIG_M5282) && (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
.long _start - CONFIG_SYS_TEXT_BASE
#else
.long _START
#endif
......@@ -106,7 +106,7 @@ _vectors:
#if defined(CONFIG_SYS_INT_FLASH_BASE) && \
(defined(CONFIG_M5282) || defined(CONFIG_M5281))
#if (TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
#if (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
.long 0x55AA55AA,0xAA55AA55 /* CFM Backdoorkey */
.long 0xFFFFFFFF /* all sectors protected */
.long 0x00000000 /* supervisor/User restriction */
......@@ -150,7 +150,7 @@ _start:
movec %d0, %RAMBAR1
#if defined(CONFIG_M5282)
#if (TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
#if (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
/* Setup code in SRAM to initialize FLASHBAR, if start from internal Flash */
move.l #(_flashbar_setup-CONFIG_SYS_INT_FLASH_BASE), %a0
......@@ -174,7 +174,7 @@ _after_flashbar_copy:
/* Setup code to initialize FLASHBAR, if start from external Memory */
move.l #(CONFIG_SYS_INT_FLASH_BASE + CONFIG_SYS_INT_FLASH_ENABLE), %d0
movec %d0, %FLASHBAR
#endif /* (TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) */
#endif /* (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE) */
#endif
#endif
......@@ -182,7 +182,7 @@ _after_flashbar_copy:
* therefore no VBR to set
*/
#if !defined(CONFIG_MONITOR_IS_IN_RAM)
#if defined(CONFIG_M5282) && (TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
#if defined(CONFIG_M5282) && (CONFIG_SYS_TEXT_BASE == CONFIG_SYS_INT_FLASH_BASE)
move.l #CONFIG_SYS_INT_FLASH_BASE, %d0
#else
move.l #CONFIG_SYS_FLASH_BASE, %d0
......@@ -297,7 +297,7 @@ clear_bss:
/* set parameters for board_init_r */
move.l %a0,-(%sp) /* dest_addr */
move.l %d0,-(%sp) /* gd */
#if defined(DEBUG) && (TEXT_BASE != CONFIG_SYS_INT_FLASH_BASE) && \
#if defined(DEBUG) && (CONFIG_SYS_TEXT_BASE != CONFIG_SYS_INT_FLASH_BASE) && \
defined(CONFIG_SYS_HALT_BEFOR_RAM_JUMP)
halt
#endif
......
......@@ -44,8 +44,8 @@
rte;
#if defined(CONFIG_CF_SBF)
#define ASM_DRAMINIT (asm_dram_init - TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#define ASM_SBF_IMG_HDR (asm_sbf_img_hdr - TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#define ASM_DRAMINIT (asm_dram_init - CONFIG_SYS_TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#define ASM_SBF_IMG_HDR (asm_sbf_img_hdr - CONFIG_SYS_TEXT_BASE + CONFIG_SYS_INIT_RAM_ADDR)
#endif
.text
......@@ -143,7 +143,7 @@ vector192_255:
asm_sbf_img_hdr:
.long 0x00000000 /* checksum, not yet implemented */
.long 0x00030000 /* image length */
.long TEXT_BASE /* image to be relocated at */
.long CONFIG_SYS_TEXT_BASE /* image to be relocated at */
asm_dram_init:
move.w #0x2700,%sr /* Mask off Interrupt */
......@@ -358,7 +358,7 @@ asm_dspi_rd_loop2:
jsr asm_dspi_rd_status
/* jump to memory and execute */
move.l #(TEXT_BASE + 0x400), %a0
move.l #(CONFIG_SYS_TEXT_BASE + 0x400), %a0
jmp (%a0)
asm_dspi_wr_status:
......
......@@ -69,10 +69,10 @@ _start:
shi r7, r0, 0x2
shi r6, r0, 0x6
/*
* Copy U-Boot code to TEXT_BASE
* Copy U-Boot code to CONFIG_SYS_TEXT_BASE
* solve problem with sbrk_base
*/
#if (CONFIG_SYS_RESET_ADDRESS != TEXT_BASE)
#if (CONFIG_SYS_RESET_ADDRESS != CONFIG_SYS_TEXT_BASE)
addi r4, r0, __end
addi r5, r0, __text_start
rsub r4, r5, r4 /* size = __end - __text_start */
......
......@@ -122,7 +122,7 @@ void board_init (void)
puts ("SDRAM :\n");
printf ("\t\tIcache:%s\n", icache_status() ? "ON" : "OFF");
printf ("\t\tDcache:%s\n", dcache_status() ? "ON" : "OFF");
printf ("\tU-Boot Start:0x%08x\n", TEXT_BASE);
printf ("\tU-Boot Start:0x%08x\n", CONFIG_SYS_TEXT_BASE);
#if defined(CONFIG_CMD_FLASH)
puts ("FLASH: ");
......
......@@ -145,7 +145,7 @@ _start_e500:
beq 2b
/* Setup interrupt vectors */
lis r1,TEXT_BASE@h
lis r1,CONFIG_SYS_TEXT_BASE@h