[U-Boot] [PATCH 1/2] sunxi-mmc: use new mode on A64
Maxime Ripard
maxime.ripard at bootlin.com
Wed May 2 12:04:49 UTC 2018
Hi,
On Sat, Apr 28, 2018 at 02:16:27PM -0700, Vasily Khoruzhick 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 | 4 ++++
> 2 files changed, 5 insertions(+)
>
> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> index b868f0e350..774a39f580 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 df6f32850e..06b0fd491c 100644
> --- a/drivers/mmc/sunxi_mmc.c
> +++ b/drivers/mmc/sunxi_mmc.c
> @@ -167,8 +167,12 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz)
>
> if (new_mode) {
> #ifdef CONFIG_MMC_SUNXI_HAS_NEW_MODE
> +#ifdef CONFIG_MACH_SUN50I
> + val = 0;
> +#else
> val = CCM_MMC_CTRL_MODE_SEL_NEW;
> setbits_le32(&priv->reg->ntsr, SUNXI_MMC_NTSR_MODE_SEL_NEW);
> +#endif
Maybe we just can have #ifdef CONFIG_MMC_SUNXI_HAS_NEW_MODE && !CONFIG_MACH_SUN50I ?
Thanks!
maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180502/fd5184a5/attachment.sig>
More information about the U-Boot
mailing list