summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-12 11:21:13 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2007-07-12 11:21:13 +0200
commit793ff46a04c6aea52387d23ec58df2aec312532b (patch)
tree8d448a77272254e02d9bd936b1becd97fe342941
parentfa9807573b02dda3e9eb5262ffc42fb0fd8b059e (diff)
downloadbarebox-793ff46a04c6aea52387d23ec58df2aec312532b.tar.gz
barebox-793ff46a04c6aea52387d23ec58df2aec312532b.tar.xz
CONFIG_ARCH_HAS_RELOC -> CONFIG_HAS_EARLY_INIT
-rw-r--r--arch/ppc/Kconfig5
-rw-r--r--common/startup.c58
-rw-r--r--include/reloc.h4
3 files changed, 30 insertions, 37 deletions
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index 797edb47dd..c6f0a50656 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -1,4 +1,7 @@
+config BOARDINFO
+ default "Phytec Phycore mpc5200b tiny" if MACH_PHYCORE_MPC5200B_TINY
+
config TEXT_BASE
default 0 if RELOCATABLE
default 0x1000000 if MACH_PHYCORE_MPC5200B_TINY
@@ -7,7 +10,7 @@ config MPC5XXX_EARLY_CONSOLE
bool
default y
-config ARCH_HAS_RELOC
+config HAS_EARLY_INIT
bool
default y
diff --git a/common/startup.c b/common/startup.c
index 28926f5443..269494cf37 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -25,19 +25,6 @@
* MA 02111-1307 USA
*/
-/*
- * To match the U-Boot user interface on ARM platforms to the U-Boot
- * standard (as on PPC platforms), some messages with debug character
- * are removed from the default U-Boot build.
- *
- * Define DEBUG here if you want additional info as shown below
- * printed upon startup:
- *
- * U-Boot code: 00F00000 -> 00F3C774 BSS: -> 00FC3274
- * IRQ Stack: 00ebff7c
- * FIQ Stack: 00ebef7c
- */
-
#include <common.h>
#include <init.h>
#include <command.h>
@@ -49,15 +36,28 @@
#include <linux/stat.h>
#include <reloc.h>
-ulong load_addr = 0; /* Default Load Address */
-
#ifndef CONFIG_IDENT_STRING
#define CONFIG_IDENT_STRING ""
#endif
-#include <asm/arch/mpc5xxx.h>
+extern initcall_t __u_boot_initcalls_start[], __u_boot_early_initcalls_end[], __u_boot_initcalls_end[];
+
+const char *version_string =
+ "U-Boot" UTS_RELEASE " (" __DATE__ " - " __TIME__ ")"CONFIG_IDENT_STRING;
+
+static int display_banner (void)
+{
+ const char *vers = RELOC_VAR(version_string);
+
+ printf (RELOC("\n\n%s\n\n"), RELOC(vers));
+ printf (RELOC("U-Boot code: %08lX -> %08lX BSS: -> %08lX\n"),
+ _u_boot_start, _bss_start, _bss_end);
+ printf(RELOC("Board: " CONFIG_BOARDINFO "\n"));
+
+ return 0;
+}
-#ifdef CONFIG_ARCH_HAS_RELOC
+#ifdef CONFIG_HAS_EARLY_INIT
#define EARLY_INITDATA (CFG_INIT_RAM_ADDR + CFG_INIT_RAM_SIZE \
- CONFIG_EARLY_INITDATA_SIZE)
@@ -70,23 +70,11 @@ void early_init (void)
memcpy((void *)EARLY_INITDATA, RELOC(&__early_init_data_begin),
(ulong)&__early_init_data_size);
early_console_start(RELOC("psc3"), 115200);
-}
-
-#endif /* CONFIG_ARCH_HAS_RELOC */
-
-const char version_string[] =
- "U-Boot" UTS_RELEASE " (" __DATE__ " - " __TIME__ ")"CONFIG_IDENT_STRING;
-static int display_banner (void)
-{
- printf ("\n\n%s\n\n", version_string);
- printf ("U-Boot code: %08lX -> %08lX BSS: -> %08lX\n",
- _u_boot_start, _bss_start, _bss_end);
-
- return 0;
+ display_banner();
}
-extern initcall_t __u_boot_initcalls_start[], __u_boot_initcalls_end[];
+#endif /* CONFIG_HAS_EARLY_INIT */
void start_uboot (void)
{
@@ -94,14 +82,14 @@ void start_uboot (void)
int result;
struct stat s;
-#ifdef CONFIG_ARCH_HAS_RELOC
+#ifdef CONFIG_HAS_EARLY_INIT
/* We are running from RAM now, copy early initdata from
* early RAM to RAM
*/
memcpy(&__early_init_data_begin, init_data_ptr,
(ulong)&__early_init_data_size);
init_data_ptr = &__early_init_data_begin;
-#endif /* CONFIG_ARCH_HAS_RELOC */
+#endif /* CONFIG_HAS_EARLY_INIT */
for (initcall = __u_boot_initcalls_start;
initcall < __u_boot_initcalls_end; initcall++) {
@@ -112,7 +100,9 @@ void start_uboot (void)
hang();
}
- display_banner();
+#ifndef CONFIG_HAS_EARLY_INIT
+ display_banner();
+#endif
mount("none", "ramfs", "/");
mkdir("/dev");
diff --git a/include/reloc.h b/include/reloc.h
index d8a4fd012d..3fbb57d5b1 100644
--- a/include/reloc.h
+++ b/include/reloc.h
@@ -1,7 +1,7 @@
#ifndef __RELOC_H
#define __RELOC_H
-#ifdef CONFIG_ARCH_HAS_RELOC
+#ifdef CONFIG_HAS_EARLY_INIT
extern unsigned long _u_boot_start, _bss_start, _bss_end;
@@ -58,6 +58,6 @@ static inline void early_init(void)
#define INITDATA(var) var
-#endif /* CONFIG_ARCH_HAS_RELOC */
+#endif /* CONFIG_HAS_EARLY_INIT */
#endif /* __RELOC_H */