[U-Boot] [PATCH] board/fsl/lx2160ardb: enable flexcan

Bin Meng bmeng.cn at gmail.com
Wed Jul 10 05:54:54 UTC 2019


On Wed, Jul 10, 2019 at 1:50 PM Pankaj Bansal <pankaj.bansal at nxp.com> wrote:
>
> Flexcan in LX2160ARDB is controlled by FPGA register boardcfg4
> bit 5. enable this bit so that flexcan is enabled in LX2160ARDB.
>
> Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
> ---
>  board/freescale/lx2160a/lx2160a.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c
> index 3b4cb86692..8eac576ab5 100644
> --- a/board/freescale/lx2160a/lx2160a.c
> +++ b/board/freescale/lx2160a/lx2160a.c
> @@ -402,6 +402,20 @@ int config_board_mux(void)
>
>         return 0;
>  }
> +#elif defined(CONFIG_TARGET_LX2160ARDB)
> +int config_board_mux(void)
> +{
> +       u8 brdcfg;
> +
> +       // Read BRDCFG4 Register @ 0x54 offset

The // is not allowed

> +       brdcfg = QIXIS_READ(brdcfg[4]);
> +       // Enable CFG_CAN_EN_B bit BRDCFG4[5]

ditto

> +       brdcfg |= BIT_MASK(5);
> +       // Write new configuration

ditto

> +       QIXIS_WRITE(brdcfg[4], brdcfg);
> +
> +       return 0;
> +}

Regards,
Bin


More information about the U-Boot mailing list