[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

Allows for the conditional inclusion of EHCI UART driver on the x86 platform
rather than having it always enabled.

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

Signed-off-by: Derek Straka <derek@xxxxxxxxxxx>
 xen/arch/x86/Kconfig     |  1 -
 xen/drivers/char/Kconfig |  3 ++-
 xen/include/xen/serial.h | 12 +++++++++++-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 8a122df..2119c93 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -8,7 +8,6 @@ config X86
        select COMPAT
        select CORE_PARKING
        select HAS_CPUFREQ
-       select HAS_EHCI
        select HAS_GDBSX
        select HAS_IOPORTS
        select HAS_KEXEC
diff --git a/xen/drivers/char/Kconfig b/xen/drivers/char/Kconfig
index c87e018..08a60e0 100644
--- a/xen/drivers/char/Kconfig
+++ b/xen/drivers/char/Kconfig
@@ -45,7 +45,8 @@ config HAS_SCIF
          say Y.
 config HAS_EHCI
-       bool
+       bool "EHCI UART" if EXPERT = "y"
+       default y if X86
          This selects the USB based EHCI debug port to be used as a UART. If
          you have an x86 based system with USB, say Y.
diff --git a/xen/include/xen/serial.h b/xen/include/xen/serial.h
index 343779c..8f87897 100644
--- a/xen/include/xen/serial.h
+++ b/xen/include/xen/serial.h
@@ -174,11 +174,21 @@ void ns16550_init(int index, struct ns16550_defaults 
 static inline void ns16550_init(int index, struct ns16550_defaults *defaults) 
 void ehci_dbgp_init(void);
-void arm_uart_init(void);
+static inline void ehci_dbgp_init(void) {}
+void arm_uart_init(void);
 struct physdev_dbgp_op;
 int dbgp_op(const struct physdev_dbgp_op *);
+static inline int dbgp_op(const struct physdev_dbgp_op *op) { return 0; }
 /* Baud rate was pre-configured before invoking the UART driver. */
 #define BAUD_AUTO (-1)

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.