diff options
author | Patrice Chotard <patrice.chotard@st.com> | 2018-01-18 09:34:21 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-01-18 12:14:45 -0500 |
commit | 2a9d6c8060894ce06855b09d62be64110e48f27e (patch) | |
tree | df38cb28bdeebd6744072a539022f592e805a35f | |
parent | f9bb304ce855fad615c5adffae5e129941ff0b48 (diff) |
mmc: mmci: Add STM32 variant
STM32F4 and STM32F7 MCUs has a SDIO controller that looks like
an ARM PL810.
This patch adds the STM32 variant so that mmci driver supports it.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/mmci.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index f8a21f3c3b51..6246eaada750 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -244,6 +244,23 @@ static struct variant_data variant_ux500v2 = { | |||
244 | .opendrain = MCI_OD, | 244 | .opendrain = MCI_OD, |
245 | }; | 245 | }; |
246 | 246 | ||
247 | static struct variant_data variant_stm32 = { | ||
248 | .fifosize = 32 * 4, | ||
249 | .fifohalfsize = 8 * 4, | ||
250 | .clkreg = MCI_CLK_ENABLE, | ||
251 | .clkreg_enable = MCI_ST_UX500_HWFCEN, | ||
252 | .clkreg_8bit_bus_enable = MCI_ST_8BIT_BUS, | ||
253 | .clkreg_neg_edge_enable = MCI_ST_UX500_NEG_EDGE, | ||
254 | .datalength_bits = 24, | ||
255 | .datactrl_mask_sdio = MCI_DPSM_ST_SDIOEN, | ||
256 | .st_sdio = true, | ||
257 | .st_clkdiv = true, | ||
258 | .pwrreg_powerup = MCI_PWR_ON, | ||
259 | .f_max = 48000000, | ||
260 | .pwrreg_clkgate = true, | ||
261 | .pwrreg_nopower = true, | ||
262 | }; | ||
263 | |||
247 | static struct variant_data variant_qcom = { | 264 | static struct variant_data variant_qcom = { |
248 | .fifosize = 16 * 4, | 265 | .fifosize = 16 * 4, |
249 | .fifohalfsize = 8 * 4, | 266 | .fifohalfsize = 8 * 4, |
@@ -2021,6 +2038,11 @@ static const struct amba_id mmci_ids[] = { | |||
2021 | .mask = 0xf0ffffff, | 2038 | .mask = 0xf0ffffff, |
2022 | .data = &variant_ux500v2, | 2039 | .data = &variant_ux500v2, |
2023 | }, | 2040 | }, |
2041 | { | ||
2042 | .id = 0x00880180, | ||
2043 | .mask = 0x00ffffff, | ||
2044 | .data = &variant_stm32, | ||
2045 | }, | ||
2024 | /* Qualcomm variants */ | 2046 | /* Qualcomm variants */ |
2025 | { | 2047 | { |
2026 | .id = 0x00051180, | 2048 | .id = 0x00051180, |