summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/mtk_iommu_v1.c
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge branches 'arm/mediatek', 'arm/smmu', 'x86/amd', 's390', 'core' and ↵Joerg Roedel2016-12-061-62/+43
|\ \ | | | | | | | | | 'arm/exynos' into next
| | * iommu/mediatek: Fix M4Uv1 group refcountingRobin Murphy2016-11-151-0/+2
| |/ |/| | | | | | | | | | | | | | | | | | | For each subsequent device assigned to the m4u_group after its initial allocation, we need to take an additional reference. Otherwise, the caller of iommu_group_get_for_dev() will inadvertently remove the reference taken by iommu_group_add_device(), and the group will be freed prematurely if any device is removed. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
| * iommu/mediatek: Convert DT component matching to component_match_add_release()Russell King2016-11-101-3/+5
| | | | | | | | | | | | | | Convert DT component matching to use component_match_add_release(). Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Joerg Roedel <jroedel@suse.de>
| * iommu/mediatek: Convert M4Uv1 to iommu_fwspecRobin Murphy2016-11-101-59/+36
|/ | | | | | | | | | | | | | Our per-device data consists of the M4U instance and firmware-provided list of LARB IDs, which is a perfect fit for the generic iommu_fwspec machinery. Use that directly instead of the custom archdata code - while we can't rely on the of_xlate() mechanism to initialise things until the 32-bit ARM DMA code learns about groups and default domains, it still results in a reasonable simplification overall. CC: Honghui Zhang <honghui.zhang@mediatek.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Tested-by: Honghui Zhang <honghui.zhang@mediatek.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
* iommu/mediatek: Make mtk_iommu_pm_ops staticJoerg Roedel2016-06-211-1/+1
| | | | | | | The symbol exists elsewhere already, so that is fails to link if the symbol is non-static. Signed-off-by: Joerg Roedel <jroedel@suse.de>
* iommu/mediatek: add support for mtk iommu generation one HWHonghui Zhang2016-06-211-0/+727
Mediatek SoC's M4U has two generations of HW architcture. Generation one uses flat, one layer pagetable, and was shipped with ARM architecture, it only supports 4K size page mapping. MT2701 SoC uses this generation one m4u HW. Generation two uses the ARM short-descriptor translation table format for address translation, and was shipped with ARM64 architecture, MT8173 uses this generation two m4u HW. All the two generation iommu HW only have one iommu domain, and all its iommu clients share the same iova address. These two generation m4u HW have slit different register groups and register offset, but most register names are the same. This patch add iommu support for mediatek SoC mt2701. Signed-off-by: Honghui Zhang <honghui.zhang@mediatek.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>