ARM: imx6q: let users input debug uart port number
imx6q gets 5 uart ports in total. Different board design may choose different port as debug uart. For example, imx6q-sabresd uses UART1, imx6q-sabrelite uses UART2 and imx6q-arm2 uses UART4. Rather than bloating DEBUG_LL choice list with all these uart ports, the patch introduces DEBUG_IMX6Q_UART_PORT for users to input uart port number when DEBUG_IMX6Q_UART is selected inside DEBUG_LL choice. Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
This commit is contained in:
@@ -10,6 +10,20 @@
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
#define IMX6Q_UART1_BASE_ADDR 0x02020000
|
||||
#define IMX6Q_UART2_BASE_ADDR 0x021e8000
|
||||
#define IMX6Q_UART3_BASE_ADDR 0x021ec000
|
||||
#define IMX6Q_UART4_BASE_ADDR 0x021f0000
|
||||
#define IMX6Q_UART5_BASE_ADDR 0x021f4000
|
||||
|
||||
/*
|
||||
* IMX6Q_UART_BASE_ADDR is put in the middle to force the expansion
|
||||
* of IMX6Q_UART##n##_BASE_ADDR.
|
||||
*/
|
||||
#define IMX6Q_UART_BASE_ADDR(n) IMX6Q_UART##n##_BASE_ADDR
|
||||
#define IMX6Q_UART_BASE(n) IMX6Q_UART_BASE_ADDR(n)
|
||||
#define IMX6Q_DEBUG_UART_BASE IMX6Q_UART_BASE(CONFIG_DEBUG_IMX6Q_UART_PORT)
|
||||
|
||||
#ifdef CONFIG_DEBUG_IMX1_UART
|
||||
#define UART_PADDR 0x00206000
|
||||
#elif defined (CONFIG_DEBUG_IMX25_UART)
|
||||
@@ -22,10 +36,8 @@
|
||||
#define UART_PADDR 0x73fbc000
|
||||
#elif defined (CONFIG_DEBUG_IMX50_IMX53_UART)
|
||||
#define UART_PADDR 0x53fbc000
|
||||
#elif defined (CONFIG_DEBUG_IMX6Q_UART2)
|
||||
#define UART_PADDR 0x021e8000
|
||||
#elif defined (CONFIG_DEBUG_IMX6Q_UART4)
|
||||
#define UART_PADDR 0x021f0000
|
||||
#elif defined (CONFIG_DEBUG_IMX6Q_UART)
|
||||
#define UART_PADDR IMX6Q_DEBUG_UART_BASE
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user