]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mmc: renesas_sdhi_internal_dmac: Fix DMA buffer alignment from 8 to 128-bytes
authorTakeshi Saito <takeshi.saito.xv@renesas.com>
Wed, 16 Dec 2020 10:29:31 +0000 (19:29 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 08:39:45 +0000 (09:39 +0100)
[ Upstream commit d7aefb2887601cf1fc3f86f55d43b2c9aece5e8f ]

According to the latest datasheet, the internal DMAC buffer alignment
R-Car Gen3 SDHI HW should be 128-bytes. So, fix it.

Signed-off-by: Takeshi Saito <takeshi.saito.xv@renesas.com>
[shimoda: revise commit description, rebase]
Fixes: 2a68ea7896e3 ("mmc: renesas-sdhi: add support for R-Car Gen3 SDHI DMAC")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/1608114572-1892-2-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/renesas_sdhi_internal_dmac.c

index 74eea8247490d8876352835ba191f6b0667fc1fb..6e2685c9e9cb5a04df51dcbfd37fd0f5cbee2adf 100644 (file)
@@ -180,8 +180,8 @@ renesas_sdhi_internal_dmac_start_dma(struct tmio_mmc_host *host,
                        mmc_get_dma_dir(data)))
                goto force_pio;
 
-       /* This DMAC cannot handle if buffer is not 8-bytes alignment */
-       if (!IS_ALIGNED(sg_dma_address(sg), 8))
+       /* This DMAC cannot handle if buffer is not 128-bytes alignment */
+       if (!IS_ALIGNED(sg_dma_address(sg), 128))
                goto force_pio_with_unmap;
 
        if (data->flags & MMC_DATA_READ) {