[U-Boot] [PATCH v2 1/2] sunxi-mmc: use new mode on A64

Jagan Teki jagannadh.teki at gmail.com
Sun May 27 18:43:19 UTC 2018


On Mon, May 14, 2018 at 8:57 PM, Vasily Khoruzhick <anarsoul at gmail.com> wrote:
> That is necessary for using automatic calibration on A64 eMMC.
>
> Signed-off-by: Vasily khoruzhick <anarsoul at gmail.com>
> ---
>  arch/arm/mach-sunxi/Kconfig | 1 +
>  drivers/mmc/sunxi_mmc.c     | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> index f0c9d1b058..376380e977 100644
> --- a/arch/arm/mach-sunxi/Kconfig
> +++ b/arch/arm/mach-sunxi/Kconfig
> @@ -256,6 +256,7 @@ config MACH_SUN50I
>         select SUNXI_DE2
>         select SUNXI_GEN_SUN6I
>         select SUNXI_HIGH_SRAM
> +       select MMC_SUNXI_HAS_NEW_MODE
>         select SUPPORT_SPL
>         select SUNXI_DRAM_DW
>         select SUNXI_DRAM_DW_32BIT
> diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
> index fe6d82c7b4..65d88ee921 100644
> --- a/drivers/mmc/sunxi_mmc.c
> +++ b/drivers/mmc/sunxi_mmc.c
> @@ -165,7 +165,7 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz)
>         }
>
>         if (new_mode) {
> -#ifdef CONFIG_MMC_SUNXI_HAS_NEW_MODE
> +#if defined(CONFIG_MMC_SUNXI_HAS_NEW_MODE) && !defined(CONFIG_MACH_SUN50I)
>                 val = CCM_MMC_CTRL_MODE_SEL_NEW;

This is breaking eMMC boot on A64

U-Boot SPL 2018.05-00431-gf4fcaa5f15 (May 27 2018 - 23:59:42 +0530)
DRAM: 1024 MiB
Trying to boot from MMC2
unable to select a mode
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###


More information about the U-Boot mailing list