Skip to contentSkip to conversation

nios2-generic: Fix logic around choosing UART

PATCH New Alex Hornung 1 participant 1 message Feb 20, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nios2-generic: Fix logic around choosing UART

* Before, the normal altera UART driver was compiled in unconditionally and the JTAG UART was missed out.

* Work around this by conditionalizing the driver to use based on the UART choice in the user's custom FPGA header file. If both were to be present, the JTAG UART would have preference.

---
 include/configs/nios2-generic.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/include/configs/nios2-generic.h
index 9ba35e8..6f4d166 100644

include/configs/nios2-generic.h +3 -2
@@ -36,10 +36,11 @@
 /*
  * SERIAL
  */
-#define CONFIG_ALTERA_UART
-#if defined(CONFIG_ALTERA_JTAG_UART)
+#if defined(CONFIG_SYS_JTAG_UART_BASE)
+# define CONFIG_ALTERA_JTAG_UART
 # define CONFIG_SYS_NIOS_CONSOLE	CONFIG_SYS_JTAG_UART_BASE
 #else
+# define CONFIG_ALTERA_UART
 # define CONFIG_SYS_NIOS_CONSOLE	CONFIG_SYS_UART_BASE
 #endif
 
Signature · 1 line
1.7.3.4