sunxi-mmc: introduce new MMC_SUNXI_HAS_MODE_SWITCH option
Allwinner A64 has new mode but doesn't have a mode switch in CCM, and CCM_MMC_CTRL_MODE_SEL_NEW is not defined, so compilation fails if MMC_SUNXI_HAS_NEW_MODE is enabled Introduce new MMC_SUNXI_HAS_MODE_SWITCH option to be able to ifdef usage of CCM_MMC_CTRL_MODE_SEL_NEW Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Reviewed-by: Jagan Teki <jagan@openedev.com> [jagan: update commit message] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com> # Amarula A64-Relic
This commit is contained in:
committed by
Jagan Teki
parent
a3e1653dde
commit
2a8882ecef
@@ -230,6 +230,7 @@ config MACH_SUN8I_A83T
|
|||||||
select PHY_SUN4I_USB
|
select PHY_SUN4I_USB
|
||||||
select SUNXI_GEN_SUN6I
|
select SUNXI_GEN_SUN6I
|
||||||
select MMC_SUNXI_HAS_NEW_MODE
|
select MMC_SUNXI_HAS_NEW_MODE
|
||||||
|
select MMC_SUNXI_HAS_MODE_SWITCH
|
||||||
select SUPPORT_SPL
|
select SUPPORT_SPL
|
||||||
|
|
||||||
config MACH_SUN8I_H3
|
config MACH_SUN8I_H3
|
||||||
|
|||||||
@@ -569,6 +569,10 @@ config MMC_SUNXI_HAS_NEW_MODE
|
|||||||
bool
|
bool
|
||||||
depends on MMC_SUNXI
|
depends on MMC_SUNXI
|
||||||
|
|
||||||
|
config MMC_SUNXI_HAS_MODE_SWITCH
|
||||||
|
bool
|
||||||
|
depends on MMC_SUNXI
|
||||||
|
|
||||||
config GENERIC_ATMEL_MCI
|
config GENERIC_ATMEL_MCI
|
||||||
bool "Atmel Multimedia Card Interface support"
|
bool "Atmel Multimedia Card Interface support"
|
||||||
depends on DM_MMC && BLK && ARCH_AT91
|
depends on DM_MMC && BLK && ARCH_AT91
|
||||||
|
|||||||
@@ -176,7 +176,9 @@ static int mmc_set_mod_clk(struct sunxi_mmc_priv *priv, unsigned int hz)
|
|||||||
|
|
||||||
if (new_mode) {
|
if (new_mode) {
|
||||||
#ifdef CONFIG_MMC_SUNXI_HAS_NEW_MODE
|
#ifdef CONFIG_MMC_SUNXI_HAS_NEW_MODE
|
||||||
|
#ifdef CONFIG_MMC_SUNXI_HAS_MODE_SWITCH
|
||||||
val = CCM_MMC_CTRL_MODE_SEL_NEW;
|
val = CCM_MMC_CTRL_MODE_SEL_NEW;
|
||||||
|
#endif
|
||||||
setbits_le32(&priv->reg->ntsr, SUNXI_MMC_NTSR_MODE_SEL_NEW);
|
setbits_le32(&priv->reg->ntsr, SUNXI_MMC_NTSR_MODE_SEL_NEW);
|
||||||
#endif
|
#endif
|
||||||
} else if (!calibrate) {
|
} else if (!calibrate) {
|
||||||
|
|||||||
Reference in New Issue
Block a user