[PATCH 04/11] imx: mx6ull/z_14x14_evk: clean up UART iomux
Peter Robinson
pbrobinson at gmail.com
Mon Nov 14 21:13:15 CET 2022
On Mon, Nov 7, 2022 at 7:14 AM Peng Fan (OSS) <peng.fan at oss.nxp.com> wrote:
>
> From: Peng Fan <peng.fan at nxp.com>
>
> After DM_SERIAL, and set pinctrl_uart1 as pre-reloc, no need initialize
> iomux at board file.
>
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> ---
> arch/arm/dts/imx6ull-14x14-evk-u-boot.dtsi | 8 ++++++++
> arch/arm/dts/imx6ulz-14x14-evk-u-boot.dtsi | 8 ++++++++
> board/freescale/mx6ullevk/mx6ullevk.c | 16 ----------------
> 3 files changed, 16 insertions(+), 16 deletions(-)
> create mode 100644 arch/arm/dts/imx6ull-14x14-evk-u-boot.dtsi
> create mode 100644 arch/arm/dts/imx6ulz-14x14-evk-u-boot.dtsi
>
> diff --git a/arch/arm/dts/imx6ull-14x14-evk-u-boot.dtsi b/arch/arm/dts/imx6ull-14x14-evk-u-boot.dtsi
> new file mode 100644
> index 00000000000..d283e815e6a
> --- /dev/null
> +++ b/arch/arm/dts/imx6ull-14x14-evk-u-boot.dtsi
> @@ -0,0 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright 2022 NXP
> + */
> +
> +&pinctrl_uart1 {
> + u-boot,dm-pre-reloc;
> +};
> diff --git a/arch/arm/dts/imx6ulz-14x14-evk-u-boot.dtsi b/arch/arm/dts/imx6ulz-14x14-evk-u-boot.dtsi
> new file mode 100644
> index 00000000000..d283e815e6a
> --- /dev/null
> +++ b/arch/arm/dts/imx6ulz-14x14-evk-u-boot.dtsi
> @@ -0,0 +1,8 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright 2022 NXP
> + */
> +
> +&pinctrl_uart1 {
> + u-boot,dm-pre-reloc;
> +};
> diff --git a/board/freescale/mx6ullevk/mx6ullevk.c b/board/freescale/mx6ullevk/mx6ullevk.c
> index 86c11c7bd3a..87bdbe51c6d 100644
> --- a/board/freescale/mx6ullevk/mx6ullevk.c
> +++ b/board/freescale/mx6ullevk/mx6ullevk.c
> @@ -24,10 +24,6 @@
>
> DECLARE_GLOBAL_DATA_PTR;
>
> -#define UART_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
> - PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \
> - PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS)
> -
> int dram_init(void)
> {
> gd->ram_size = imx_ddr_size();
> @@ -35,16 +31,6 @@ int dram_init(void)
> return 0;
> }
>
> -static iomux_v3_cfg_t const uart1_pads[] = {
> - MX6_PAD_UART1_TX_DATA__UART1_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
> - MX6_PAD_UART1_RX_DATA__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
> -};
> -
> -static void setup_iomux_uart(void)
> -{
> - imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
> -}
> -
> int board_mmc_get_env_dev(int devno)
> {
> return devno;
> @@ -57,8 +43,6 @@ int mmc_map_to_kernel_blk(int devno)
>
> int board_early_init_f(void)
> {
> - setup_iomux_uart();
> -
> return 0;
> }
Can you not just drop the entire board_early_init_f function and also
the matching CONFIG_BOARD_EARLY_INIT_F=y option too?
More information about the U-Boot
mailing list