summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-10-28 20:00:11 +0200
committerWolfgang Denk <wd@denx.de>2010-10-29 21:32:07 +0200
commit2e5167ccad93ca9cfa6a2acfab5e4785418e477e (patch)
tree6351c567c3389ba662870eac1c74919e2d904633
parent908614f20f7f0f5df736eed21b88e81ebbf14e86 (diff)
downloadu-boot-odroid-c1-2e5167ccad93ca9cfa6a2acfab5e4785418e477e.tar.gz
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC
By now, the majority of architectures have working relocation support, so the few remaining architectures have become exceptions. To make this more obvious, we make working relocation now the default case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC. Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
-rw-r--r--arch/arm/include/asm/config.h3
-rw-r--r--arch/arm/lib/board.c32
-rw-r--r--arch/avr32/include/asm/config.h2
-rw-r--r--arch/avr32/lib/board.c4
-rw-r--r--arch/blackfin/include/asm/config.h3
-rw-r--r--arch/i386/include/asm/config.h2
-rw-r--r--arch/m68k/include/asm/config.h2
-rw-r--r--arch/m68k/lib/board.c4
-rw-r--r--arch/microblaze/include/asm/config.h3
-rw-r--r--arch/mips/include/asm/config.h2
-rw-r--r--arch/mips/lib/board.c4
-rw-r--r--arch/nios2/include/asm/config.h3
-rw-r--r--arch/powerpc/include/asm/config.h3
-rw-r--r--arch/sh/include/asm/config.h3
-rw-r--r--arch/sparc/include/asm/config.h2
-rw-r--r--arch/sparc/lib/board.c4
-rw-r--r--common/cmd_bmp.c2
-rw-r--r--common/cmd_bootm.c2
-rw-r--r--common/cmd_date.c6
-rw-r--r--common/cmd_i2c.c2
-rw-r--r--common/cmd_nvedit.c2
-rw-r--r--common/cmd_onenand.c2
-rw-r--r--common/command.c2
-rw-r--r--common/dlmalloc.c2
-rw-r--r--common/env_common.c2
-rw-r--r--common/hush.c4
-rw-r--r--common/image.c8
-rw-r--r--common/serial.c2
-rw-r--r--common/stdio.c4
-rw-r--r--disk/part.c4
-rw-r--r--doc/README.arm-relocation5
-rw-r--r--drivers/mtd/nand/nand.c2
-rw-r--r--drivers/net/phy/miiphybb.c2
-rw-r--r--fs/ubifs/ubifs.c2
-rw-r--r--include/command.h2
-rw-r--r--include/post.h2
-rw-r--r--post/post.c2
37 files changed, 46 insertions, 91 deletions
diff --git a/arch/arm/include/asm/config.h b/arch/arm/include/asm/config.h
index 4124f0a992..c60dba26bf 100644
--- a/arch/arm/include/asm/config.h
+++ b/arch/arm/include/asm/config.h
@@ -21,9 +21,6 @@
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
-/* Relocation to SDRAM works on all ARM boards */
-#define CONFIG_RELOC_FIXUP_WORKS
-
#define CONFIG_LMB
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
#endif
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index af9a414b88..33b369496a 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -679,15 +679,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
#if !defined(CONFIG_SYS_NO_FLASH)
ulong flash_size;
#endif
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
- extern void malloc_bin_reloc (void);
-#if defined(CONFIG_CMD_BMP)
- extern void bmp_reloc(void);
-#endif
-#if defined(CONFIG_CMD_I2C)
- extern void i2c_reloc(void);
-#endif
-#endif
gd = id;
bd = gd->bd;
@@ -704,39 +695,16 @@ void board_init_r (gd_t *id, ulong dest_addr)
debug ("Now running in RAM - U-Boot at: %08lx\n", dest_addr);
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
- /*
- * We have to relocate the command table manually
- */
- fixup_cmdtable(&__u_boot_cmd_start,
- (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
-#if defined(CONFIG_CMD_BMP)
- bmp_reloc();
-#endif
-#if defined(CONFIG_CMD_I2C)
- i2c_reloc();
-#endif
-#if defined(CONFIG_CMD_ONENAND)
- onenand_reloc();
-#endif
-#endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
-
#ifdef CONFIG_LOGBUFFER
logbuff_init_ptrs ();
#endif
#ifdef CONFIG_POST
post_output_backlog ();
-#ifndef CONFIG_RELOC_FIXUP_WORKS
- post_reloc ();
-#endif
#endif
/* The Malloc area is immediately below the monitor copy in DRAM */
malloc_start = dest_addr - TOTAL_MALLOC_LEN;
mem_malloc_init (malloc_start, TOTAL_MALLOC_LEN);
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
- malloc_bin_reloc ();
-#endif
#if !defined(CONFIG_SYS_NO_FLASH)
puts ("FLASH: ");
diff --git a/arch/avr32/include/asm/config.h b/arch/avr32/include/asm/config.h
index 049c44eaf8..02fbfb3abf 100644
--- a/arch/avr32/include/asm/config.h
+++ b/arch/avr32/include/asm/config.h
@@ -21,4 +21,6 @@
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
+#define CONFIG_NEEDS_MANUAL_RELOC
+
#endif
diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c
index 96ccc7fa79..8b56237f18 100644
--- a/arch/avr32/lib/board.c
+++ b/arch/avr32/lib/board.c
@@ -272,13 +272,13 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
monitor_flash_len = _edata - _text;
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
/*
* We have to relocate the command table manually
*/
fixup_cmdtable(&__u_boot_cmd_start,
(ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
-#endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
+#endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
/* there are some other pointer constants we must deal with */
#ifndef CONFIG_ENV_IS_NOWHERE
diff --git a/arch/blackfin/include/asm/config.h b/arch/blackfin/include/asm/config.h
index 34ca68c9d5..388434fea2 100644
--- a/arch/blackfin/include/asm/config.h
+++ b/arch/blackfin/include/asm/config.h
@@ -13,9 +13,6 @@
# define CONFIG_BFIN_SCRATCH_REG retn
#endif
-/* Relocation to SDRAM works on all Blackfin boards */
-#define CONFIG_RELOC_FIXUP_WORKS
-
/* Make sure the structure is properly aligned */
#if ((CONFIG_SYS_GBL_DATA_ADDR & -4) != CONFIG_SYS_GBL_DATA_ADDR)
# error CONFIG_SYS_GBL_DATA_ADDR: must be 4 byte aligned
diff --git a/arch/i386/include/asm/config.h b/arch/i386/include/asm/config.h
index 1952de79f8..049c44eaf8 100644
--- a/arch/i386/include/asm/config.h
+++ b/arch/i386/include/asm/config.h
@@ -21,6 +21,4 @@
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
-#define CONFIG_RELOC_FIXUP_WORKS
-
#endif
diff --git a/arch/m68k/include/asm/config.h b/arch/m68k/include/asm/config.h
index ec2cc16beb..51050a39a3 100644
--- a/arch/m68k/include/asm/config.h
+++ b/arch/m68k/include/asm/config.h
@@ -21,6 +21,8 @@
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
+#define CONFIG_NEEDS_MANUAL_RELOC
+
#define CONFIG_LMB
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
#define CONFIG_SYS_BOOT_GET_CMDLINE
diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c
index 976d5bf28a..9a51908858 100644
--- a/arch/m68k/lib/board.c
+++ b/arch/m68k/lib/board.c
@@ -420,13 +420,13 @@ void board_init_r (gd_t *id, ulong dest_addr)
monitor_flash_len = (ulong)&__init_end - dest_addr;
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
/*
* We have to relocate the command table manually
*/
fixup_cmdtable(&__u_boot_cmd_start,
(ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
-#endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
+#endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
/* there are some other pointer constants we must deal with */
#ifndef CONFIG_ENV_IS_NOWHERE
diff --git a/arch/microblaze/include/asm/config.h b/arch/microblaze/include/asm/config.h
index 8a9064b3c8..049c44eaf8 100644
--- a/arch/microblaze/include/asm/config.h
+++ b/arch/microblaze/include/asm/config.h
@@ -21,7 +21,4 @@
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
-/* Relocation to SDRAM works on all Microblaze boards */
-#define CONFIG_RELOC_FIXUP_WORKS
-
#endif
diff --git a/arch/mips/include/asm/config.h b/arch/mips/include/asm/config.h
index 049c44eaf8..02fbfb3abf 100644
--- a/arch/mips/include/asm/config.h
+++ b/arch/mips/include/asm/config.h
@@ -21,4 +21,6 @@
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
+#define CONFIG_NEEDS_MANUAL_RELOC
+
#endif
diff --git a/arch/mips/lib/board.c b/arch/mips/lib/board.c
index 4a22f7b41c..f317124155 100644
--- a/arch/mips/lib/board.c
+++ b/arch/mips/lib/board.c
@@ -295,13 +295,13 @@ void board_init_r (gd_t *id, ulong dest_addr)
monitor_flash_len = (ulong)&uboot_end_data - dest_addr;
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
/*
* We have to relocate the command table manually
*/
fixup_cmdtable(&__u_boot_cmd_start,
(ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
-#endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
+#endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
/* there are some other pointer constants we must deal with */
#ifndef CONFIG_ENV_IS_NOWHERE
diff --git a/arch/nios2/include/asm/config.h b/arch/nios2/include/asm/config.h
index 011d603a4b..049c44eaf8 100644
--- a/arch/nios2/include/asm/config.h
+++ b/arch/nios2/include/asm/config.h
@@ -21,7 +21,4 @@
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
-/* Relocation to SDRAM works on all NIOS2 boards */
-#define CONFIG_RELOC_FIXUP_WORKS
-
#endif
diff --git a/arch/powerpc/include/asm/config.h b/arch/powerpc/include/asm/config.h
index a1942ca2bd..76dedebe67 100644
--- a/arch/powerpc/include/asm/config.h
+++ b/arch/powerpc/include/asm/config.h
@@ -89,9 +89,6 @@
#define CONFIG_SYS_NUM_TLBCAMS 16
#endif
-/* Relocation to SDRAM works on all PPC boards */
-#define CONFIG_RELOC_FIXUP_WORKS
-
/* Since so many PPC SOCs have a semi-common LBC, define this here */
#if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) || \
defined(CONFIG_MPC83xx)
diff --git a/arch/sh/include/asm/config.h b/arch/sh/include/asm/config.h
index 978cc92f40..049c44eaf8 100644
--- a/arch/sh/include/asm/config.h
+++ b/arch/sh/include/asm/config.h
@@ -21,7 +21,4 @@
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
-/* Relocation to SDRAM works on all sh boards */
-#define CONFIG_RELOC_FIXUP_WORKS
-
#endif
diff --git a/arch/sparc/include/asm/config.h b/arch/sparc/include/asm/config.h
index 6ddc3494c6..7b6f30bd4a 100644
--- a/arch/sparc/include/asm/config.h
+++ b/arch/sparc/include/asm/config.h
@@ -21,6 +21,8 @@
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
+#define CONFIG_NEEDS_MANUAL_RELOC
+
#define CONFIG_LMB
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
diff --git a/arch/sparc/lib/board.c b/arch/sparc/lib/board.c
index 4a6041f51c..ab31cfb50a 100644
--- a/arch/sparc/lib/board.c
+++ b/arch/sparc/lib/board.c
@@ -252,13 +252,13 @@ void board_init_f(ulong bootflag)
post_run(NULL, POST_ROM | post_bootmode_get(0));
#endif
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
/*
* We have to relocate the command table manually
*/
fixup_cmdtable(&__u_boot_cmd_start,
(ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
-#endif /* !defined(CONFIG_RELOC_FIXUP_WORKS) */
+#endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
#if defined(CONFIG_CMD_AMBAPP) && defined(CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP)
puts("AMBA:\n");
diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
index 6fa8a15023..f2a48f751c 100644
--- a/common/cmd_bmp.c
+++ b/common/cmd_bmp.c
@@ -137,7 +137,7 @@ static cmd_tbl_t cmd_bmp_sub[] = {
U_BOOT_CMD_MKENT(display, 5, 0, do_bmp_display, "", ""),
};
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
void bmp_reloc(void) {
fixup_cmdtable(cmd_bmp_sub, ARRAY_SIZE(cmd_bmp_sub));
}
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index ce3c77c615..1a024f168f 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -590,7 +590,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
ulong load_end = 0;
int ret;
boot_os_fn *boot_fn;
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
static int relocated = 0;
/* relocate boot function table */
diff --git a/common/cmd_date.c b/common/cmd_date.c
index 50b4240267..8dbf16d32a 100644
--- a/common/cmd_date.c
+++ b/common/cmd_date.c
@@ -35,10 +35,10 @@ const char *weekdays[] = {
"Sun", "Mon", "Tues", "Wednes", "Thurs", "Fri", "Satur",
};
-#ifdef CONFIG_RELOC_FIXUP_WORKS
-#define RELOC(a) a
-#else
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
#define RELOC(a) ((typeof(a))((unsigned long)(a) + gd->reloc_off))
+#else
+#define RELOC(a) a
#endif
int mk_date (char *, struct rtc_time *);
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 0a0cfceb45..c272b0dd4f 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -1284,7 +1284,7 @@ static cmd_tbl_t cmd_i2c_sub[] = {
U_BOOT_CMD_MKENT(speed, 1, 1, do_i2c_bus_speed, "", ""),
};
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
void i2c_reloc(void) {
fixup_cmdtable(cmd_i2c_sub, ARRAY_SIZE(cmd_i2c_sub));
}
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 3d30c321d5..3fd8abc157 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -837,7 +837,7 @@ static cmd_tbl_t cmd_env_sub[] = {
U_BOOT_CMD_MKENT(set, CONFIG_SYS_MAXARGS, 0, do_env_set, "", ""),
};
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
void env_reloc(void)
{
fixup_cmdtable(cmd_env_sub, ARRAY_SIZE(cmd_env_sub));
diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c
index 5550b40b81..33108f1b34 100644
--- a/common/cmd_onenand.c
+++ b/common/cmd_onenand.c
@@ -525,7 +525,7 @@ static cmd_tbl_t cmd_onenand_sub[] = {
U_BOOT_CMD_MKENT(markbad, CONFIG_SYS_MAXARGS, 0, do_onenand_markbad, "", ""),
};
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
void onenand_reloc(void) {
fixup_cmdtable(cmd_onenand_sub, ARRAY_SIZE(cmd_onenand_sub));
}
diff --git a/common/command.c b/common/command.c
index d47d719779..0020eacf5c 100644
--- a/common/command.c
+++ b/common/command.c
@@ -466,7 +466,7 @@ int cmd_get_data_size(char* arg, int default_size)
}
#endif
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
DECLARE_GLOBAL_DATA_PTR;
void fixup_cmdtable(cmd_tbl_t *cmdtp, int size)
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index fce7a762b1..4871f4b099 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1491,7 +1491,7 @@ static mbinptr av_[NAV * 2 + 2] = {
IAV(120), IAV(121), IAV(122), IAV(123), IAV(124), IAV(125), IAV(126), IAV(127)
};
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
void malloc_bin_reloc (void)
{
unsigned long *p = (unsigned long *)(&av_[2]);
diff --git a/common/env_common.c b/common/env_common.c
index 5acda4d49e..a276efc634 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -227,7 +227,7 @@ int env_import(const char *buf, int check)
void env_relocate (void)
{
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
extern void env_reloc(void);
env_reloc();
diff --git a/common/hush.c b/common/hush.c
index 4dd9513b03..2188fd4ac8 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -3268,7 +3268,7 @@ int parse_file_outer(void)
}
#ifdef __U_BOOT__
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
static void u_boot_hush_reloc(void)
{
unsigned long addr;
@@ -3290,7 +3290,7 @@ int u_boot_hush_start(void)
top_vars->next = 0;
top_vars->flg_export = 0;
top_vars->flg_read_only = 1;
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
u_boot_hush_reloc();
#endif
}
diff --git a/common/image.c b/common/image.c
index 89c10b8596..42f5b79cf2 100644
--- a/common/image.c
+++ b/common/image.c
@@ -520,7 +520,7 @@ char *get_table_entry_name (table_entry_t *table, char *msg, int id)
{
for (; table->id >= 0; ++table) {
if (table->id == id)
-#if defined(USE_HOSTCC) || defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(USE_HOSTCC) || !defined(CONFIG_NEEDS_MANUAL_RELOC)
return table->lname;
#else
return table->lname + gd->reloc_off;
@@ -585,10 +585,10 @@ int get_table_entry_id (table_entry_t *table,
fprintf (stderr, "\n");
#else
for (t = table; t->id >= 0; ++t) {
-#ifdef CONFIG_RELOC_FIXUP_WORKS
- if (t->sname && strcmp(t->sname, name) == 0)
-#else
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
if (t->sname && strcmp(t->sname + gd->reloc_off, name) == 0)
+#else
+ if (t->sname && strcmp(t->sname, name) == 0)
#endif
return (t->id);
}
diff --git a/common/serial.c b/common/serial.c
index c3323ea51a..051ae4e1d2 100644
--- a/common/serial.c
+++ b/common/serial.c
@@ -99,7 +99,7 @@ struct serial_device *default_serial_console(void) __attribute__((weak, alias("_
int serial_register (struct serial_device *dev)
{
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
dev->init += gd->reloc_off;
dev->setbrg += gd->reloc_off;
dev->getc += gd->reloc_off;
diff --git a/common/stdio.c b/common/stdio.c
index 25013693f7..ab7c5abde1 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -193,7 +193,7 @@ int stdio_deregister(char *devname)
int stdio_init (void)
{
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
/* already relocated for current ARM implementation */
ulong relocation_offset = gd->reloc_off;
int i;
@@ -203,7 +203,7 @@ int stdio_init (void)
stdio_names[i] = (char *) (((ulong) stdio_names[i]) +
relocation_offset);
}
-#endif /* !CONFIG_RELOC_FIXUP_WORKS */
+#endif /* CONFIG_NEEDS_MANUAL_RELOC */
/* Initialize the list */
INIT_LIST_HEAD(&(devs.list));
diff --git a/disk/part.c b/disk/part.c
index 2b63db6c75..13723f23b3 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -81,13 +81,13 @@ block_dev_desc_t *get_dev(char* ifname, int dev)
char *name;
name = drvr->name;
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
name += gd->reloc_off;
#endif
while (name) {
name = drvr->name;
reloc_get_dev = drvr->get_dev;
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
name += gd->reloc_off;
reloc_get_dev += gd->reloc_off;
#endif
diff --git a/doc/README.arm-relocation b/doc/README.arm-relocation
index dc7be7e42e..2f91d0ac43 100644
--- a/doc/README.arm-relocation
+++ b/doc/README.arm-relocation
@@ -36,15 +36,14 @@ At lib level:
At config level:
- Define CONFIG_RELOC_FIXUP_WORKS.
Undefine CONFIG_SYS_ARM_WITHOUT_RELOC
* WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING *
Boards which are not fixed to support relocation will be REMOVED!
-Eventually, CONFIG_SYS_ARM_WITHOUT_RELOC and CONFIG_RELOC_FIXUP_WORKS will
-disappear and boards which have to migrated to relocation will disappear too.
+Eventually, CONFIG_SYS_ARM_WITHOUT_RELOC will disappear and boards
+which have to migrated to relocation will disappear too.
-----------------------------------------------------------------------------
diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c
index 47d6872fd0..c0e068ab7d 100644
--- a/drivers/mtd/nand/nand.c
+++ b/drivers/mtd/nand/nand.c
@@ -54,7 +54,7 @@ static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand,
if (nand_scan(mtd, maxchips) == 0) {
if (!mtd->name)
mtd->name = (char *)default_nand_name;
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
else
mtd->name += gd->reloc_off;
#endif
diff --git a/drivers/net/phy/miiphybb.c b/drivers/net/phy/miiphybb.c
index 1045cf1ba9..49a1f5fb49 100644
--- a/drivers/net/phy/miiphybb.c
+++ b/drivers/net/phy/miiphybb.c
@@ -127,7 +127,7 @@ void bb_miiphy_init(void)
int i;
for (i = 0; i < bb_miiphy_buses_num; i++) {
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
/* Relocate the hook pointers*/
BB_MII_RELOCATE(bb_miiphy_buses[i].init, gd->reloc_off);
BB_MII_RELOCATE(bb_miiphy_buses[i].mdio_active, gd->reloc_off);
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index 3fc79909ea..1cc31a968d 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -121,7 +121,7 @@ static int __init compr_init(struct ubifs_compressor *compr)
{
ubifs_compressors[compr->compr_type] = compr;
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
ubifs_compressors[compr->compr_type]->name += gd->reloc_off;
ubifs_compressors[compr->compr_type]->capi_name += gd->reloc_off;
ubifs_compressors[compr->compr_type]->decompress += gd->reloc_off;
diff --git a/include/command.h b/include/command.h
index 5c14616233..46a9ec4c4c 100644
--- a/include/command.h
+++ b/include/command.h
@@ -125,7 +125,7 @@ cmd_tbl_t __u_boot_cmd_##name Struct_Section = {#name, maxargs, rep, cmd, usage}
#endif /* CONFIG_SYS_LONGHELP */
-#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if defined(CONFIG_NEEDS_MANUAL_RELOC)
void fixup_cmdtable(cmd_tbl_t *cmdtp, int size);
#endif
#endif /* __COMMAND_H */
diff --git a/include/post.h b/include/post.h
index abe47da53b..957ce3b161 100644
--- a/include/post.h
+++ b/include/post.h
@@ -137,7 +137,7 @@ void post_output_backlog ( void );
int post_run (char *name, int flags);
int post_info (char *name);
int post_log (char *format, ...);
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
void post_reloc (void);
#endif
unsigned long post_time_ms (unsigned long base);
diff --git a/post/post.c b/post/post.c
index 8a9fd0d2ec..1b7f2aa075 100644
--- a/post/post.c
+++ b/post/post.c
@@ -422,7 +422,7 @@ int post_log (char *format, ...)
return 0;
}
-#ifndef CONFIG_RELOC_FIXUP_WORKS
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
void post_reloc (void)
{
unsigned int i;