diff options
author | Anup Patel <anup.patel@wdc.com> | 2021-04-21 18:03:50 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2021-04-28 16:58:23 +0530 |
commit | 068ca086af2312d56efe51a724d78d84e1339ab4 (patch) | |
tree | 0e90c1a9e7a03254ff5dcb33507c5c9a06f9de3e /platform | |
parent | a3689db92a0e83ef25c52887aa686e4527e35a22 (diff) |
lib: sbi: Simplify console platform operations
Instead of having console_putc() and console_getc() callbacks in
platform operations, it will be much simpler for console driver to
directly register these operations as device to the sbi_console
implementation.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Diffstat (limited to 'platform')
-rw-r--r-- | platform/andes/ae350/platform.c | 2 | ||||
-rw-r--r-- | platform/fpga/ariane/platform.c | 2 | ||||
-rw-r--r-- | platform/fpga/openpiton/platform.c | 2 | ||||
-rw-r--r-- | platform/generic/platform.c | 2 | ||||
-rw-r--r-- | platform/kendryte/k210/platform.c | 2 | ||||
-rw-r--r-- | platform/nuclei/ux600/platform.c | 2 | ||||
-rw-r--r-- | platform/sifive/fu540/platform.c | 2 | ||||
-rw-r--r-- | platform/template/platform.c | 19 |
8 files changed, 0 insertions, 33 deletions
diff --git a/platform/andes/ae350/platform.c b/platform/andes/ae350/platform.c index aec91cd..338159d 100644 --- a/platform/andes/ae350/platform.c +++ b/platform/andes/ae350/platform.c @@ -164,8 +164,6 @@ const struct sbi_platform_operations platform_ops = { .final_init = ae350_final_init, .console_init = ae350_console_init, - .console_putc = uart8250_putc, - .console_getc = uart8250_getc, .irqchip_init = ae350_irqchip_init, diff --git a/platform/fpga/ariane/platform.c b/platform/fpga/ariane/platform.c index ea179e5..4f32c42 100644 --- a/platform/fpga/ariane/platform.c +++ b/platform/fpga/ariane/platform.c @@ -154,8 +154,6 @@ const struct sbi_platform_operations platform_ops = { .early_init = ariane_early_init, .final_init = ariane_final_init, .console_init = ariane_console_init, - .console_putc = uart8250_putc, - .console_getc = uart8250_getc, .irqchip_init = ariane_irqchip_init, .ipi_init = ariane_ipi_init, .ipi_send = clint_ipi_send, diff --git a/platform/fpga/openpiton/platform.c b/platform/fpga/openpiton/platform.c index 5eae477..77403c9 100644 --- a/platform/fpga/openpiton/platform.c +++ b/platform/fpga/openpiton/platform.c @@ -180,8 +180,6 @@ const struct sbi_platform_operations platform_ops = { .early_init = openpiton_early_init, .final_init = openpiton_final_init, .console_init = openpiton_console_init, - .console_putc = uart8250_putc, - .console_getc = uart8250_getc, .irqchip_init = openpiton_irqchip_init, .ipi_init = openpiton_ipi_init, .ipi_send = clint_ipi_send, diff --git a/platform/generic/platform.c b/platform/generic/platform.c index 8c1e06f..445cbcf 100644 --- a/platform/generic/platform.c +++ b/platform/generic/platform.c @@ -210,8 +210,6 @@ const struct sbi_platform_operations platform_ops = { .early_exit = generic_early_exit, .final_exit = generic_final_exit, .domains_init = generic_domains_init, - .console_putc = fdt_serial_putc, - .console_getc = fdt_serial_getc, .console_init = fdt_serial_init, .irqchip_init = fdt_irqchip_init, .irqchip_exit = fdt_irqchip_exit, diff --git a/platform/kendryte/k210/platform.c b/platform/kendryte/k210/platform.c index 0c50af5..495d214 100644 --- a/platform/kendryte/k210/platform.c +++ b/platform/kendryte/k210/platform.c @@ -149,8 +149,6 @@ const struct sbi_platform_operations platform_ops = { .final_init = k210_final_init, .console_init = k210_console_init, - .console_putc = sifive_uart_putc, - .console_getc = sifive_uart_getc, .irqchip_init = k210_irqchip_init, diff --git a/platform/nuclei/ux600/platform.c b/platform/nuclei/ux600/platform.c index d0a45a2..4f4f884 100644 --- a/platform/nuclei/ux600/platform.c +++ b/platform/nuclei/ux600/platform.c @@ -202,8 +202,6 @@ static void ux600_system_reset(u32 type, u32 reason) const struct sbi_platform_operations platform_ops = { .early_init = ux600_early_init, .final_init = ux600_final_init, - .console_putc = sifive_uart_putc, - .console_getc = sifive_uart_getc, .console_init = ux600_console_init, .irqchip_init = ux600_irqchip_init, .ipi_send = clint_ipi_send, diff --git a/platform/sifive/fu540/platform.c b/platform/sifive/fu540/platform.c index cdd8293..82f6f75 100644 --- a/platform/sifive/fu540/platform.c +++ b/platform/sifive/fu540/platform.c @@ -156,8 +156,6 @@ static u32 fu540_hart_index2id[FU540_HART_COUNT - 1] = { const struct sbi_platform_operations platform_ops = { .final_init = fu540_final_init, - .console_putc = sifive_uart_putc, - .console_getc = sifive_uart_getc, .console_init = fu540_console_init, .irqchip_init = fu540_irqchip_init, .ipi_send = clint_ipi_send, diff --git a/platform/template/platform.c b/platform/template/platform.c index 5bdb186..fbbac30 100644 --- a/platform/template/platform.c +++ b/platform/template/platform.c @@ -64,23 +64,6 @@ static int platform_console_init(void) } /* - * Write a character to the platform console output. - */ -static void platform_console_putc(char ch) -{ - /* Example if the generic UART8250 driver is used */ - uart8250_putc(ch); -} - -/* - * Read a character from the platform console input. - */ -static int platform_console_getc(void) -{ - return uart8250_getc(); -} - -/* * Initialize the platform interrupt controller for current HART. */ static int platform_irqchip_init(bool cold_boot) @@ -198,8 +181,6 @@ static void platform_system_reset(u32 type, u32 reason) const struct sbi_platform_operations platform_ops = { .early_init = platform_early_init, .final_init = platform_final_init, - .console_putc = platform_console_putc, - .console_getc = platform_console_getc, .console_init = platform_console_init, .irqchip_init = platform_irqchip_init, .ipi_send = platform_ipi_send, |