Re: [Xen-devel] [PATCH v2 1/2] x86: add a user configurable Kconfig option for the NS16550 UART

2016-09-20 Thread Jan Beulich
>>> On 19.09.16 at 16:51,  wrote:
> --- a/xen/drivers/char/Kconfig
> +++ b/xen/drivers/char/Kconfig
> @@ -1,6 +1,11 @@
>  config HAS_NS16550
>   bool
>   default y
> +
> +config NS16550
> + bool "NS16550 UART" if EXPERT = "y"
> + default y
> + depends on HAS_NS16550
>   help
> This selects the 16550-series UART support. For most systems, say Y.

May I please ask to avoid sending new patch versions without fully
taking care of earlier comments? I'm still missing the overview mail
as indicated in reply to the VGA sibling of these two patches. And
I did clearly say "rename" when talking about the aspects of HAS_*
Kconfig variables - you're leaving HAS_NS16550 as a completely
pointless variable around the way you've done it.

Jan


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH v2 1/2] x86: add a user configurable Kconfig option for the NS16550 UART

2016-09-19 Thread Derek Straka
Allows for the conditional inclusion of NS16550 UART driver rather than having
it always enabled.

The default configuration for the CONFIG_NS16550 option remains 'y', so the
behavior out of the box remains unchanged.  The addition of the option allows
advanced users to enable/disable the inclusion of the NS16550 UART driver.

Signed-off-by: Derek Straka 
---
 xen/drivers/char/Kconfig  | 5 +
 xen/drivers/char/Makefile | 2 +-
 xen/include/xen/serial.h  | 7 ++-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/xen/drivers/char/Kconfig b/xen/drivers/char/Kconfig
index 51343d0..1d894a7 100644
--- a/xen/drivers/char/Kconfig
+++ b/xen/drivers/char/Kconfig
@@ -1,6 +1,11 @@
 config HAS_NS16550
bool
default y
+
+config NS16550
+   bool "NS16550 UART" if EXPERT = "y"
+   default y
+   depends on HAS_NS16550
help
  This selects the 16550-series UART support. For most systems, say Y.
 
diff --git a/xen/drivers/char/Makefile b/xen/drivers/char/Makefile
index aa169d7..0afadaf 100644
--- a/xen/drivers/char/Makefile
+++ b/xen/drivers/char/Makefile
@@ -1,5 +1,5 @@
 obj-y += console.o
-obj-$(CONFIG_HAS_NS16550) += ns16550.o
+obj-$(CONFIG_NS16550) += ns16550.o
 obj-$(CONFIG_HAS_CADENCE_UART) += cadence-uart.o
 obj-$(CONFIG_HAS_PL011) += pl011.o
 obj-$(CONFIG_HAS_EXYNOS4210) += exynos4210-uart.o
diff --git a/xen/include/xen/serial.h b/xen/include/xen/serial.h
index 1212a12..46edff8 100644
--- a/xen/include/xen/serial.h
+++ b/xen/include/xen/serial.h
@@ -167,9 +167,14 @@ struct ns16550_defaults {
 int irq;   /* default irq */
 unsigned long io_base; /* default io_base address */
 };
+
+#ifdef CONFIG_NS16550
 void ns16550_init(int index, struct ns16550_defaults *defaults);
-void ehci_dbgp_init(void);
+#else
+static inline void ns16550_init(int index, struct ns16550_defaults *defaults) 
{}
+#endif
 
+void ehci_dbgp_init(void);
 void arm_uart_init(void);
 
 struct physdev_dbgp_op;
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel