aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos4/clock-exynos4212.c
diff options
context:
space:
mode:
authorKukjin Kim <kgene.kim@samsung.com>2011-08-24 04:25:09 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-09-16 03:39:00 -0400
commit2bc02c0daae146283ce1b20da6864a27c848812e (patch)
treee98111ad38c398f5c396513536362352d45983ff /arch/arm/mach-exynos4/clock-exynos4212.c
parent684653842b65b98538e5d6198998e68c879bd45e (diff)
ARM: EXYNOS4: Add support clock for EXYNOS4212
This patch splits EXYNOS4 clock code to EXYNOS4 common, EXYNOS4210 and EXYNOS4212 for supporting new EXYNOS4212 SoC with one kernel image. Of course, this patch adds some clock codes for EXYNOS4212 SoC. Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos4/clock-exynos4212.c')
-rw-r--r--arch/arm/mach-exynos4/clock-exynos4212.c84
1 files changed, 84 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/clock-exynos4212.c b/arch/arm/mach-exynos4/clock-exynos4212.c
new file mode 100644
index 000000000000..5a47a3f0dfe4
--- /dev/null
+++ b/arch/arm/mach-exynos4/clock-exynos4212.c
@@ -0,0 +1,84 @@
1/*
2 * linux/arch/arm/mach-exynos4/clock-exynos4212.c
3 *
4 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com
6 *
7 * EXYNOS4212 - Clock support
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#include <linux/kernel.h>
15#include <linux/err.h>
16#include <linux/clk.h>
17#include <linux/io.h>
18
19#include <plat/cpu-freq.h>
20#include <plat/clock.h>
21#include <plat/cpu.h>
22#include <plat/pll.h>
23#include <plat/s5p-clock.h>
24#include <plat/clock-clksrc.h>
25#include <plat/exynos4.h>
26
27#include <mach/hardware.h>
28#include <mach/map.h>
29#include <mach/regs-clock.h>
30#include <mach/exynos4-clock.h>
31
32static struct clk *clk_src_mpll_user_list[] = {
33 [0] = &clk_fin_mpll,
34 [1] = &clk_mout_mpll.clk,
35};
36
37static struct clksrc_sources clk_src_mpll_user = {
38 .sources = clk_src_mpll_user_list,
39 .nr_sources = ARRAY_SIZE(clk_src_mpll_user_list),
40};
41
42static struct clksrc_clk clk_mout_mpll_user = {
43 .clk = {
44 .name = "mout_mpll_user",
45 },
46 .sources = &clk_src_mpll_user,
47 .reg_src = { .reg = S5P_CLKSRC_CPU, .shift = 24, .size = 1 },
48};
49
50static struct clksrc_clk *sysclks[] = {
51 &clk_mout_mpll_user,
52};
53
54static struct clksrc_clk clksrcs[] = {
55 /* nothing here yet */
56};
57
58static struct clk init_clocks_off[] = {
59 /* nothing here yet */
60};
61
62void __init exynos4212_register_clocks(void)
63{
64 int ptr;
65
66 /* usbphy1 is removed */
67 clkset_group_list[4] = NULL;
68
69 /* mout_mpll_user is used */
70 clkset_group_list[6] = &clk_mout_mpll_user.clk;
71 clkset_aclk_top_list[0] = &clk_mout_mpll_user.clk;
72
73 clk_mout_mpll.reg_src.reg = S5P_CLKSRC_DMC;
74 clk_mout_mpll.reg_src.shift = 12;
75 clk_mout_mpll.reg_src.size = 1;
76
77 for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++)
78 s3c_register_clksrc(sysclks[ptr], 1);
79
80 s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs));
81
82 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
83 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
84}