aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos4/dev-sysmmu.c
diff options
context:
space:
mode:
authorKyongHo Cho <pullip.cho@samsung.com>2011-03-06 19:10:24 -0500
committerKukjin Kim <kgene.kim@samsung.com>2011-03-15 08:37:38 -0400
commitb0b6ff0b21057bb8e58b0be8b427a4713fd4b5a5 (patch)
tree911aa86fbe18c818d619304c2e8e458ccd739936 /arch/arm/mach-exynos4/dev-sysmmu.c
parentb34f003f271d477f61a980d280afc77929047440 (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/mach-exynos4/dev-sysmmu.c')
-rw-r--r--arch/arm/mach-exynos4/dev-sysmmu.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/dev-sysmmu.c b/arch/arm/mach-exynos4/dev-sysmmu.c
index 6889c9aa6493..3b7cae0fe23e 100644
--- a/arch/arm/mach-exynos4/dev-sysmmu.c
+++ b/arch/arm/mach-exynos4/dev-sysmmu.c
@@ -208,3 +208,25 @@ struct platform_device exynos4_device_sysmmu = {
208 .resource = exynos4_sysmmu_resource, 208 .resource = exynos4_sysmmu_resource,
209}; 209};
210EXPORT_SYMBOL(exynos4_device_sysmmu); 210EXPORT_SYMBOL(exynos4_device_sysmmu);
211
212static struct clk *sysmmu_clk[S5P_SYSMMU_TOTAL_IPNUM];
213void sysmmu_clk_init(struct device *dev, sysmmu_ips ips)
214{
215 sysmmu_clk[ips] = clk_get(dev, sysmmu_ips_name[ips]);
216 if (IS_ERR(sysmmu_clk[ips]))
217 sysmmu_clk[ips] = NULL;
218 else
219 clk_put(sysmmu_clk[ips]);
220}
221
222void sysmmu_clk_enable(sysmmu_ips ips)
223{
224 if (sysmmu_clk[ips])
225 clk_enable(sysmmu_clk[ips]);
226}
227
228void sysmmu_clk_disable(sysmmu_ips ips)
229{
230 if (sysmmu_clk[ips])
231 clk_disable(sysmmu_clk[ips]);
232}