summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2017-02-07 22:34:58 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2017-02-14 09:10:57 +0100
commitefe0b669716314072f0467368c2be2f501f04afc (patch)
treedd3be471d1275af80fe5b5c4cc87261e3e3c589c /drivers/mmc
parent92763b997e468700b26a8fdddc5bee3e3c2a39fa (diff)
downloadlinux-efe0b669716314072f0467368c2be2f501f04afc.tar.bz2
mmc: meson-gx: set max block count and request size
So far max_blk_count isn't set what results in a default of value 8 to be used (PAGE_SIZE / block size). Block length field has 9 bits, so set max_blk_count to 2^9-1 = 511. In addition set max_req_size because max_blk_count is also limited by max_req_size / block_size. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Tested-by: Kevin Hilman <khilman@baylibre.com> Acked-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/meson-gx-mmc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 4c622ad26a70..c9f251713611 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -778,6 +778,9 @@ static int meson_mmc_probe(struct platform_device *pdev)
if (ret)
goto free_host;
+ mmc->max_blk_count = CMD_CFG_LENGTH_MASK;
+ mmc->max_req_size = mmc->max_blk_count * mmc->max_blk_size;
+
/* data bounce buffer */
host->bounce_buf_size = SZ_512K;
host->bounce_buf =