From c5404b64fb5a35d41f7eff6d12b8ffdb0c851040 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 4 Dec 2017 13:48:23 -0700 Subject: Drop the log buffer This does not appear to be used by any boards. Before introducing a new log system, remove this old one. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- common/board_f.c | 18 ------------------ common/board_r.c | 25 ++----------------------- common/image.c | 9 --------- common/stdio.c | 6 ------ 4 files changed, 2 insertions(+), 56 deletions(-) (limited to 'common') diff --git a/common/board_f.c b/common/board_f.c index 9220815441e..1e8bf63ec10 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -296,20 +295,6 @@ static int setup_dest_addr(void) return 0; } -#if defined(CONFIG_LOGBUFFER) -static int reserve_logbuffer(void) -{ -#ifndef CONFIG_ALT_LB_ADDR - /* reserve kernel log buffer */ - gd->relocaddr -= LOGBUFF_RESERVE; - debug("Reserving %dk for kernel logbuffer at %08lx\n", LOGBUFF_LEN, - gd->relocaddr); -#endif - - return 0; -} -#endif - #ifdef CONFIG_PRAM /* reserve protected RAM */ static int reserve_pram(void) @@ -846,9 +831,6 @@ static const init_fnc_t init_sequence_f[] = { * - board info struct */ setup_dest_addr, -#if defined(CONFIG_LOGBUFFER) - reserve_logbuffer, -#endif #ifdef CONFIG_PRAM reserve_pram, #endif diff --git a/common/board_r.c b/common/board_r.c index a3b9bfb8ee4..89729d77360 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -30,7 +30,6 @@ #if defined(CONFIG_CMD_KGDB) #include #endif -#include #include #include #ifdef CONFIG_BITBANGMII @@ -200,19 +199,6 @@ static int initr_addr_map(void) } #endif -#ifdef CONFIG_LOGBUFFER -unsigned long logbuffer_base(void) -{ - return gd->ram_top - LOGBUFF_LEN; -} - -static int initr_logbuffer(void) -{ - logbuff_init_ptrs(); - return 0; -} -#endif - #ifdef CONFIG_POST static int initr_post_backlog(void) { @@ -628,7 +614,7 @@ static int initr_ide(void) } #endif -#if defined(CONFIG_PRAM) || defined(CONFIG_LOGBUFFER) +#if defined(CONFIG_PRAM) /* * Export available size of memory for Linux, taking into account the * protected RAM at top of memory @@ -640,10 +626,6 @@ int initr_mem(void) # ifdef CONFIG_PRAM pram = env_get_ulong("pram", 10, CONFIG_PRAM); -# endif -# if defined(CONFIG_LOGBUFFER) && !defined(CONFIG_ALT_LB_ADDR) - /* Also take the logbuffer into account (pram is in kB) */ - pram += (LOGBUFF_LEN + LOGBUFF_OVERHEAD) / 1024; # endif sprintf(memsz, "%ldk", (long int) ((gd->ram_size / 1024) - pram)); env_set("mem", memsz); @@ -753,9 +735,6 @@ static init_fnc_t init_sequence_r[] = { board_early_init_r, #endif INIT_FUNC_WATCHDOG_RESET -#ifdef CONFIG_LOGBUFFER - initr_logbuffer, -#endif #ifdef CONFIG_POST initr_post_backlog, #endif @@ -877,7 +856,7 @@ static init_fnc_t init_sequence_r[] = { INIT_FUNC_WATCHDOG_RESET initr_bedbug, #endif -#if defined(CONFIG_PRAM) || defined(CONFIG_LOGBUFFER) +#if defined(CONFIG_PRAM) initr_mem, #endif #ifdef CONFIG_PS2KBD diff --git a/common/image.c b/common/image.c index 4ec4744589f..4bcf6b3128a 100644 --- a/common/image.c +++ b/common/image.c @@ -15,10 +15,6 @@ #include #endif -#ifdef CONFIG_LOGBUFFER -#include -#endif - #include #include @@ -1154,11 +1150,6 @@ int boot_ramdisk_high(struct lmb *lmb, ulong rd_data, ulong rd_len, } -#ifdef CONFIG_LOGBUFFER - /* Prevent initrd from overwriting logbuffer */ - lmb_reserve(lmb, logbuffer_base() - LOGBUFF_OVERHEAD, LOGBUFF_RESERVE); -#endif - debug("## initrd_high = 0x%08lx, copy_to_ram = %d\n", initrd_high, initrd_copy_to_ram); diff --git a/common/stdio.c b/common/stdio.c index ee4f0bda9ea..2e5143a0255 100644 --- a/common/stdio.c +++ b/common/stdio.c @@ -17,9 +17,6 @@ #include #include #include -#ifdef CONFIG_LOGBUFFER -#include -#endif #if defined(CONFIG_SYS_I2C) #include @@ -380,9 +377,6 @@ int stdio_add_devices(void) #endif /* CONFIG_DM_VIDEO */ #if defined(CONFIG_KEYBOARD) && !defined(CONFIG_DM_KEYBOARD) drv_keyboard_init (); -#endif -#ifdef CONFIG_LOGBUFFER - drv_logbuff_init (); #endif drv_system_init (); serial_stdio_init (); -- cgit v1.3.1