diff mbox

[U-Boot,1/2] nios2-generic: Fix logic around choosing UART

Message ID 1329723235-11978-1-git-send-email-alex@alexhornung.com
State Rejected
Delegated to: Thomas Chou
Headers show

Commit Message

Alex Hornung Feb. 20, 2012, 7:33 a.m. UTC
* 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.

Signed-off-by: Alex Hornung <alex@alexhornung.com>
---
 include/configs/nios2-generic.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/include/configs/nios2-generic.h b/include/configs/nios2-generic.h
index 9ba35e8..765b169 100644
--- a/include/configs/nios2-generic.h
+++ b/include/configs/nios2-generic.h
@@ -36,10 +36,11 @@ 
 /*
  * SERIAL
  */
-#define CONFIG_ALTERA_UART
 #if defined(CONFIG_ALTERA_JTAG_UART)
+# 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