[PATCH 3/5] ARM: board: warp: convert to DM_MMC
Jaehoon Chung
jh80.chung at samsung.com
Mon Apr 5 02:55:53 CEST 2021
On 4/3/21 3:05 AM, Peter Robinson wrote:
> Convert Warp to use DM MMC.
>
> Signed-off-by: Peter Robinson <pbrobinson at gmail.com>
> Cc: Otavio Salvador <otavio at ossystems.com.br>
> Cc: Fabio Estevam <fabio.estevam at nxp.com>
> Cc: Stefano Babic <sbabic at denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung at samsung.com>
Best Regards,
Jaehoon Chung
> ---
> arch/arm/dts/imx6sl-warp-u-boot.dtsi | 7 ++++++
> board/warp/warp.c | 33 ----------------------------
> configs/warp_defconfig | 1 +
> 3 files changed, 8 insertions(+), 33 deletions(-)
> create mode 100644 arch/arm/dts/imx6sl-warp-u-boot.dtsi
>
> diff --git a/arch/arm/dts/imx6sl-warp-u-boot.dtsi b/arch/arm/dts/imx6sl-warp-u-boot.dtsi
> new file mode 100644
> index 0000000000..daf2489cfd
> --- /dev/null
> +++ b/arch/arm/dts/imx6sl-warp-u-boot.dtsi
> @@ -0,0 +1,7 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +
> +/ {
> + aliases {
> + mmc0 = &usdhc2;
> + };
> +};
> diff --git a/board/warp/warp.c b/board/warp/warp.c
> index 0f1d038fab..417f0e7507 100644
> --- a/board/warp/warp.c
> +++ b/board/warp/warp.c
> @@ -21,9 +21,7 @@
> #include <linux/sizes.h>
> #include <common.h>
> #include <watchdog.h>
> -#include <fsl_esdhc_imx.h>
> #include <i2c.h>
> -#include <mmc.h>
> #include <usb.h>
> #include <power/pmic.h>
> #include <power/max77696_pmic.h>
> @@ -62,37 +60,6 @@ static void setup_iomux_uart(void)
> imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
> }
>
> -static struct fsl_esdhc_cfg usdhc_cfg[1] = {
> - {USDHC2_BASE_ADDR, 0, 0, 0, 1},
> -};
> -
> -int board_mmc_getcd(struct mmc *mmc)
> -{
> - return 1; /* Assume boot SD always present */
> -}
> -
> -int board_mmc_init(struct bd_info *bis)
> -{
> - static iomux_v3_cfg_t const usdhc2_pads[] = {
> - MX6_PAD_SD2_CLK__USDHC2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> - MX6_PAD_SD2_CMD__USDHC2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> - MX6_PAD_SD2_RST__USDHC2_RST | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> - MX6_PAD_SD2_DAT0__USDHC2_DAT0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> - MX6_PAD_SD2_DAT1__USDHC2_DAT1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> - MX6_PAD_SD2_DAT2__USDHC2_DAT2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> - MX6_PAD_SD2_DAT3__USDHC2_DAT3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> - MX6_PAD_SD2_DAT4__USDHC2_DAT4 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> - MX6_PAD_SD2_DAT5__USDHC2_DAT5 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> - MX6_PAD_SD2_DAT6__USDHC2_DAT6 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> - MX6_PAD_SD2_DAT7__USDHC2_DAT7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
> - };
> -
> - imx_iomux_v3_setup_multiple_pads(usdhc2_pads, ARRAY_SIZE(usdhc2_pads));
> -
> - usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC2_CLK);
> - return fsl_esdhc_initialize(bis, &usdhc_cfg[0]);
> -}
> -
> int board_usb_phy_mode(int port)
> {
> return USB_INIT_DEVICE;
> diff --git a/configs/warp_defconfig b/configs/warp_defconfig
> index 68ad71c27c..6efe400dd1 100644
> --- a/configs/warp_defconfig
> +++ b/configs/warp_defconfig
> @@ -39,6 +39,7 @@ CONFIG_DM=y
> CONFIG_DM_GPIO=y
> CONFIG_DFU_MMC=y
> CONFIG_SUPPORT_EMMC_BOOT=y
> +CONFIG_DM_MMC=y
> CONFIG_FSL_USDHC=y
> CONFIG_PINCTRL=y
> CONFIG_PINCTRL_IMX6=y
>
More information about the U-Boot
mailing list