aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/host/mmci.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index c85b0d8ee727..370cd5ad111c 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -67,6 +67,7 @@ static unsigned int fmax = 515633;
67 * @blksz_datactrl16: true if Block size is at b16..b30 position in datactrl register 67 * @blksz_datactrl16: true if Block size is at b16..b30 position in datactrl register
68 * @blksz_datactrl4: true if Block size is at b4..b16 position in datactrl 68 * @blksz_datactrl4: true if Block size is at b4..b16 position in datactrl
69 * register 69 * register
70 * @datactrl_mask_sdio: SDIO enable mask in datactrl register
70 * @pwrreg_powerup: power up value for MMCIPOWER register 71 * @pwrreg_powerup: power up value for MMCIPOWER register
71 * @f_max: maximum clk frequency supported by the controller. 72 * @f_max: maximum clk frequency supported by the controller.
72 * @signal_direction: input/out direction of bus signals can be indicated 73 * @signal_direction: input/out direction of bus signals can be indicated
@@ -88,6 +89,7 @@ struct variant_data {
88 unsigned int fifohalfsize; 89 unsigned int fifohalfsize;
89 unsigned int data_cmd_enable; 90 unsigned int data_cmd_enable;
90 unsigned int datactrl_mask_ddrmode; 91 unsigned int datactrl_mask_ddrmode;
92 unsigned int datactrl_mask_sdio;
91 bool sdio; 93 bool sdio;
92 bool st_clkdiv; 94 bool st_clkdiv;
93 bool blksz_datactrl16; 95 bool blksz_datactrl16;
@@ -136,6 +138,7 @@ static struct variant_data variant_u300 = {
136 .clkreg_enable = MCI_ST_U300_HWFCEN, 138 .clkreg_enable = MCI_ST_U300_HWFCEN,
137 .clkreg_8bit_bus_enable = MCI_ST_8BIT_BUS, 139 .clkreg_8bit_bus_enable = MCI_ST_8BIT_BUS,
138 .datalength_bits = 16, 140 .datalength_bits = 16,
141 .datactrl_mask_sdio = MCI_ST_DPSM_SDIOEN,
139 .sdio = true, 142 .sdio = true,
140 .pwrreg_powerup = MCI_PWR_ON, 143 .pwrreg_powerup = MCI_PWR_ON,
141 .f_max = 100000000, 144 .f_max = 100000000,
@@ -149,6 +152,7 @@ static struct variant_data variant_nomadik = {
149 .fifohalfsize = 8 * 4, 152 .fifohalfsize = 8 * 4,
150 .clkreg = MCI_CLK_ENABLE, 153 .clkreg = MCI_CLK_ENABLE,
151 .datalength_bits = 24, 154 .datalength_bits = 24,
155 .datactrl_mask_sdio = MCI_ST_DPSM_SDIOEN,
152 .sdio = true, 156 .sdio = true,
153 .st_clkdiv = true, 157 .st_clkdiv = true,
154 .pwrreg_powerup = MCI_PWR_ON, 158 .pwrreg_powerup = MCI_PWR_ON,
@@ -166,6 +170,7 @@ static struct variant_data variant_ux500 = {
166 .clkreg_8bit_bus_enable = MCI_ST_8BIT_BUS, 170 .clkreg_8bit_bus_enable = MCI_ST_8BIT_BUS,
167 .clkreg_neg_edge_enable = MCI_ST_UX500_NEG_EDGE, 171 .clkreg_neg_edge_enable = MCI_ST_UX500_NEG_EDGE,
168 .datalength_bits = 24, 172 .datalength_bits = 24,
173 .datactrl_mask_sdio = MCI_ST_DPSM_SDIOEN,
169 .sdio = true, 174 .sdio = true,
170 .st_clkdiv = true, 175 .st_clkdiv = true,
171 .pwrreg_powerup = MCI_PWR_ON, 176 .pwrreg_powerup = MCI_PWR_ON,
@@ -185,6 +190,7 @@ static struct variant_data variant_ux500v2 = {
185 .clkreg_neg_edge_enable = MCI_ST_UX500_NEG_EDGE, 190 .clkreg_neg_edge_enable = MCI_ST_UX500_NEG_EDGE,
186 .datactrl_mask_ddrmode = MCI_ST_DPSM_DDRMODE, 191 .datactrl_mask_ddrmode = MCI_ST_DPSM_DDRMODE,
187 .datalength_bits = 24, 192 .datalength_bits = 24,
193 .datactrl_mask_sdio = MCI_ST_DPSM_SDIOEN,
188 .sdio = true, 194 .sdio = true,
189 .st_clkdiv = true, 195 .st_clkdiv = true,
190 .blksz_datactrl16 = true, 196 .blksz_datactrl16 = true,
@@ -808,16 +814,10 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data)
808 if (data->flags & MMC_DATA_READ) 814 if (data->flags & MMC_DATA_READ)
809 datactrl |= MCI_DPSM_DIRECTION; 815 datactrl |= MCI_DPSM_DIRECTION;
810 816
811 /* The ST Micro variants has a special bit to enable SDIO */
812 if (variant->sdio && host->mmc->card) 817 if (variant->sdio && host->mmc->card)
813 if (mmc_card_sdio(host->mmc->card)) { 818 if (mmc_card_sdio(host->mmc->card)) {
814 /*
815 * The ST Micro variants has a special bit
816 * to enable SDIO.
817 */
818 u32 clk; 819 u32 clk;
819 820 datactrl |= variant->datactrl_mask_sdio;
820 datactrl |= MCI_ST_DPSM_SDIOEN;
821 821
822 /* 822 /*
823 * The ST Micro variant for SDIO small write transfers 823 * The ST Micro variant for SDIO small write transfers