summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:01:28 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:01:28 +0200
commita8421600d1d1a03a322e45b00db318dbf80fa03f (patch)
tree2505edb543d29d6a2442928624773e80a0b542df /common
parenta21d0bc4c26e1af4e75c09aa293739a339a400b5 (diff)
downloadbarebox-a8421600d1d1a03a322e45b00db318dbf80fa03f.tar.gz
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.c9
-rw-r--r--common/dlmalloc.c5
-rw-r--r--common/exports.c18
-rw-r--r--common/hush.c10
-rw-r--r--common/main.c4
5 files changed, 38 insertions, 8 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 5be86ed..c261566 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 01aca94..7c5375a 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 70b9c7f..83d2a8a 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 f81fdcf..f7550b9 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 4c438b7..c569d1d 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