[U-Boot] [PATCH 1/4] armv8/ls1043aqds: added lpuart support
Mingkai Hu
mingkai.hu at nxp.com
Tue Jan 19 08:03:26 CET 2016
> -----Original Message-----
> From: Wenbin Song [mailto:wenbin.song at nxp.com]
> Sent: Tuesday, January 19, 2016 2:48 PM
> To: yorksun at freescale.com; Mingkai Hu; Qianyu Gong; Shaohui Xie; Wenbin
> Song; u-boot at lists.denx.de
> Subject: [PATCH 1/4] armv8/ls1043aqds: added lpuart support
>
> From: Shaohui Xie <shaohui.xie at nxp.com>
>
> Signed-off-by: Shaohui Xie <shaohui.xie at nxp.com>
> Signed-off-by: Mingkai Hu <mingkai.hu at nxp.com>
> ---
> board/freescale/ls1043aqds/ls1043aqds.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/board/freescale/ls1043aqds/ls1043aqds.c
> b/board/freescale/ls1043aqds/ls1043aqds.c
> index d6696ca..1da3fe1 100644
> --- a/board/freescale/ls1043aqds/ls1043aqds.c
> +++ b/board/freescale/ls1043aqds/ls1043aqds.c
> @@ -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,19 @@ 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
> + /*FIXME: need to check which lpuart is enabled in rcw, for now
> + * we use lpuart1.
> + */
> + uart = QIXIS_READ(brdcfg[14]);
> + uart &= ~CFG_UART_MUX_MASK;
> + uart |= CFG_LPUART_EN << CFG_UART_MUX_SHIFT;
> + QIXIS_WRITE(brdcfg[14], uart);
> +#endif
>
Please use the RCW to check which LPUART is enabled.
Thanks,
Mingkai
More information about the U-Boot
mailing list