]> git.sur5r.net Git - u-boot/commitdiff
armv8/ls1043aqds: Select lpuart pins of various muxes
authorShaohui Xie <Shaohui.Xie@freescale.com>
Thu, 21 Jan 2016 09:14:53 +0000 (17:14 +0800)
committerYork Sun <york.sun@nxp.com>
Wed, 27 Jan 2016 16:13:12 +0000 (08:13 -0800)
Set Board Configuration Register to select the lpuart pins of various
muxes.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: York Sun <york.sun@nxp.com>
board/freescale/ls1043aqds/ls1043aqds.c

index 576fa46226268992c57e6cfd3d6e5312e15101cf..bb1444740956260c63501722acec0dae3dac2057 100644 (file)
@@ -40,6 +40,9 @@ enum {
 #define CFG_SD_MUX3_MUX4       0x1 /* MUX4 */
 #define CFG_SD_MUX4_SLOT3      0x0 /* SLOT3 TX/RX1 */
 #define CFG_SD_MUX4_SLOT1      0x1 /* SLOT1 TX/RX3 */
+#define CFG_UART_MUX_MASK      0x6
+#define CFG_UART_MUX_SHIFT     1
+#define CFG_LPUART_EN          0x1
 
 int checkboard(void)
 {
@@ -218,7 +221,17 @@ void board_retimer_init(void)
 
 int board_early_init_f(void)
 {
+#ifdef CONFIG_LPUART
+       u8 uart;
+#endif
        fsl_lsch2_early_init_f();
+#ifdef CONFIG_LPUART
+       /* We use lpuart0 as system console */
+       uart = QIXIS_READ(brdcfg[14]);
+       uart &= ~CFG_UART_MUX_MASK;
+       uart |= CFG_LPUART_EN << CFG_UART_MUX_SHIFT;
+       QIXIS_WRITE(brdcfg[14], uart);
+#endif
 
        return 0;
 }