diff options
author | Yann Gautier <yann.gautier@foss.st.com> | 2023-06-19 13:51:16 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2023-06-20 11:44:40 +0200 |
commit | 88167e6c2e8e5d99f83a4d1d466e1d9c35c8f596 (patch) | |
tree | 23ecb913ad656051ebb4e7725b7f37d7cb7eb24a /drivers/mmc/host/mmci_stm32_sdmmc.c | |
parent | 1f9f2cf3145e67dc5bbc0ac25b52bfa11b17a882 (diff) |
mmc: mmci: add stm32_idmabsize_align parameter
The alignment for the IDMA size depends on the peripheral version, it
should then be configurable. Add stm32_idmabsize_align in the variant
structure.
And remove now unused (and wrong) MMCI_STM32_IDMABNDT_* macros.
Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Link: https://lore.kernel.org/r/20230619115120.64474-3-yann.gautier@foss.st.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/mmci_stm32_sdmmc.c')
-rw-r--r-- | drivers/mmc/host/mmci_stm32_sdmmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/host/mmci_stm32_sdmmc.c b/drivers/mmc/host/mmci_stm32_sdmmc.c index 953d1be4e379..1bc775b9e714 100644 --- a/drivers/mmc/host/mmci_stm32_sdmmc.c +++ b/drivers/mmc/host/mmci_stm32_sdmmc.c @@ -15,7 +15,6 @@ #include "mmci.h" #define SDMMC_LLI_BUF_LEN PAGE_SIZE -#define SDMMC_IDMA_BURST BIT(MMCI_STM32_IDMABNDT_SHIFT) #define DLYB_CR 0x0 #define DLYB_CR_DEN BIT(0) @@ -69,7 +68,8 @@ static int sdmmc_idma_validate_data(struct mmci_host *host, idma->use_bounce_buffer = false; for_each_sg(data->sg, sg, data->sg_len - 1, i) { if (!IS_ALIGNED(sg->offset, sizeof(u32)) || - !IS_ALIGNED(sg->length, SDMMC_IDMA_BURST)) { + !IS_ALIGNED(sg->length, + host->variant->stm32_idmabsize_align)) { dev_dbg(mmc_dev(host->mmc), "unaligned scatterlist: ofst:%x length:%d\n", data->sg->offset, data->sg->length); |