diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-05 18:01:28 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-07-05 18:01:28 +0200 |
commit | a8421600d1d1a03a322e45b00db318dbf80fa03f (patch) | |
tree | 2505edb543d29d6a2442928624773e80a0b542df /common | |
parent | a21d0bc4c26e1af4e75c09aa293739a339a400b5 (diff) | |
download | barebox-a8421600d1d1a03a322e45b00db318dbf80fa03f.tar.gz barebox-a8421600d1d1a03a322e45b00db318dbf80fa03f.tar.xz |
svn_rev_152
remove global data gd_t and board info bd_t entirely for arm
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_bootm.c | 9 | ||||
-rw-r--r-- | common/dlmalloc.c | 5 | ||||
-rw-r--r-- | common/exports.c | 18 | ||||
-rw-r--r-- | common/hush.c | 10 | ||||
-rw-r--r-- | common/main.c | 4 |
5 files changed, 38 insertions, 8 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 5be86ed99a..c2615660cf 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -1024,7 +1024,11 @@ do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag, * r5: console device * r6: boot args string */ +#if 0 (*loader) (gd->bd, img_addr, consdev, cmdline); +#else +#warning NetBSD Support is broken +#endif } #if defined(CONFIG_ARTOS) && defined(CONFIG_PPC) @@ -1484,8 +1488,11 @@ do_bootm_rtems (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], * RTEMS Parameters: * r3: ptr to board info data */ - +#if 0 (*entry_point ) ( gd->bd ); +#else +#warning RTEMS support is broken +#endif } #if (CONFIG_COMMANDS & CFG_CMD_ELF) diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 01aca94226..7c5375a5f0 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -549,13 +549,16 @@ static mbinptr av_[NAV * 2 + 2] = { void malloc_bin_reloc (void) { +#ifdef CONFIG_ARM + return; +#else unsigned long *p = (unsigned long *)(&av_[2]); int i; for (i=2; i<(sizeof(av_)/sizeof(mbinptr)); ++i) { *p++ += gd->reloc_off; } +#endif } - /* field-extraction macros */ diff --git a/common/exports.c b/common/exports.c index 70b9c7fe1d..83d2a8ae76 100644 --- a/common/exports.c +++ b/common/exports.c @@ -1,8 +1,11 @@ #include <common.h> +#include <driver.h> +#include <init.h> #include <exports.h> DECLARE_GLOBAL_DATA_PTR; +#if 0 static void dummy(void) { } @@ -12,7 +15,13 @@ unsigned long get_version(void) return XF_VERSION; } -void jumptable_init (void) +/* + * FIXME: instead of using the global data struct for standalone + * programs, just use a register to pass the jumptable. + * For now, this is broken. + */ + +int jumptable_init (void) { int i; @@ -36,4 +45,11 @@ void jumptable_init (void) gd->jt[XF_i2c_write] = (void *) i2c_write; gd->jt[XF_i2c_read] = (void *) i2c_read; #endif /* CFG_CMD_I2C */ + + return 0; } + +late_initcall(jumptable_init); + +#endif + diff --git a/common/hush.c b/common/hush.c index f81fdcf0b4..f7550b9cdf 100644 --- a/common/hush.c +++ b/common/hush.c @@ -3228,9 +3228,17 @@ static void u_boot_hush_reloc(void) { unsigned long addr; struct reserved_combo *r; + unsigned long reloc_off; + +#if 0 + reloc_off = gd->reloc_off; +#else + reloc_off = 0; +#warning FIXME: This is broken on !ARM +#endif for (r=reserved_list; r<reserved_list+NRES; r++) { - addr = (ulong) (r->literal) + gd->reloc_off; + addr = (ulong) (r->literal) + reloc_off; r->literal = (char *)addr; } } diff --git a/common/main.c b/common/main.c index 4c438b766d..c569d1df73 100644 --- a/common/main.c +++ b/common/main.c @@ -40,10 +40,6 @@ #include <post.h> -#ifdef CONFIG_SILENT_CONSOLE -DECLARE_GLOBAL_DATA_PTR; -#endif - #if defined(CONFIG_BOOT_RETRY_TIME) && defined(CONFIG_RESET_TO_RETRY) extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); /* for do_reset() prototype */ #endif |