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

2018-06-04 Thread Maxime Ripard
Hi,

On Fri, Jun 01, 2018 at 06:28:37PM -0700, Vasily Khoruzhick wrote:
> That is necessary for using automatic calibration on A64 eMMC.
> 
> Signed-off-by: Vasily khoruzhick 
> ---
>  arch/arm/mach-sunxi/Kconfig | 1 +
>  drivers/mmc/sunxi_mmc.c | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> index 66fb094ac5..8a35033d1f 100644
> --- a/arch/arm/mach-sunxi/Kconfig
> +++ b/arch/arm/mach-sunxi/Kconfig
> @@ -257,6 +257,7 @@ config MACH_SUN50I
>   select SUNXI_GEN_SUN6I
>   select SUN6I_PRCM
>   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..34739c98b9 100644
> --- a/drivers/mmc/sunxi_mmc.c
> +++ b/drivers/mmc/sunxi_mmc.c
> @@ -166,7 +166,9 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, 
> unsigned int hz)
>  
>   if (new_mode) {
>  #ifdef CONFIG_MMC_SUNXI_HAS_NEW_MODE
> +#ifndef CONFIG_MACH_SUN50I

Didn't we agree on introducing another Kconfig option here?

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com


signature.asc
Description: PGP signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


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

2018-06-01 Thread Vasily Khoruzhick
That is necessary for using automatic calibration on A64 eMMC.

Signed-off-by: Vasily khoruzhick 
---
 arch/arm/mach-sunxi/Kconfig | 1 +
 drivers/mmc/sunxi_mmc.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index 66fb094ac5..8a35033d1f 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -257,6 +257,7 @@ config MACH_SUN50I
select SUNXI_GEN_SUN6I
select SUN6I_PRCM
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..34739c98b9 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -166,7 +166,9 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, 
unsigned int hz)
 
if (new_mode) {
 #ifdef CONFIG_MMC_SUNXI_HAS_NEW_MODE
+#ifndef CONFIG_MACH_SUN50I
val = CCM_MMC_CTRL_MODE_SEL_NEW;
+#endif
setbits_le32(>reg->ntsr, SUNXI_MMC_NTSR_MODE_SEL_NEW);
 #endif
} else {
-- 
2.17.1

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot