xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Derek Straka <derek@asterius.io>
To: xen-devel@lists.xen.org
Cc: Derek Straka <derek@asterius.io>,
	andrew.cooper3@citrix.com, jbeulich@suse.com
Subject: [PATCH 2/2] x86: add a user configurable Kconfig option for the EHCI UART
Date: Tue, 13 Sep 2016 13:35:44 -0400	[thread overview]
Message-ID: <1473788144-12113-2-git-send-email-derek@asterius.io> (raw)
In-Reply-To: <1473788144-12113-1-git-send-email-derek@asterius.io>

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@asterius.io>
---
 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
 	help
 	  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 *defaults);
 static inline void ns16550_init(int index, struct ns16550_defaults *defaults) {}
 #endif
 
+#ifdef CONFIG_HAS_EHCI
 void ehci_dbgp_init(void);
-void arm_uart_init(void);
+#else
+static inline void ehci_dbgp_init(void) {}
+#endif
 
+void arm_uart_init(void);
+ 
 struct physdev_dbgp_op;
+
+#ifdef CONFIG_HAS_EHCI
 int dbgp_op(const struct physdev_dbgp_op *);
+#else
+static inline int dbgp_op(const struct physdev_dbgp_op *op) { return 0; }
+#endif
 
 /* Baud rate was pre-configured before invoking the UART driver. */
 #define BAUD_AUTO (-1)
-- 
2.7.4


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

  reply	other threads:[~2016-09-13 17:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13 17:35 [PATCH 1/2] x86: add a user configurable Kconfig option for the NS16550 UART Derek Straka
2016-09-13 17:35 ` Derek Straka [this message]
2016-09-13 17:43   ` [PATCH 2/2] x86: add a user configurable Kconfig option for the EHCI UART Andrew Cooper
2016-09-14  9:43   ` Julien Grall
2016-09-14 10:41   ` Jan Beulich
2016-09-13 17:43 ` [PATCH 1/2] x86: add a user configurable Kconfig option for the NS16550 UART Andrew Cooper
2016-09-14  9:42 ` Julien Grall
2016-09-14 10:39 ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473788144-12113-2-git-send-email-derek@asterius.io \
    --to=derek@asterius.io \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).