Skip to content

Commit

Permalink
Drop support for CONFIG_SKIP_RELOCATE_UBOOT
Browse files Browse the repository at this point in the history
For ARM systems, before ELF relocation was introduced,
CONFIG_SKIP_RELOCATE_UBOOT coul be used to prevent *COPYING* the
U-Boot image from whereever it was loaded to it's link address
(CONFIG_SYS_TEXT_BASE).  The name was badly chosen, as no relocation
was performed at all, it was just a memcpy().

With ELF relocation, this does not work like that any more, and
related boards need to be fixed anyway.  So don't keep this relict any
longer.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
  • Loading branch information
wdenx committed Oct 29, 2010
1 parent a9aa392 commit e03f316
Show file tree
Hide file tree
Showing 61 changed files with 8 additions and 109 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,6 @@ mx31pdk_nand_config : unconfig
echo "#define CONFIG_NAND_U_BOOT" >> $(obj)include/config.h; \
else \
echo "#define CONFIG_SKIP_LOWLEVEL_INIT" >> $(obj)include/config.h; \
echo "#define CONFIG_SKIP_RELOCATE_UBOOT" >> $(obj)include/config.h; \
fi
@$(MKCONFIG) -n $@ -a mx31pdk arm arm1136 mx31pdk freescale mx31

Expand Down
18 changes: 8 additions & 10 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -2836,19 +2836,17 @@ Low Level (hardware related) configuration options:
globally (CONFIG_CMD_MEM).

- CONFIG_SKIP_LOWLEVEL_INIT
- CONFIG_SKIP_RELOCATE_UBOOT
[ARM only] If this variable is defined, then certain
low level initializations (like setting up the memory
controller) are omitted and/or U-Boot does not
relocate itself into RAM.

[ARM only] If these variables are defined, then
certain low level initializations (like setting up
the memory controller) are omitted and/or U-Boot does
not relocate itself into RAM.
Normally these variables MUST NOT be defined. The
only exception is when U-Boot is loaded (to RAM) by
some other boot loader or by a debugger which
performs these initializations itself.
Normally this variable MUST NOT be defined. The only
exception is when U-Boot is loaded (to RAM) by some
other boot loader or by a debugger which performs
these initializations itself.

- CONFIG_PRELOADER

Modifies the behaviour of start.S when compiling a loader
that is executed before the actual U-Boot. E.g. when
compiling a NAND SPL.
Expand Down
4 changes: 0 additions & 4 deletions arch/arm/cpu/arm1136/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ stack_setup:
cmp r0, r6
beq clear_bss

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
copy_loop:
ldmia r0!, {r9-r10} /* copy from source address [r0] */
stmia r6!, {r9-r10} /* copy to target address [r1] */
Expand Down Expand Up @@ -262,7 +261,6 @@ fixnext:
cmp r2, r3
blo fixloop
#endif
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

clear_bss:
#ifndef CONFIG_PRELOADER
Expand Down Expand Up @@ -295,9 +293,7 @@ jump_2_ram:
ldr r0, _board_init_r_ofs
adr r1, _start
add lr, r0, r1
#ifndef CONFIG_SKIP_RELOCATE_UBOOT
add lr, lr, r9
#endif
/* setup parameters for board_init_r */
mov r0, r5 /* gd_t */
mov r1, r7 /* dest_addr */
Expand Down
4 changes: 0 additions & 4 deletions arch/arm/cpu/arm1176/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ stack_setup:
cmp r0, r6
beq clear_bss

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
copy_loop:
ldmia r0!, {r9-r10} /* copy from source address [r0] */
stmia r6!, {r9-r10} /* copy to target address [r1] */
Expand Down Expand Up @@ -328,7 +327,6 @@ fixnext:
cmp r2, r3
blo fixloop
#endif
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

#ifdef CONFIG_ENABLE_MMU
enable_mmu:
Expand Down Expand Up @@ -399,9 +397,7 @@ _nand_boot: .word nand_boot
ldr r0, _board_init_r_ofs
adr r1, _start
add lr, r0, r1
#ifndef CONFIG_SKIP_RELOCATE_UBOOT
add lr, lr, r9
#endif
/* setup parameters for board_init_r */
mov r0, r5 /* gd_t */
mov r1, r7 /* dest_addr */
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/cpu/arm720t/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ stack_setup:
cmp r0, r6
beq clear_bss

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
copy_loop:
ldmia r0!, {r9-r10} /* copy from source address [r0] */
stmia r6!, {r9-r10} /* copy to target address [r1] */
Expand All @@ -217,7 +216,6 @@ fixloop:
cmp r2, r3
blo fixloop
#endif
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

clear_bss:
#ifndef CONFIG_PRELOADER
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/cpu/arm920t/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ stack_setup:
cmp r0, r6
beq clear_bss

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
copy_loop:
ldmia r0!, {r9-r10} /* copy from source address [r0] */
stmia r6!, {r9-r10} /* copy to target address [r1] */
Expand All @@ -263,7 +262,6 @@ fixloop:
cmp r2, r3
blo fixloop
#endif
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

clear_bss:
#ifndef CONFIG_PRELOADER
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/cpu/arm925t/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ stack_setup:
cmp r0, r6
beq clear_bss

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
copy_loop:
ldmia r0!, {r9-r10} /* copy from source address [r0] */
stmia r6!, {r9-r10} /* copy to target address [r1] */
Expand All @@ -254,7 +253,6 @@ fixloop:
cmp r2, r3
blo fixloop
#endif
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

clear_bss:
#ifndef CONFIG_PRELOADER
Expand Down
4 changes: 0 additions & 4 deletions arch/arm/cpu/arm926ejs/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ stack_setup:
cmp r0, r6
beq clear_bss

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
copy_loop:
ldmia r0!, {r9-r10} /* copy from source address [r0] */
stmia r6!, {r9-r10} /* copy to target address [r1] */
Expand Down Expand Up @@ -251,7 +250,6 @@ fixnext:
cmp r2, r3
blo fixloop
#endif
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

clear_bss:
#ifndef CONFIG_PRELOADER
Expand Down Expand Up @@ -286,9 +284,7 @@ _nand_boot_ofs:
ldr r0, _board_init_r_ofs
adr r1, _start
add lr, r0, r1
#ifndef CONFIG_SKIP_RELOCATE_UBOOT
add lr, lr, r9
#endif
/* setup parameters for board_init_r */
mov r0, r5 /* gd_t */
mov r1, r7 /* dest_addr */
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/cpu/arm946es/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ stack_setup:
cmp r0, r6
beq clear_bss

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
copy_loop:
ldmia r0!, {r9-r10} /* copy from source address [r0] */
stmia r6!, {r9-r10} /* copy to target address [r1] */
Expand All @@ -223,7 +222,6 @@ fixloop:
cmp r2, r3
blo fixloop
#endif
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

clear_bss:
#ifndef CONFIG_PRELOADER
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/cpu/arm_intcm/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ stack_setup:
cmp r0, r6
beq clear_bss

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
copy_loop:
ldmia r0!, {r9-r10} /* copy from source address [r0] */
stmia r6!, {r9-r10} /* copy to target address [r1] */
Expand All @@ -221,7 +220,6 @@ fixloop:
cmp r2, r3
blo fixloop
#endif
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

clear_bss:
#ifndef CONFIG_PRELOADER
Expand Down
4 changes: 0 additions & 4 deletions arch/arm/cpu/armv7/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ relocate_code:
stack_setup:
mov sp, r4

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
adr r0, _start
ldr r2, _TEXT_BASE
ldr r3, _bss_start_ofs
Expand Down Expand Up @@ -259,7 +258,6 @@ clbss_l:str r2, [r0] /* clear loop... */
cmp r0, r1
bne clbss_l
#endif /* #ifndef CONFIG_PRELOADER */
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

/*
* We are done. Do not return, instead branch to second part of board
Expand All @@ -269,9 +267,7 @@ jump_2_ram:
ldr r0, _board_init_r_ofs
adr r1, _start
add lr, r0, r1
#ifndef CONFIG_SKIP_RELOCATE_UBOOT
add lr, lr, r9
#endif
/* setup parameters for board_init_r */
mov r0, r5 /* gd_t */
mov r1, r7 /* dest_addr */
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/cpu/ixp/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ stack_setup:
cmp r0, r6
beq clear_bss

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
copy_loop:
ldmia r0!, {r9-r10} /* copy from source address [r0] */
stmia r6!, {r9-r10} /* copy to target address [r1] */
Expand All @@ -347,7 +346,6 @@ fixloop:
cmp r2, r3
blo fixloop
#endif
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

clear_bss:
#ifndef CONFIG_PRELOADER
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/cpu/lh7a40x/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ stack_setup:
cmp r0, r6
beq clear_bss

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
copy_loop:
ldmia r0!, {r9-r10} /* copy from source address [r0] */
stmia r6!, {r9-r10} /* copy to target address [r1] */
Expand All @@ -234,7 +233,6 @@ fixloop:
cmp r2, r3
blo fixloop
#endif
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

clear_bss:
#ifndef CONFIG_PRELOADER
Expand Down
4 changes: 0 additions & 4 deletions arch/arm/cpu/pxa/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ stack_setup:
cmp r0, r6
beq clear_bss

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
stmfd sp!, {r0-r12}
copy_loop:
ldmia r0!, {r3-r5, r7-r11} /* copy from source address [r0] */
Expand Down Expand Up @@ -300,7 +299,6 @@ fixnext:
cmp r2, r3
blo fixloop
#endif /* #ifndef CONFIG_PRELOADER */
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

clear_bss:
#ifndef CONFIG_PRELOADER
Expand Down Expand Up @@ -332,9 +330,7 @@ _start_oneboot_ofs
ldr r0, _board_init_r_ofs
adr r1, _start
add lr, r0, r1
#ifndef CONFIG_SKIP_RELOCATE_UBOOT
add lr, lr, r9
#endif
/* setup parameters for board_init_r */
mov r0, r5 /* gd_t */
mov r1, r7 /* dest_addr */
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/cpu/s3c44b0/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ stack_setup:
cmp r0, r6
beq clear_bss

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
copy_loop:
ldmia r0!, {r9-r10} /* copy from source address [r0] */
stmia r6!, {r9-r10} /* copy to target address [r1] */
Expand Down Expand Up @@ -218,7 +217,6 @@ vector_copy_loop:
stmia r1!, {r3-r10}
cmp r0, r2
blo vector_copy_loop
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

clear_bss:
#ifndef CONFIG_PRELOADER
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/cpu/sa1100/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ stack_setup:
cmp r0, r6
beq clear_bss

#ifndef CONFIG_SKIP_RELOCATE_UBOOT
copy_loop:
ldmia r0!, {r9-r10} /* copy from source address [r0] */
stmia r6!, {r9-r10} /* copy to target address [r1] */
Expand All @@ -210,7 +209,6 @@ fixloop:
cmp r2, r3
blo fixloop
#endif
#endif /* #ifndef CONFIG_SKIP_RELOCATE_UBOOT */

clear_bss:
#ifndef CONFIG_PRELOADER
Expand Down
1 change: 0 additions & 1 deletion include/configs/SMN42.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
* so we MUST NOT initialize critical regs like mem-timing ...
*/
#undef CONFIG_SKIP_LOWLEVEL_INIT
#undef CONFIG_SKIP_RELOCATE_UBOOT

/*
* High Level Configuration Options
Expand Down
1 change: 0 additions & 1 deletion include/configs/afeb9260.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#define CONFIG_INITRD_TAG 1

#define CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_SKIP_RELOCATE_UBOOT

/*
* Hardware drivers
Expand Down
1 change: 0 additions & 1 deletion include/configs/at91cap9adk.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#define CONFIG_INITRD_TAG 1

#define CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_SKIP_RELOCATE_UBOOT

/*
* Hardware drivers
Expand Down
2 changes: 0 additions & 2 deletions include/configs/at91rm9200dk.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@
#define CONFIG_SYS_SDRC_MR_VAL2 0x00000003 /* Load Mode Register */
#define CONFIG_SYS_SDRC_MR_VAL3 0x00000000 /* Normal Mode */
#define CONFIG_SYS_SDRC_TR_VAL 0x000002E0 /* Write refresh rate */
#else
#define CONFIG_SKIP_RELOCATE_UBOOT
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
/*
* Size of malloc() pool
Expand Down
1 change: 0 additions & 1 deletion include/configs/at91sam9260ek.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#define CONFIG_INITRD_TAG 1

#define CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_SKIP_RELOCATE_UBOOT

/*
* Hardware drivers
Expand Down
1 change: 0 additions & 1 deletion include/configs/at91sam9261ek.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#define CONFIG_INITRD_TAG 1

#define CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_SKIP_RELOCATE_UBOOT

/*
* Hardware drivers
Expand Down
1 change: 0 additions & 1 deletion include/configs/at91sam9263ek.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@

#ifndef CONFIG_SYS_USE_BOOT_NORFLASH
#define CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_SKIP_RELOCATE_UBOOT
#endif

/*
Expand Down
1 change: 0 additions & 1 deletion include/configs/at91sam9m10g45ek.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#define CONFIG_INITRD_TAG 1

#define CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_SKIP_RELOCATE_UBOOT

/*
* Hardware drivers
Expand Down
1 change: 0 additions & 1 deletion include/configs/at91sam9rlek.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#define CONFIG_INITRD_TAG 1

#define CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_SKIP_RELOCATE_UBOOT

/*
* Hardware drivers
Expand Down
2 changes: 0 additions & 2 deletions include/configs/cmc_pu2.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@
#define CONFIG_SYS_SDRC_MR_VAL2 0x00000003 /* Load Mode Register */
#define CONFIG_SYS_SDRC_MR_VAL3 0x00000000 /* Normal Mode */
#define CONFIG_SYS_SDRC_TR_VAL 0x000002E0 /* Write refresh rate */
#else
#define CONFIG_SKIP_RELOCATE_UBOOT
#endif /* CONFIG_SKIP_LOWLEVEL_INIT */

/*
Expand Down
1 change: 0 additions & 1 deletion include/configs/colibri_pxa270.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#define CONFIG_VPAC270 1 /* Toradex Colibri PXA270 board */

#undef BOARD_LATE_INIT
#undef CONFIG_SKIP_RELOCATE_UBOOT
#undef CONFIG_USE_IRQ
#undef CONFIG_SKIP_LOWLEVEL_INIT

Expand Down
Loading

0 comments on commit e03f316

Please sign in to comment.