-#define UART_READ(r) READREG(UART_BASE+(r))
-#define UART_WRITE(r,v) WRITEREG(UART_BASE+(r),(v))
+#if defined(CONFIG_USE_UART0)
+# define UART_READ(r) READREG(UART0_BASE+(r))
+# define UART_WRITE(r,v) WRITEREG(UART0_BASE+(r),(v))
+#else
+# define UART_READ(r) READREG(UART1_BASE+(r))
+# define UART_WRITE(r,v) WRITEREG(UART1_BASE+(r),(v))
+#endif