Commit 315786ebbf ("iommu: Add iommu_map_sg() function") adds a new
->map_sg() callback and provides a default implementation that drivers
can use until they implement a hardware-specific variant. Unfortunately
the Tegra GART driver was not updated as part of that commit, so that
iommu_map_sg() calls on a domain provided by the GART cause an oops.
Fixes: 315786ebbf ("iommu: Add iommu_map_sg() function")
Cc: Hiroshi Doyu <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
The driver currently doesn't work as expected and causes existing setups
with Tegra20 to break after commit df06b759f2 ("drm/tegra: Add IOMMU
support"). To restore these setups, do not register the operations with
the platform bus for now. Fixing this properly will involve non-trivial
changes to the DRM driver, which are unlikely to be accepted at this
point in the release cycle.
Reported-by: Misha Komarovskiy <[email protected]>
Reported-by: Nicolas Chauvet <[email protected]>
Tested-by: Misha Komarovskiy <[email protected]>
Tested-by: Dmitry Osipenko <[email protected]>
Cc: Hiroshi Doyu <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Make of_device_id array const, because all OF functions handle it as const.
Signed-off-by: Kiran Padwal <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
This structure is read-only data and should never be modified.
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
The devm_[kzalloc|ioremap] functions allocates data that are released
when a driver detaches. Thus, there is no reason to explicitly call
devm_[kfree|iounmap] in probe or remove functions.
Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Hiroshi Doyu <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
When enabling LPAE on ARM, phys_addr_t becomes 64 bits wide and printing
a variable of that type using a simple %x format specifier causes the
compiler to complain. Change the format specifier to %pa, which is used
specifically for variables of type phys_addr_t.
Signed-off-by: Thierry Reding <[email protected]>
Acked-by: Olof Johansson <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Fix printk formats for dma_addr_t:
drivers/iommu/tegra-smmu.c: In function 'smmu_iommu_iova_to_phys':
>> drivers/iommu/tegra-smmu.c:774:2: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'dma_addr_t' [-Wformat]
--
drivers/iommu/tegra-gart.c: In function 'gart_iommu_iova_to_phys':
>> drivers/iommu/tegra-gart.c:298:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'dma_addr_t' [-Wformat]
Signed-off-by: Varun Sethi <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
This is required in case of PAMU, as it can support a window size of up
to 64G (even on 32bit).
Signed-off-by: Varun Sethi <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Tegra only supports, and always enables, device tree. Remove all ifdefs
for DT support from the driver.
Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.
This change removes the use of __devinit, __devexit_p, __devinitdata,
and __devexit from these drivers.
Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.
Cc: Bill Pemberton <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Ohad Ben-Cohen <[email protected]>
Cc: Tony Lindgren <[email protected]>
Cc: Omar Ramirez Luna <[email protected]>
Cc: Mauro Carvalho Chehab <[email protected]>
Cc: Hiroshi Doyu <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Bharat Nihalani <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
DT passes the exact GART register ranges without any overlapping with
MC register ranges. GART register offset needs to be adjusted by one
passed by DT correctly.
Signed-off-by: Hiroshi DOYU <[email protected]>
Acked-by: Stephen Warren <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
This commit adds device tree support for the GART hardware available on
NVIDIA Tegra 20 SoCs.
Signed-off-by: Thierry Reding <[email protected]>
Acked-by: Stephen Warren <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
This must have been messed up while merging, the intention was
clearly to unlock there.
Signed-off-by: Lucas Stach <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Tegra 20 IOMMU H/W, GART (Graphics Address Relocation Table). This
patch implements struct iommu_ops for GART for the upper IOMMU API.
This H/W module supports only single virtual address space(domain),
and manages a single level 1-to-1 mapping H/W translation page table.
[With small fixes by Joerg Roedel]
Signed-off-by: Hiroshi DOYU <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>