mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
soc/tegra: fuse: Explicitly request DMA channel from APB DMA driver
Currently fuse driver requests DMA channel from an arbitrary DMA device, it is not a problem since there is only one DMA provider for Tegra20 yet, but it may become troublesome if another provider will appear. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Acked-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
55a042b3f6
commit
ccf151847b
@ -96,6 +96,13 @@ out:
|
||||
return value;
|
||||
}
|
||||
|
||||
static bool dma_filter(struct dma_chan *chan, void *filter_param)
|
||||
{
|
||||
struct device_node *np = chan->device->dev->of_node;
|
||||
|
||||
return of_device_is_compatible(np, "nvidia,tegra20-apbdma");
|
||||
}
|
||||
|
||||
static int tegra20_fuse_probe(struct tegra_fuse *fuse)
|
||||
{
|
||||
dma_cap_mask_t mask;
|
||||
@ -103,7 +110,7 @@ static int tegra20_fuse_probe(struct tegra_fuse *fuse)
|
||||
dma_cap_zero(mask);
|
||||
dma_cap_set(DMA_SLAVE, mask);
|
||||
|
||||
fuse->apbdma.chan = dma_request_channel(mask, NULL, NULL);
|
||||
fuse->apbdma.chan = __dma_request_channel(&mask, dma_filter, NULL);
|
||||
if (!fuse->apbdma.chan)
|
||||
return -EPROBE_DEFER;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user