mmc: renesas_sdhi: make quirks info accessible outside probe()
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 3 Dec 2019 20:05:11 +0000 (21:05 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 16 Dec 2019 11:29:36 +0000 (12:29 +0100)
We will need that for a later patch.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20191203200513.1758-4-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/renesas_sdhi.h
drivers/mmc/host/renesas_sdhi_core.c

index c0504aa908575f427d59e48fb0d816b36cafe550..88d05a617d4323cbbd8a91ceae37bf90e7e8def8 100644 (file)
@@ -33,6 +33,11 @@ struct renesas_sdhi_of_data {
        unsigned short max_segs;
 };
 
+struct renesas_sdhi_quirks {
+       bool hs400_disabled;
+       bool hs400_4taps;
+};
+
 struct tmio_mmc_dma {
        enum dma_slave_buswidth dma_buswidth;
        bool (*filter)(struct dma_chan *chan, void *arg);
@@ -46,6 +51,7 @@ struct renesas_sdhi {
        struct clk *clk_cd;
        struct tmio_mmc_data mmc_data;
        struct tmio_mmc_dma dma_priv;
+       const struct renesas_sdhi_quirks *quirks;
        struct pinctrl *pinctrl;
        struct pinctrl_state *pins_default, *pins_uhs;
        void __iomem *scc_ctl;
index 4094526c3dfd5e4da42f98368ceac5943990e2d1..2c743429e1e34505863d84ff5e418f6910d49275 100644 (file)
 #define SDHI_VER_GEN3_SD       0xcc10
 #define SDHI_VER_GEN3_SDMMC    0xcd10
 
-struct renesas_sdhi_quirks {
-       bool hs400_disabled;
-       bool hs400_4taps;
-};
-
 static void renesas_sdhi_sdbuf_width(struct tmio_mmc_host *host, int width)
 {
        u32 val;
@@ -665,6 +660,7 @@ int renesas_sdhi_probe(struct platform_device *pdev,
        if (!priv)
                return -ENOMEM;
 
+       priv->quirks = quirks;
        mmc_data = &priv->mmc_data;
        dma_priv = &priv->dma_priv;