Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6f688ec authored by Joonwoo Park's avatar Joonwoo Park Committed by Michael Bohan
Browse files

arm: add pdev_archdata for dma_mask



The dma_mask which tells if device is dma capable is not being set by
arm platform device so that set_dma_mask() results in return -EIO always.
Add dma_mask in the platform_device arch data to set it to dma_mask.

Change-Id: Ia0c4ade7731d792b2538f374fffd99f927a6db74
Signed-off-by: default avatarJoonwoo Park <joonwoop@codeaurora.org>
parent b7dbbd5b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ struct pdev_archdata {
#ifdef CONFIG_ARCH_OMAP
	struct omap_device *od;
#endif
	u64 dma_mask;
};

#ifdef CONFIG_ARM_DMA_USE_IOMMU
+7 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include <linux/bug.h>
#include <linux/compiler.h>
#include <linux/sort.h>
#include <linux/dma-mapping.h>

#include <asm/unified.h>
#include <asm/cp15.h>
@@ -967,3 +968,9 @@ const struct seq_operations cpuinfo_op = {
	.stop	= c_stop,
	.show	= c_show
};

void arch_setup_pdev_archdata(struct platform_device *pdev)
{
	pdev->archdata.dma_mask = DMA_BIT_MASK(32);
	pdev->dev.dma_mask = &pdev->archdata.dma_mask;
}