mmc: meson-gx: reduce bounce buffer size
authorHeiner Kallweit <hkallweit1@gmail.com>
Tue, 7 Feb 2017 21:35:02 +0000 (22:35 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 14 Feb 2017 08:10:57 +0000 (09:10 +0100)
A bounce buffer of 512K isn't needed as the max request size is
511 * 512 byte.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/meson-gx-mmc.c

index c9f251713611512b9f4c572c1537f71f9316fc69..4feb8971003e5548c9ab3c3a6dc4d251d96f3c27 100644 (file)
@@ -782,7 +782,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
        mmc->max_req_size = mmc->max_blk_count * mmc->max_blk_size;
 
        /* data bounce buffer */
-       host->bounce_buf_size = SZ_512K;
+       host->bounce_buf_size = mmc->max_req_size;
        host->bounce_buf =
                dma_alloc_coherent(host->dev, host->bounce_buf_size,
                                   &host->bounce_dma_addr, GFP_KERNEL);