Commit graph

58 commits

Author SHA1 Message Date
Hiroshi DOYU
23349902ed iommu/tegra: Implement DOMAIN_ATTR_GEOMETRY attribute
Implement the attribute for the Tegra IOMMU drivers.

Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2012-07-11 12:25:57 +02:00
Hiroshi DOYU
8f53dc724a iommu/tegra: smmu: Fix unsleepable memory allocation
allo_pdir() is called in smmu_iommu_domain_init() with spin_lock
held. memory allocations in it have to be atomic/unsleepable.

Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Reported-by: Chris Wright <chrisw@sous-sol.org>
Acked-by: Chris Wright <chrisw@sous-sol.org>
Cc: stable@vger.kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2012-07-02 11:56:44 +02:00
Hiroshi Doyu
ff7636292a iommu/tegra: smmu: Fix uninitialized var warning
For the compiler warning, uninitizlized var when getting value by a
pointer.

Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2012-06-25 13:50:44 +02:00
Hiroshi Doyu
0547c2f56e iommu/tegra: smmu: Remove unnecessary cleanups with devm_*()
Remove unnecessary cleanup procedures with devm_*() functions.

Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2012-06-25 13:50:44 +02:00
Hiroshi Doyu
a3b2491545 iommu/tegra: smmu: Simplify allocation at once
To simplify the code, alloc necessary data at once.

Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2012-06-25 13:50:43 +02:00
Hiroshi Doyu
0760e8faa9 iommu/tegra: smmu: Add device tree support for SMMU
The necessary info is expected to pass from DT.

For more precise resource reservation, there shouldn't be any
overlapping of register range between SMMU and MC. SMMU register
offset needs to be calculated correctly, based on its register bank.

Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2012-06-25 13:50:43 +02:00
Hiroshi DOYU
907309176f iommu/tegra: smmu: Print device name correctly
Print an attached device name correctly.

Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2012-04-16 12:52:41 +02:00
Hiroshi DOYU
7a31f6f48b ARM: IOMMU: Tegra30: Add iommu_ops for SMMU driver
Tegra 30 IOMMU H/W, SMMU (System Memory Management Unit). This patch
implements struct iommu_ops for SMMU for the upper IOMMU API.

This H/W module supports multiple virtual address spaces(domain x4),
and manages 2 level H/W translation pagetable.

Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2012-01-26 13:59:02 +01:00