mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
sdhci: stop poking into swiotlb internals
Use the proper API to query the max mapping size instead of guessing it based on swiotlb internals. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
committed by
Konrad Rzeszutek Wilk
parent
1048ba83fb
commit
66e8d3b899
@@ -20,7 +20,6 @@
|
|||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/scatterlist.h>
|
#include <linux/scatterlist.h>
|
||||||
#include <linux/sizes.h>
|
#include <linux/sizes.h>
|
||||||
#include <linux/swiotlb.h>
|
|
||||||
#include <linux/regulator/consumer.h>
|
#include <linux/regulator/consumer.h>
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
@@ -4582,12 +4581,8 @@ int sdhci_setup_host(struct sdhci_host *host)
|
|||||||
mmc->max_segs = SDHCI_MAX_SEGS;
|
mmc->max_segs = SDHCI_MAX_SEGS;
|
||||||
} else if (host->flags & SDHCI_USE_SDMA) {
|
} else if (host->flags & SDHCI_USE_SDMA) {
|
||||||
mmc->max_segs = 1;
|
mmc->max_segs = 1;
|
||||||
if (swiotlb_max_segment()) {
|
mmc->max_req_size = min_t(size_t, mmc->max_req_size,
|
||||||
unsigned int max_req_size = (1 << IO_TLB_SHIFT) *
|
dma_max_mapping_size(mmc_dev(mmc)));
|
||||||
IO_TLB_SEGSIZE;
|
|
||||||
mmc->max_req_size = min(mmc->max_req_size,
|
|
||||||
max_req_size);
|
|
||||||
}
|
|
||||||
} else { /* PIO */
|
} else { /* PIO */
|
||||||
mmc->max_segs = SDHCI_MAX_SEGS;
|
mmc->max_segs = SDHCI_MAX_SEGS;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user