RISC-V: Remove EARLY_PRINTK support
authorAnup Patel <anup@brainfault.org>
Tue, 4 Dec 2018 13:55:07 +0000 (19:25 +0530)
committerPalmer Dabbelt <palmer@sifive.com>
Mon, 17 Dec 2018 18:23:46 +0000 (10:23 -0800)
The EARLY_PRINTK using SBI console calls is not required
any more because we now have RISC-V SBI support in generic
earlycon framework.

Signed-off-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/Kconfig.debug
arch/riscv/kernel/setup.c

index c5a72f17c46925268052597cb15ed8571107794b..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,2 +0,0 @@
-config EARLY_PRINTK
-       def_bool y
index 2c290e6aaa6e414a965d7acc97604a26f75e7548..fc8006a042ebc0af6c88ccf9341bc702800ce0fe 100644 (file)
 #include <asm/sections.h>
 #include <asm/pgtable.h>
 #include <asm/smp.h>
-#include <asm/sbi.h>
 #include <asm/tlbflush.h>
 #include <asm/thread_info.h>
 
-#ifdef CONFIG_EARLY_PRINTK
-static void sbi_console_write(struct console *co, const char *buf,
-                             unsigned int n)
-{
-       int i;
-
-       for (i = 0; i < n; ++i) {
-               if (buf[i] == '\n')
-                       sbi_console_putchar('\r');
-               sbi_console_putchar(buf[i]);
-       }
-}
-
-struct console riscv_sbi_early_console_dev __initdata = {
-       .name   = "early",
-       .write  = sbi_console_write,
-       .flags  = CON_PRINTBUFFER | CON_BOOT | CON_ANYTIME,
-       .index  = -1
-};
-#endif
-
 #ifdef CONFIG_DUMMY_CONSOLE
 struct screen_info screen_info = {
        .orig_video_lines       = 30,
@@ -219,12 +197,6 @@ static void __init setup_bootmem(void)
 
 void __init setup_arch(char **cmdline_p)
 {
-#if defined(CONFIG_EARLY_PRINTK)
-       if (likely(early_console == NULL)) {
-               early_console = &riscv_sbi_early_console_dev;
-               register_console(early_console);
-       }
-#endif
        *cmdline_p = boot_command_line;
 
        parse_early_param();