mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 22:24:09 +08:00
RISC-V: Move from EARLY_PRINTK to SBI earlycon
Now that we have earlycon support in the SBI console driver there is no reason to have our arch-specific early printk support. This patch set turns on SBI earlycon support and removes the old early printk.
This commit is contained in:
commit
358f3fff52
@ -1,2 +0,0 @@
|
|||||||
config EARLY_PRINTK
|
|
||||||
def_bool y
|
|
@ -46,6 +46,7 @@ CONFIG_INPUT_MOUSEDEV=y
|
|||||||
CONFIG_SERIAL_8250=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_SERIAL_8250_CONSOLE=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_SERIAL_OF_PLATFORM=y
|
CONFIG_SERIAL_OF_PLATFORM=y
|
||||||
|
CONFIG_SERIAL_EARLYCON_RISCV_SBI=y
|
||||||
CONFIG_HVC_RISCV_SBI=y
|
CONFIG_HVC_RISCV_SBI=y
|
||||||
# CONFIG_PTP_1588_CLOCK is not set
|
# CONFIG_PTP_1588_CLOCK is not set
|
||||||
CONFIG_DRM=y
|
CONFIG_DRM=y
|
||||||
|
@ -35,31 +35,9 @@
|
|||||||
#include <asm/sections.h>
|
#include <asm/sections.h>
|
||||||
#include <asm/pgtable.h>
|
#include <asm/pgtable.h>
|
||||||
#include <asm/smp.h>
|
#include <asm/smp.h>
|
||||||
#include <asm/sbi.h>
|
|
||||||
#include <asm/tlbflush.h>
|
#include <asm/tlbflush.h>
|
||||||
#include <asm/thread_info.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
|
#ifdef CONFIG_DUMMY_CONSOLE
|
||||||
struct screen_info screen_info = {
|
struct screen_info screen_info = {
|
||||||
.orig_video_lines = 30,
|
.orig_video_lines = 30,
|
||||||
@ -219,12 +197,6 @@ static void __init setup_bootmem(void)
|
|||||||
|
|
||||||
void __init setup_arch(char **cmdline_p)
|
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;
|
*cmdline_p = boot_command_line;
|
||||||
|
|
||||||
parse_early_param();
|
parse_early_param();
|
||||||
|
Loading…
Reference in New Issue
Block a user