diff options
Diffstat (limited to 'arch/arm/mach-shmobile/clock-r8a7790.c')
-rw-r--r-- | arch/arm/mach-shmobile/clock-r8a7790.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c index 6869798effa3..bad9bf2e34d6 100644 --- a/arch/arm/mach-shmobile/clock-r8a7790.c +++ b/arch/arm/mach-shmobile/clock-r8a7790.c | |||
@@ -27,19 +27,51 @@ | |||
27 | #define CPG_BASE 0xe6150000 | 27 | #define CPG_BASE 0xe6150000 |
28 | #define CPG_LEN 0x1000 | 28 | #define CPG_LEN 0x1000 |
29 | 29 | ||
30 | #define SMSTPCR2 0xe6150138 | ||
31 | #define SMSTPCR7 0xe615014c | ||
32 | |||
30 | static struct clk_mapping cpg_mapping = { | 33 | static struct clk_mapping cpg_mapping = { |
31 | .phys = CPG_BASE, | 34 | .phys = CPG_BASE, |
32 | .len = CPG_LEN, | 35 | .len = CPG_LEN, |
33 | }; | 36 | }; |
34 | 37 | ||
38 | static struct clk p_clk = { | ||
39 | .rate = 65000000, /* shortcut for now */ | ||
40 | .mapping = &cpg_mapping, | ||
41 | }; | ||
42 | |||
43 | static struct clk mp_clk = { | ||
44 | .rate = 52000000, /* shortcut for now */ | ||
45 | .mapping = &cpg_mapping, | ||
46 | }; | ||
47 | |||
35 | static struct clk *main_clks[] = { | 48 | static struct clk *main_clks[] = { |
49 | &p_clk, | ||
50 | &mp_clk, | ||
36 | }; | 51 | }; |
37 | 52 | ||
38 | enum { MSTP_NR }; | 53 | enum { MSTP721, MSTP720, |
54 | MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP_NR }; | ||
39 | static struct clk mstp_clks[MSTP_NR] = { | 55 | static struct clk mstp_clks[MSTP_NR] = { |
56 | [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */ | ||
57 | [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ | ||
58 | [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ | ||
59 | [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ | ||
60 | [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */ | ||
61 | [MSTP204] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 4, 0), /* SCIFA0 */ | ||
62 | [MSTP203] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 3, 0), /* SCIFA1 */ | ||
63 | [MSTP202] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 2, 0), /* SCIFA2 */ | ||
40 | }; | 64 | }; |
41 | 65 | ||
42 | static struct clk_lookup lookups[] = { | 66 | static struct clk_lookup lookups[] = { |
67 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), | ||
68 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), | ||
69 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), | ||
70 | CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP207]), | ||
71 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]), | ||
72 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP202]), | ||
73 | CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP721]), | ||
74 | CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]), | ||
43 | }; | 75 | }; |
44 | 76 | ||
45 | void __init r8a7790_clock_init(void) | 77 | void __init r8a7790_clock_init(void) |