mmc: fsl_esdhc: Migrate ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE to Kconfig
Subsystems (3)
PATCH 1/1 mmc: fsl_esdhc: Migrate ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE to Kconfig
The flag for enabling the ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE quirk can be handled easily enough in Kconfig. This lets us remove a function but not obviously correct usage of the IS_ENABLED() macro.
---
Cc: Peng Fan <[email protected]>
Cc: Jaehoon Chung <[email protected]>
Cc: Fabio Estevam <[email protected]>
--- arch/powerpc/include/asm/config_mpc85xx.h | 3 --- drivers/mmc/Kconfig | 6 ++++++ drivers/mmc/fsl_esdhc_imx.c | 8 +------- include/configs/imxrt1020-evk.h | 2 -- include/configs/imxrt1050-evk.h | 2 -- include/configs/imxrt1170-evk.h | 2 -- 6 files changed, 7 insertions(+), 16 deletions(-)
arch/powerpc/include/asm/config_mpc85xx.h +0 -3
@@ -133,7 +133,6 @@#define CFG_FM_PLAT_CLK_DIV 1#define CFG_SYS_FM1_CLK CFG_FM_PLAT_CLK_DIV#define CFG_SYS_FM_MURAM_SIZE 0x30000 -#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE #define QE_MURAM_SIZE 0x6000UL#define MAX_QE_RISC 1#define QE_NUM_OF_SNUM 28
@@ -146,7 +145,6 @@#define CFG_SYS_FM1_CLK 0#define CFG_QBMAN_CLK_DIV 1#define CFG_SYS_FM_MURAM_SIZE 0x30000 -#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE #define QE_MURAM_SIZE 0x6000UL#define MAX_QE_RISC 1#define QE_NUM_OF_SNUM 28
@@ -165,7 +163,6 @@#define CFG_SYS_PME_CLK CFG_PME_PLAT_CLK_DIV#define CFG_SYS_FM1_CLK 0#define CFG_SYS_FM_MURAM_SIZE 0x28000 -#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE #elif defined(CONFIG_ARCH_C29X )#define CFG_SYS_FSL_SEC_IDX_OFFSET 0x20000
drivers/mmc/Kconfig +6 -0
@@ -919,6 +919,12 @@ config ESDHC_DETECT_QUIRK bool "QIXIS-based eSDHC quirk detection" depends on FSL_ESDHC && FSL_QIXIS +config ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE + bool + depends on FSL_ESDHC || FSL_ESDHC_IMX + def_bool y if ARCH_T1024 || ARCH_T1040 || ARCH_T1042 || ARCH_T2080 \ + || FSL_ESDHC_IMX + config FSL_ESDHC_IMX bool "Freescale/NXP i.MX eSDHC controller support" help
drivers/mmc/fsl_esdhc_imx.c +1 -7
@@ -40,12 +40,6 @@#include <linux/iopoll.h> #include <linux/dma-mapping.h> -#ifndef ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE -#ifdef CONFIG_FSL_USDHC -#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 1 -#endif -#endif -DECLARE_GLOBAL_DATA_PTR ;#define SDHCI_IRQ_EN_BITS (IRQSTATEN_CC | IRQSTATEN_TC | \
@@ -376,7 +370,7 @@ static int esdhc_setup_data(struct fsl_esdhc_priv *priv, struct mmc *mmc, (timeout == 4 || timeout == 8 || timeout == 12)) timeout++; -if (IS_ENABLED (ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE )) +if (IS_ENABLED (CONFIG_ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE )) timeout =0xE ;esdhc_clrsetbits32 (®s->sysctl,SYSCTL_TIMEOUT_MASK , timeout <<16 );
include/configs/imxrt1020-evk.h +0 -2
@@ -9,8 +9,6 @@#include <asm/arch/imx-regs.h> -#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 1 -#define PHYS_SDRAM 0x80000000#define PHYS_SDRAM_SIZE (32 * 1024 * 1024)
include/configs/imxrt1050-evk.h +0 -2
@@ -9,8 +9,6 @@#include <asm/arch/imx-regs.h> -#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 1 -#define PHYS_SDRAM 0x80000000#define PHYS_SDRAM_SIZE (32 * 1024 * 1024)
include/configs/imxrt1170-evk.h +0 -2
@@ -10,8 +10,6 @@#include <asm/arch/imx-regs.h> -#define ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE 1 -/* * Configuration of the external SDRAM memory */
Signature · 1 line
2.43.0
Quoted 8 lines
Subject: [PATCH] mmc:
fsl_esdhc: MigrateESDHCI_QUIRK_BROKEN_TIMEOUT_VALUEtoKconfigThe flag for enabling the
ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUEquirk can be handled easily enough inKconfig. This lets us remove a function but not obviously correct usage of theIS_ENABLED()macro.Signed-off-by Tom Rini <[email protected]>
Fabio Estevam
reviewerQuoted 6 lines · Tom Rini
The flag for enabling the
ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUEquirk can be handled easily enough inKconfig. This lets us remove a function but not obviously correct usage of theIS_ENABLED()macro.Signed-off-by Tom Rini <[email protected]>
Applied to u-boot-imx/next, thanks.