]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mmc: mmci: Add a reference at mmc_host_ops in mmci struct
authorLudovic Barre <ludovic.barre@st.com>
Tue, 28 Jan 2020 09:06:30 +0000 (10:06 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Mar 2020 13:35:40 +0000 (14:35 +0100)
The variant init function may need to add a mmc_host_ops, for example to
add the execute_tuning support if this feature is available. This patch
adds mmc_host_ops pointer in mmci struct.

Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
Link: https://lore.kernel.org/r/20200128090636.13689-4-ludovic.barre@st.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mmci.c
drivers/mmc/host/mmci.h

index e9ffce8d41ea072bf6a2c792353401fc364fd0e2..d0a041c9e6cd1a14472001999ca85995b1d64069 100644 (file)
@@ -1933,6 +1933,8 @@ static int mmci_probe(struct amba_device *dev,
 
        host = mmc_priv(mmc);
        host->mmc = mmc;
+       host->mmc_ops = &mmci_ops;
+       mmc->ops = &mmci_ops;
 
        /*
         * Some variant (STM32) doesn't have opendrain bit, nevertheless
@@ -2072,8 +2074,6 @@ static int mmci_probe(struct amba_device *dev,
        host->stop_abort.arg = 0;
        host->stop_abort.flags = MMC_RSP_R1B | MMC_CMD_AC;
 
-       mmc->ops = &mmci_ops;
-
        /* We support these PM capabilities. */
        mmc->pm_caps |= MMC_PM_KEEP_POWER;
 
index ea6a0b5779d4522f10fb998316e98838f86c11a8..55acc0971a4441cc5be2ce7d01e84bc04025b308 100644 (file)
@@ -407,6 +407,7 @@ struct mmci_host {
        u32                     mask1_reg;
        u8                      vqmmc_enabled:1;
        struct mmci_platform_data *plat;
+       struct mmc_host_ops     *mmc_ops;
        struct mmci_host_ops    *ops;
        struct variant_data     *variant;
        struct pinctrl          *pinctrl;