diff options
author | Luka Pivk <luka.pivk@toradex.com> | 2019-01-08 07:02:41 +0100 |
---|---|---|
committer | Luka Pivk <luka.pivk@toradex.com> | 2019-01-08 07:02:41 +0100 |
commit | 43f61e8df71c474cd56b5c971096b9cf8d36cd95 (patch) | |
tree | 0031be65fcc2fd2fd3eceeee9558b5526a19e431 /drivers/mmc/host | |
parent | 5656ec50dc9950db865d53306326b1a732e3738e (diff) | |
parent | c04c050f5bf98845bfe22164b8a1503d696a6e26 (diff) |
Merge remote-tracking branch 'remotes/origin/linux-4.19.y'toradex_4.19.y
Signed-off-by: Luka Pivk <luka.pivk@toradex.com>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 68760d4a5d3d..b23c57e07f36 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -2066,7 +2066,6 @@ static int omap_hsmmc_probe(struct platform_device *pdev) mmc->max_blk_size = 512; /* Block Length at max can be 1024 */ mmc->max_blk_count = 0xFFFF; /* No. of Blocks is 16 bits */ mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; - mmc->max_seg_size = mmc->max_req_size; mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_ERASE | MMC_CAP_CMD23; @@ -2096,6 +2095,17 @@ static int omap_hsmmc_probe(struct platform_device *pdev) goto err_irq; } + /* + * Limit the maximum segment size to the lower of the request size + * and the DMA engine device segment size limits. In reality, with + * 32-bit transfers, the DMA engine can do longer segments than this + * but there is no way to represent that in the DMA model - if we + * increase this figure here, we get warnings from the DMA API debug. + */ + mmc->max_seg_size = min3(mmc->max_req_size, + dma_get_max_seg_size(host->rx_chan->device->dev), + dma_get_max_seg_size(host->tx_chan->device->dev)); + /* Request IRQ for MMC operations */ ret = devm_request_irq(&pdev->dev, host->irq, omap_hsmmc_irq, 0, mmc_hostname(mmc), host); |