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 0x1c
34 #define APBC_SSP1 0x20
35 #define APBC_SSP2 0x4c
36 #define APBCP_TWSI1 0x28
37 #define APBCP_UART2 0x1c
38 #define APMU_SDH0 0x54
39 #define APMU_SDH1 0x58
41 #define APMU_DISP0 0x4c
42 #define APMU_CCIC0 0x50
44 #define MPMU_UART_PLL 0x14
57 {.num = 8125, .den = 1536},
60 static const char *uart_parent[] = {
"pll1_3_16",
"uart_pll"};
61 static const char *ssp_parent[] = {
"pll1_96",
"pll1_48",
"pll1_24",
"pll1_12"};
62 static const char *sdh_parent[] = {
"pll1_12",
"pll1_13"};
63 static const char *disp_parent[] = {
"pll1_2",
"pll1_12"};
64 static const char *ccic_parent[] = {
"pll1_2",
"pll1_12"};
65 static const char *ccic_phy_parent[] = {
"pll1_6",
"pll1_12"};
77 if (mpmu_base ==
NULL) {
78 pr_err(
"error to ioremap MPMU base\n");
83 if (apmu_base ==
NULL) {
84 pr_err(
"error to ioremap APMU base\n");
89 if (apbcp_base ==
NULL) {
90 pr_err(
"error to ioremap APBC extension base\n");
95 if (apbc_base ==
NULL) {
96 pr_err(
"error to ioremap APBC base\n");
112 CLK_SET_RATE_PARENT, 1, 2);
116 CLK_SET_RATE_PARENT, 1, 2);
120 CLK_SET_RATE_PARENT, 1, 2);
124 CLK_SET_RATE_PARENT, 1, 2);
128 CLK_SET_RATE_PARENT, 1, 3);
132 CLK_SET_RATE_PARENT, 1, 2);
136 CLK_SET_RATE_PARENT, 1, 2);
140 CLK_SET_RATE_PARENT, 1, 2);
144 CLK_SET_RATE_PARENT, 1, 2);
148 CLK_SET_RATE_PARENT, 1, 13);
152 CLK_SET_RATE_PARENT, 2, 3);
156 CLK_SET_RATE_PARENT, 2, 3);
160 CLK_SET_RATE_PARENT, 3, 16);
165 &uart_factor_masks, uart_factor_tbl,
179 apbc_base +
APBC_GPIO, 10, 0, &clk_lock);
183 apbc_base +
APBC_KPC, 10, 0, &clk_lock);
187 apbc_base +
APBC_RTC, 10, 0, &clk_lock);
191 apbc_base +
APBC_PWM0, 10, 0, &clk_lock);
195 apbc_base +
APBC_PWM1, 10, 0, &clk_lock);
199 apbc_base +
APBC_PWM2, 10, 0, &clk_lock);
203 apbc_base +
APBC_PWM3, 10, 0, &clk_lock);
238 apbc_base +
APBC_SSP0, 4, 3, 0, &clk_lock);
242 apbc_base +
APBC_SSP0, 10, 0, &clk_lock);
247 apbc_base +
APBC_SSP1, 4, 3, 0, &clk_lock);
251 apbc_base +
APBC_SSP1, 10, 0, &clk_lock);
255 apmu_base +
APMU_DFC, 0x19b, &clk_lock);
260 apmu_base +
APMU_SDH0, 6, 1, 0, &clk_lock);
269 apmu_base +
APMU_SDH1, 6, 1, 0, &clk_lock);
277 apmu_base +
APMU_USB, 0x9, &clk_lock);
281 apmu_base +
APMU_USB, 0x12, &clk_lock);
314 10, 5, 0, &clk_lock);