diff options
author | KyongHo Cho <pullip.cho@samsung.com> | 2011-03-06 19:10:24 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-03-15 08:37:38 -0400 |
commit | b0b6ff0b21057bb8e58b0be8b427a4713fd4b5a5 (patch) | |
tree | 911aa86fbe18c818d619304c2e8e458ccd739936 /arch/arm/plat-s5p | |
parent | b34f003f271d477f61a980d280afc77929047440 (diff) |
ARM: EXYNOS4: Implement Clock gating for System MMU
This patch includes the implementation of the clock gating
for System MMU. Initially, all System MMUs are not asserted
the system clock. Asserting the system clock to a System MMU
is enabled only when s5p_sysmmu_enable() is called. Likewise,
it is disabled only when s5p_sysmmu_disable() is called.
Therefore, clock gating on System MMUs are still invisible to
the outside of the System MMU driver.
Signed-off-by: KyongHo Cho <pullip.cho@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-s5p')
-rw-r--r-- | arch/arm/plat-s5p/sysmmu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/plat-s5p/sysmmu.c b/arch/arm/plat-s5p/sysmmu.c index 89e024f377bb..54f5eddc921d 100644 --- a/arch/arm/plat-s5p/sysmmu.c +++ b/arch/arm/plat-s5p/sysmmu.c | |||
@@ -174,6 +174,8 @@ void s5p_sysmmu_set_tablebase_pgd(sysmmu_ips ips, unsigned long pgd) | |||
174 | void s5p_sysmmu_enable(sysmmu_ips ips, unsigned long pgd) | 174 | void s5p_sysmmu_enable(sysmmu_ips ips, unsigned long pgd) |
175 | { | 175 | { |
176 | if (!is_sysmmu_active(ips)) { | 176 | if (!is_sysmmu_active(ips)) { |
177 | sysmmu_clk_enable(ips); | ||
178 | |||
177 | __sysmmu_set_ptbase(ips, pgd); | 179 | __sysmmu_set_ptbase(ips, pgd); |
178 | 180 | ||
179 | __raw_writel(CTRL_ENABLE, sysmmusfrs[ips] + S5P_MMU_CTRL); | 181 | __raw_writel(CTRL_ENABLE, sysmmusfrs[ips] + S5P_MMU_CTRL); |
@@ -190,6 +192,7 @@ void s5p_sysmmu_disable(sysmmu_ips ips) | |||
190 | if (is_sysmmu_active(ips)) { | 192 | if (is_sysmmu_active(ips)) { |
191 | __raw_writel(CTRL_DISABLE, sysmmusfrs[ips] + S5P_MMU_CTRL); | 193 | __raw_writel(CTRL_DISABLE, sysmmusfrs[ips] + S5P_MMU_CTRL); |
192 | set_sysmmu_inactive(ips); | 194 | set_sysmmu_inactive(ips); |
195 | sysmmu_clk_disable(ips); | ||
193 | dev_dbg(dev, "%s is disabled.\n", sysmmu_ips_name[ips]); | 196 | dev_dbg(dev, "%s is disabled.\n", sysmmu_ips_name[ips]); |
194 | } else { | 197 | } else { |
195 | dev_dbg(dev, "%s is already disabled.\n", sysmmu_ips_name[ips]); | 198 | dev_dbg(dev, "%s is already disabled.\n", sysmmu_ips_name[ips]); |
@@ -218,6 +221,9 @@ static int s5p_sysmmu_probe(struct platform_device *pdev) | |||
218 | for (i = 0; i < S5P_SYSMMU_TOTAL_IPNUM; i++) { | 221 | for (i = 0; i < S5P_SYSMMU_TOTAL_IPNUM; i++) { |
219 | int irq; | 222 | int irq; |
220 | 223 | ||
224 | sysmmu_clk_init(dev, i); | ||
225 | sysmmu_clk_disable(i); | ||
226 | |||
221 | res = platform_get_resource(pdev, IORESOURCE_MEM, i); | 227 | res = platform_get_resource(pdev, IORESOURCE_MEM, i); |
222 | if (!res) { | 228 | if (!res) { |
223 | dev_err(dev, "Failed to get the resource of %s.\n", | 229 | dev_err(dev, "Failed to get the resource of %s.\n", |