diff options
author | Omar Ramirez Luna <omar.luna@linaro.org> | 2012-11-19 20:05:49 -0500 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2012-12-03 12:48:01 -0500 |
commit | 87f8e57327bd8d85fb5b46cad29ac281430cc50d (patch) | |
tree | d1e3461eaf1e326adb83fde7afd85a710a258a3d /drivers/iommu | |
parent | a33977206cd167cb7541cf9044828552d9cae540 (diff) |
iommu/omap: Keep mmu enabled when requested
The purpose of the mmu is to handle the memory accesses requested by
its users. Typically, the mmu is bundled with the processing unit in
a single IP block, which makes them to share the same clock to be
functional.
Currently, iommu code assumes that its user will be indirectly
clocking it, but being a separate mmu driver, it should handle
its own clocks, so as long as the mmu is requested it will be
powered ON and once detached it will be powered OFF.
The remaining clock handling out of iommu_enable and iommu_disable
corresponds to paths that can be accessed through debugfs, some of
them doesn't work if the module is not enabled first, but in future
if the mmu is idled withouth freeing, these are needed to debug.
Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org>
Tested-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/omap-iommu.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 6b1288cddaef..f8082da6179b 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c | |||
@@ -154,7 +154,6 @@ static int iommu_enable(struct omap_iommu *obj) | |||
154 | 154 | ||
155 | err = arch_iommu->enable(obj); | 155 | err = arch_iommu->enable(obj); |
156 | 156 | ||
157 | clk_disable(obj->clk); | ||
158 | return err; | 157 | return err; |
159 | } | 158 | } |
160 | 159 | ||
@@ -163,8 +162,6 @@ static void iommu_disable(struct omap_iommu *obj) | |||
163 | if (!obj) | 162 | if (!obj) |
164 | return; | 163 | return; |
165 | 164 | ||
166 | clk_enable(obj->clk); | ||
167 | |||
168 | arch_iommu->disable(obj); | 165 | arch_iommu->disable(obj); |
169 | 166 | ||
170 | clk_disable(obj->clk); | 167 | clk_disable(obj->clk); |