More Layerscape specifics are about to come. Instead of adding a specific quirk flag for each of them, rename the ESDHC_FLAG_CACHE_SNOOPING flag to ESDHC_FLAG_LAYERSCAPE to get a common layerscape flag. >From looking at the Kernel driver it seems we can use these flag for the modern Layerscape SoCs, we would have to revisit this once we support LS1012. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- drivers/mci/imx-esdhc.c | 4 ++-- drivers/mci/imx-esdhc.h | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/mci/imx-esdhc.c b/drivers/mci/imx-esdhc.c index f30a791fa4..90a6c12439 100644 --- a/drivers/mci/imx-esdhc.c +++ b/drivers/mci/imx-esdhc.c @@ -232,7 +232,7 @@ static int esdhc_init(struct mci_host *mci, struct device *dev) sdhci_write32(&host->sdhci, SDHCI_MMC_BOOT, 0); /* Enable cache snooping */ - if (host->socdata->flags & ESDHC_FLAG_CACHE_SNOOPING) + if (esdhc_is_layerscape(host)) esdhc_setbits32(host, ESDHC_DMA_SYSCTL, ESDHC_SYSCTL_DMA_SNOOP); /* Set the initial clock speed */ @@ -377,7 +377,7 @@ static struct esdhc_soc_data usdhc_imx6sx_data = { static struct esdhc_soc_data esdhc_ls_data = { .flags = ESDHC_FLAG_MULTIBLK_NO_INT | ESDHC_FLAG_BIGENDIAN | - ESDHC_FLAG_CACHE_SNOOPING, + ESDHC_FLAG_LAYERSCAPE, }; static __maybe_unused struct of_device_id fsl_esdhc_compatible[] = { diff --git a/drivers/mci/imx-esdhc.h b/drivers/mci/imx-esdhc.h index b14039757a..6810039a96 100644 --- a/drivers/mci/imx-esdhc.h +++ b/drivers/mci/imx-esdhc.h @@ -103,8 +103,8 @@ #define ESDHC_FLAG_HS400 BIT(9) /* Need to access registers in bigendian mode */ #define ESDHC_FLAG_BIGENDIAN BIT(10) -/* Enable cache snooping */ -#define ESDHC_FLAG_CACHE_SNOOPING BIT(11) +/* Layerscape variant ls1046a, ls1028a, ls1088a, revisit for ls1012a */ +#define ESDHC_FLAG_LAYERSCAPE BIT(11) struct esdhc_soc_data { u32 flags; @@ -124,6 +124,11 @@ static inline int esdhc_is_usdhc(struct fsl_esdhc_host *data) return !!(data->socdata->flags & ESDHC_FLAG_USDHC); } +static inline int esdhc_is_layerscape(struct fsl_esdhc_host *data) +{ + return !!(data->socdata->flags & ESDHC_FLAG_LAYERSCAPE); +} + static inline struct fsl_esdhc_host *sdhci_to_esdhc(struct sdhci *sdhci) { return container_of(sdhci, struct fsl_esdhc_host, sdhci); -- 2.39.2