summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-09-26 18:55:07 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-09-27 10:27:18 +0200
commitd01070c8af7588337fd79bc37d63a8de6435d771 (patch)
treec52187758b7e99841cd4cb5c4c6f30131364a105 /common
parentbbbfb9f4f8a4951137ccd8495b97dfee927e7d80 (diff)
downloadbarebox-d01070c8af7588337fd79bc37d63a8de6435d771.tar.gz
barebox-d01070c8af7588337fd79bc37d63a8de6435d771.tar.xz
remove EARLY_INIT and EARLY_CONSOLE support
Bitrotted over time and nearly unused, so remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/Kconfig17
-rw-r--r--common/console.c36
-rw-r--r--common/startup.c28
-rw-r--r--common/version.c5
4 files changed, 5 insertions, 81 deletions
diff --git a/common/Kconfig b/common/Kconfig
index 82e43aa9fc..8e96920e48 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -398,23 +398,6 @@ config CONSOLE_ACTIVATE_ALL
Enabling this options activates all consoles on startup, so
you will get output and a prompt on all consoles simultaneously.
-config EARLY_CONSOLE_PORT
- string
- depends on HAS_EARLY_INIT
- prompt "Console device for early output"
- help
- Choose the device on which you want to have early output printed
- to. This is only used during startup when no device information
- is available.
-
-config EARLY_CONSOLE_BAUDRATE
- int
- default 115200
- depends on HAS_EARLY_INIT
- prompt "Early console baudrate"
- help
- Choose the baudrate for your early console.
-
config OF_FLAT_TREE
bool
prompt "Open Firmware flat device tree support"
diff --git a/common/console.c b/common/console.c
index 1f6ee93b4b..06e9c29e8c 100644
--- a/common/console.c
+++ b/common/console.c
@@ -29,7 +29,6 @@
#include <console.h>
#include <driver.h>
#include <fs.h>
-#include <reloc.h>
#include <init.h>
#include <clock.h>
#include <kfifo.h>
@@ -42,10 +41,9 @@ LIST_HEAD(console_list);
EXPORT_SYMBOL(console_list);
#define CONSOLE_UNINITIALIZED 0
-#define CONSOLE_INIT_EARLY 1
-#define CONSOLE_INIT_FULL 2
+#define CONSOLE_INIT_FULL 1
-static int __early_initdata initialized = 0;
+static int initialized = 0;
static int console_std_set(struct device_d *dev, struct param_d *param,
const char *val)
@@ -163,10 +161,8 @@ int console_register(struct console_device *newcdev)
console_output_buffer = NULL;
}
-#ifndef CONFIG_HAS_EARLY_INIT
if (first)
barebox_banner();
-#endif
return 0;
}
@@ -250,26 +246,16 @@ int tstc(void)
}
EXPORT_SYMBOL(tstc);
-#ifdef CONFIG_HAS_EARLY_INIT
-static void __early_initdata *early_console_base;
-#endif
-
void console_putc(unsigned int ch, char c)
{
struct console_device *cdev;
- int init = INITDATA(initialized);
+ int init = initialized;
switch (init) {
case CONSOLE_UNINITIALIZED:
kfifo_putc(console_output_buffer, c);
return;
-#ifdef CONFIG_HAS_EARLY_INIT
- case CONSOLE_INIT_EARLY:
- early_console_putc(INITDATA(early_console_base), c);
- return;
-#endif
-
case CONSOLE_INIT_FULL:
for_each_console(cdev) {
if (cdev->f_active & ch) {
@@ -410,19 +396,3 @@ int ctrlc (void)
}
EXPORT_SYMBOL(ctrlc);
#endif /* ARCH_HAS_CTRC */
-
-#ifdef CONFIG_HAS_EARLY_INIT
-
-void early_console_start(const char *name, int baudrate)
-{
- void *base = get_early_console_base(name);
-
- if (base) {
- early_console_init(base, baudrate);
- INITDATA(initialized) = CONSOLE_INIT_EARLY;
- INITDATA(early_console_base) = base;
- barebox_banner();
- }
-}
-
-#endif
diff --git a/common/startup.c b/common/startup.c
index 7a1b6024f4..13783fb27a 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -38,7 +38,6 @@
#include <fs.h>
#include <linux/stat.h>
#include <environment.h>
-#include <reloc.h>
#include <asm-generic/memory_layout.h>
#include <asm/sections.h>
@@ -62,23 +61,6 @@ static void display_meminfo(void)
#endif
}
-#ifdef CONFIG_HAS_EARLY_INIT
-
-#define EARLY_INITDATA (CFG_INIT_RAM_ADDR + CFG_INIT_RAM_SIZE \
- - CONFIG_EARLY_INITDATA_SIZE)
-
-void *init_data_ptr = (void *)EARLY_INITDATA;
-
-void early_init (void)
-{
- /* copy the early initdata segment to early init RAM */
- memcpy((void *)EARLY_INITDATA, RELOC(&__early_init_data_begin),
- (ulong)&__early_init_data_end -
- (ulong)&__early_init_data_begin);
-}
-
-#endif /* CONFIG_HAS_EARLY_INIT */
-
#ifdef CONFIG_DEFAULT_ENVIRONMENT
#include <generated/barebox_default_env.h>
@@ -112,16 +94,6 @@ void start_barebox (void)
struct stat s;
#endif
-#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_end -
- (ulong)&__early_init_data_begin);
- init_data_ptr = &__early_init_data_begin;
-#endif /* CONFIG_HAS_EARLY_INIT */
-
for (initcall = __barebox_initcalls_start;
initcall < __barebox_initcalls_end; initcall++) {
PUTS_LL("<<");
diff --git a/common/version.c b/common/version.c
index 945475fc3d..0af8ec160a 100644
--- a/common/version.c
+++ b/common/version.c
@@ -1,5 +1,4 @@
#include <common.h>
-#include <reloc.h>
#include <generated/utsrelease.h>
const char version_string[] =
@@ -7,7 +6,7 @@ const char version_string[] =
void barebox_banner (void)
{
- printf (RELOC("\n\n%s\n\n"), RELOC_VAR(version_string));
- printf(RELOC("Board: " CONFIG_BOARDINFO "\n"));
+ printf("\n\n%s\n\n", version_string);
+ printf("Board: " CONFIG_BOARDINFO "\n");
}