bool
depends on ARCH_AT91
+choice
+ prompt "Select sama5d4 USART/UART for debugging output"
+ depends on AT91_DEBUG_LL_DBGU2
+ default DEBUG_SAMA5D4_USART
+
+config DEBUG_SAMA5D4_UART
+ bool "Use sama5d4 UART port"
+
+config DEBUG_SAMA5D4_USART
+ bool "Use sama5d4 USART port"
+
+endchoice
+
+config DEBUG_SAMA5D4_UART_PORT
+ int "SAMA5D4 Debug UART/USART Port Selection" if DEBUG_AT91_UART
+ depends on AT91_DEBUG_LL_DBGU2
+ default 3 if DEBUG_SAMA5D4_USART
+ default 0 if DEBUG_SAMA5D4_UART
+ range 0 4 if DEBUG_SAMA5D4_USART
+ range 0 1 if DEBUG_SAMA5D4_UART
+ help
+ Choose USART port (0..4) on which kernel low-level debug messages
+ should be output.
+
config DEBUG_EXYNOS_UART
bool
*
*/
+#define SAMA5D4_UART_BASE(p) ((p) == 0 ? 0xf8004000 /* UART0 */ : \
+ ((p) == 1 ? 0cfc004000 /* UART1 */ : \
+ 0xf8004000))
+#define SAMA5D4_USART_BASE(p) ((p) == 0 ? 0xf802c000 /* USART0 */ : \
+ (p) == 1 ? 0xf8030000 /* USART1 */ : \
+ (p) == 2 ? 0xfc008000 /* USART2 */ : \
+ (p) == 3 ? 0xfc00c000 /* USART3 */ : \
+ (p) == 4 ? 0xfc010000 /* USART4 */ : \
+ 0xfc00c000)
+
#if defined(CONFIG_AT91_DEBUG_LL_DBGU0)
#define AT91_DBGU 0xfffff200 /* AT91_BASE_DBGU0 */
#elif defined(CONFIG_AT91_DEBUG_LL_DBGU1)
#define AT91_DBGU 0xffffee00 /* AT91_BASE_DBGU1 */
+#elif defined(CONFIG_DEBUG_SAMA5D4_USART)
+#if CONFIG_DEBUG_SAMA5D4_UART_PORT == 0
+#define AT91_DBGU 0xf802c000 /* USART0 */
+#elif CONFIG_DEBUG_SAMA5D4_UART_PORT == 1
+#define AT91_DBGU 0xf8030000 /* USART1 */
+#elif CONFIG_DEBUG_SAMA5D4_UART_PORT == 2
+#define AT91_DBGU 0xfc008000 /* USART2 */
+#elif CONFIG_DEBUG_SAMA5D4_UART_PORT == 3
+#define AT91_DBGU 0xfc00c000 /* USART3 */
+#elif CONFIG_DEBUG_SAMA5D4_UART_PORT == 4
+#define AT91_DBGU 0xfc010000 /* USART4 */
+#else
+#error Invalid SAMA5D4 Debug USART port selection
+#endif
+#elif defined(CONFIG_DEBUG_SAMA5D4_UART)
+#if CONFIG_DEBUG_SAMA5D4_UART_PORT == 0
+#define AT91_DBGU 0xf8004000 /* UART0 */
+#elif CONFIG_DEBUG_SAMA5D4_UART_PORT == 1
+#define AT91_DBGU 0cfc004000 /* UART1 */
+#else
+#error Invalid SAMA5D4 Debug UART port selection
+#endif
#else
-/* On sama5d4, use USART3 as low level serial console */
-#define AT91_DBGU 0xfc00c000 /* SAMA5D4_BASE_USART3 */
+#error Unsupported AT91 Debug UART selection
#endif
#ifdef CONFIG_MMU