From 467591b8d2677d298095a06df9b9e964bf221256 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 23 Oct 2020 09:15:55 -0400 Subject: [PATCH 1/4] Revert "serial: serial_xen: add DEBUG_UART support" This reverts commit 82e21b391bd315f6fe0e0b79326af8a141e9cca7. Signed-off-by: Tom Rini --- drivers/serial/Kconfig | 14 +++----------- drivers/serial/serial_xen.c | 20 -------------------- 2 files changed, 3 insertions(+), 31 deletions(-) diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index b6ba702bd3..b4805a2e4e 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -401,19 +401,11 @@ config DEBUG_UART_MTK driver will be available until the real driver model serial is running. -config DEBUG_UART_XEN - bool "XEN Hypervisor Console" - depends on XEN_SERIAL - help - Select this to enable a debug UART using the serial_xen driver. You - will not have to provide any parameters to make this work. The driver - will be available until the real driver-model serial is running. - endchoice config DEBUG_UART_BASE hex "Base address of UART" - depends on DEBUG_UART && !DEBUG_UART_XEN + depends on DEBUG_UART default 0 if DEBUG_UART_SANDBOX help This is the base address of your UART for memory-mapped UARTs. @@ -423,7 +415,7 @@ config DEBUG_UART_BASE config DEBUG_UART_CLOCK int "UART input clock" - depends on DEBUG_UART && !DEBUG_UART_XEN + depends on DEBUG_UART default 0 if DEBUG_UART_SANDBOX help The UART input clock determines the speed of the internal UART @@ -435,7 +427,7 @@ config DEBUG_UART_CLOCK config DEBUG_UART_SHIFT int "UART register shift" - depends on DEBUG_UART && !DEBUG_UART_XEN + depends on DEBUG_UART default 0 if DEBUG_UART help Some UARTs (notably ns16550) support different register layouts diff --git a/drivers/serial/serial_xen.c b/drivers/serial/serial_xen.c index 34c90ece40..ed191829f0 100644 --- a/drivers/serial/serial_xen.c +++ b/drivers/serial/serial_xen.c @@ -5,7 +5,6 @@ */ #include #include -#include #include #include #include @@ -16,14 +15,11 @@ #include #include -#include #include #include #include #include -#include - DECLARE_GLOBAL_DATA_PTR; u32 console_evtchn; @@ -182,19 +178,3 @@ U_BOOT_DRIVER(serial_xen) = { .flags = DM_FLAG_PRE_RELOC, }; -#if defined(CONFIG_DEBUG_UART_XEN) -static inline void _debug_uart_init(void) {} - -static inline void _debug_uart_putc(int c) -{ -#if CONFIG_IS_ENABLED(ARM) - xen_debug_putc(c); -#else - /* the type cast should work on LE only */ - HYPERVISOR_console_io(CONSOLEIO_write, 1, (char *)&ch); -#endif -} - -DEBUG_UART_FUNCS - -#endif From 2c483706269f6f9f3a0a762ba1e04ab931bde97b Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 23 Oct 2020 09:16:01 -0400 Subject: [PATCH 2/4] Revert "xen: add definitions for console_io" This reverts commit 16389a74c516470c8f0fd8c712e1638f80384b92. Signed-off-by: Tom Rini --- include/xen/interface/xen.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/xen/interface/xen.h b/include/xen/interface/xen.h index a7c8ed781b..eec8ab75b9 100644 --- a/include/xen/interface/xen.h +++ b/include/xen/interface/xen.h @@ -76,12 +76,6 @@ #define __HYPERVISOR_arch_6 54 #define __HYPERVISOR_arch_7 55 -/* - * Commands to HYPERVISOR_console_io(). - */ -#define CONSOLEIO_write 0 -#define CONSOLEIO_read 1 - #ifndef __ASSEMBLY__ typedef u16 domid_t; From c3d3104506963eec94af80523e4a31808e52bda7 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 23 Oct 2020 09:16:07 -0400 Subject: [PATCH 3/4] Revert "arch: arm/xen: add putc() for debugging" This reverts commit 3a51b2a2c3cedc0d2a9ce981b8e00ab8cefcb6b7. Signed-off-by: Tom Rini --- arch/arm/include/asm/xen/hypercall.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/arm/include/asm/xen/hypercall.h b/arch/arm/include/asm/xen/hypercall.h index 121ccfcc60..a4fd077079 100644 --- a/arch/arm/include/asm/xen/hypercall.h +++ b/arch/arm/include/asm/xen/hypercall.h @@ -19,10 +19,4 @@ int HYPERVISOR_sched_op(int cmd, void *arg); int HYPERVISOR_event_channel_op(int cmd, void *arg); unsigned long HYPERVISOR_hvm_op(int op, void *arg); int HYPERVISOR_memory_op(unsigned int cmd, void *arg); - -static inline void xen_debug_putc(int c) -{ - register int v __asm__ ("x0") = c; - __asm__ __volatile__("hvc 0xfffe" : "=r" (v) : "0" (v)); -} #endif /* _ASM_ARM_XEN_HYPERCALL_H */ From cc696f52560b5ed0ef9a91ec496d420fdaf29a0c Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 23 Oct 2020 09:16:13 -0400 Subject: [PATCH 4/4] Revert "serial: serial_xen: print U-Boot banner and others" This reverts commit 18426bf02217de2e9bb2b41eaa74d769892c55ef. Signed-off-by: Tom Rini --- drivers/serial/serial_xen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/serial/serial_xen.c b/drivers/serial/serial_xen.c index ed191829f0..ba6504b947 100644 --- a/drivers/serial/serial_xen.c +++ b/drivers/serial/serial_xen.c @@ -175,6 +175,8 @@ U_BOOT_DRIVER(serial_xen) = { .priv_auto_alloc_size = sizeof(struct xen_uart_priv), .probe = xen_serial_probe, .ops = &xen_serial_ops, +#if !CONFIG_IS_ENABLED(OF_CONTROL) .flags = DM_FLAG_PRE_RELOC, +#endif };