12 #include <linux/module.h>
13 #include <linux/kernel.h>
19 #include <mach/addr-map.h>
24 #define APBC_TWSI0 0x2c
26 #define APBC_UART0 0x0
27 #define APBC_UART1 0x4
30 #define APBC_PWM1 0x10
31 #define APBC_PWM2 0x14
32 #define APBC_PWM3 0x18
33 #define APBC_SSP0 0x81c
34 #define APBC_SSP1 0x820
35 #define APBC_SSP2 0x84c
36 #define APBC_SSP3 0x858
37 #define APBC_SSP4 0x85c
38 #define APBC_TWSI1 0x6c
39 #define APBC_UART2 0x70
40 #define APMU_SDH0 0x54
41 #define APMU_SDH1 0x58
43 #define APMU_DISP0 0x4c
44 #define APMU_CCIC0 0x50
46 #define MPMU_UART_PLL 0x14
59 {.num = 8125, .den = 1536},
62 static const char *uart_parent[] = {
"pll1_3_16",
"uart_pll"};
63 static const char *ssp_parent[] = {
"pll1_96",
"pll1_48",
"pll1_24",
"pll1_12"};
64 static const char *sdh_parent[] = {
"pll1_12",
"pll1_13"};
65 static const char *disp_parent[] = {
"pll1_2",
"pll1_12"};
66 static const char *ccic_parent[] = {
"pll1_2",
"pll1_12"};
67 static const char *ccic_phy_parent[] = {
"pll1_6",
"pll1_12"};
78 if (mpmu_base ==
NULL) {
79 pr_err(
"error to ioremap MPMU base\n");
84 if (apmu_base ==
NULL) {
85 pr_err(
"error to ioremap APMU base\n");
90 if (apbc_base ==
NULL) {
91 pr_err(
"error to ioremap APBC base\n");
107 CLK_SET_RATE_PARENT, 1, 2);
111 CLK_SET_RATE_PARENT, 1, 2);
115 CLK_SET_RATE_PARENT, 1, 2);
119 CLK_SET_RATE_PARENT, 1, 2);
123 CLK_SET_RATE_PARENT, 1, 3);
127 CLK_SET_RATE_PARENT, 1, 2);
131 CLK_SET_RATE_PARENT, 1, 2);
135 CLK_SET_RATE_PARENT, 1, 2);
139 CLK_SET_RATE_PARENT, 1, 2);
143 CLK_SET_RATE_PARENT, 1, 13);
147 CLK_SET_RATE_PARENT, 2, 3);
151 CLK_SET_RATE_PARENT, 2, 3);
155 CLK_SET_RATE_PARENT, 3, 16);
160 &uart_factor_masks, uart_factor_tbl,
174 apbc_base +
APBC_GPIO, 10, 0, &clk_lock);
178 apbc_base +
APBC_KPC, 10, 0, &clk_lock);
182 apbc_base +
APBC_RTC, 10, 0, &clk_lock);
186 apbc_base +
APBC_PWM0, 10, 0, &clk_lock);
190 apbc_base +
APBC_PWM1, 10, 0, &clk_lock);
194 apbc_base +
APBC_PWM2, 10, 0, &clk_lock);
198 apbc_base +
APBC_PWM3, 10, 0, &clk_lock);
233 apbc_base +
APBC_SSP0, 4, 3, 0, &clk_lock);
242 apbc_base +
APBC_SSP1, 4, 3, 0, &clk_lock);
251 apbc_base +
APBC_SSP2, 4, 3, 0, &clk_lock);
260 apbc_base +
APBC_SSP3, 4, 3, 0, &clk_lock);
269 apbc_base +
APBC_SSP4, 4, 3, 0, &clk_lock);
282 apmu_base +
APMU_SDH0, 6, 1, 0, &clk_lock);
291 apmu_base +
APMU_SDH1, 6, 1, 0, &clk_lock);
340 10, 5, 0, &clk_lock);