summaryrefslogtreecommitdiff
path: root/common
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 /common
parent908614f20f7f0f5df736eed21b88e81ebbf14e86 (diff)
downloadu-boot-imx-2e5167ccad93ca9cfa6a2acfab5e4785418e477e.zip
u-boot-imx-2e5167ccad93ca9cfa6a2acfab5e4785418e477e.tar.gz
u-boot-imx-2e5167ccad93ca9cfa6a2acfab5e4785418e477e.tar.bz2
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>
Diffstat (limited to 'common')
-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
13 files changed, 20 insertions, 20 deletions
diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
index 6fa8a15..f2a48f7 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 ce3c77c..1a024f1 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 50b4240..8dbf16d 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 0a0cfce..c272b0d 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 3d30c32..3fd8abc 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 5550b40..33108f1 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 d47d719..0020eac 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 fce7a76..4871f4b 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 5acda4d..a276efc 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 4dd9513..2188fd4 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 89c10b8..42f5b79 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 c3323ea..051ae4e 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 2501369..ab7c5ab 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));