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>
diff --git a/arch/arm/include/asm/config.h b/arch/arm/include/asm/config.h
index 4124f0a..c60dba2 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 af9a414..33b3694 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -679,15 +679,6 @@
 #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 @@
 
 	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 049c44e..02fbfb3 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 96ccc7f..8b56237 100644
--- a/arch/avr32/lib/board.c
+++ b/arch/avr32/lib/board.c
@@ -272,13 +272,13 @@
 
 	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 34ca68c..388434f 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 1952de7..049c44e 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 ec2cc16..51050a3 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 976d5bf..9a51908 100644
--- a/arch/m68k/lib/board.c
+++ b/arch/m68k/lib/board.c
@@ -420,13 +420,13 @@
 
 	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 8a9064b..049c44e 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 049c44e..02fbfb3 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 4a22f7b..f317124 100644
--- a/arch/mips/lib/board.c
+++ b/arch/mips/lib/board.c
@@ -295,13 +295,13 @@
 
 	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 011d603..049c44e 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 a1942ca..76dedeb 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 978cc92..049c44e 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 6ddc349..7b6f30b 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 4a6041f..ab31cfb 100644
--- a/arch/sparc/lib/board.c
+++ b/arch/sparc/lib/board.c
@@ -252,13 +252,13 @@
 	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");