Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1 | /* linux/arch/arm/mach-s5pv210/clock.c |
| 2 | * |
| 3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. |
| 4 | * http://www.samsung.com/ |
| 5 | * |
| 6 | * S5PV210 - Clock support |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. |
| 11 | */ |
| 12 | |
| 13 | #include <linux/init.h> |
| 14 | #include <linux/module.h> |
| 15 | #include <linux/kernel.h> |
| 16 | #include <linux/list.h> |
| 17 | #include <linux/errno.h> |
| 18 | #include <linux/err.h> |
| 19 | #include <linux/clk.h> |
| 20 | #include <linux/sysdev.h> |
| 21 | #include <linux/io.h> |
| 22 | |
| 23 | #include <mach/map.h> |
| 24 | |
| 25 | #include <plat/cpu-freq.h> |
| 26 | #include <mach/regs-clock.h> |
| 27 | #include <plat/clock.h> |
| 28 | #include <plat/cpu.h> |
| 29 | #include <plat/pll.h> |
| 30 | #include <plat/s5p-clock.h> |
| 31 | #include <plat/clock-clksrc.h> |
| 32 | #include <plat/s5pv210.h> |
| 33 | |
Jaecheol Lee | 8869584 | 2010-10-12 09:19:26 +0900 | [diff] [blame] | 34 | static unsigned long xtal; |
| 35 | |
Thomas Abraham | 59cda52 | 2010-05-17 09:38:01 +0900 | [diff] [blame] | 36 | static struct clksrc_clk clk_mout_apll = { |
| 37 | .clk = { |
| 38 | .name = "mout_apll", |
Thomas Abraham | 59cda52 | 2010-05-17 09:38:01 +0900 | [diff] [blame] | 39 | }, |
| 40 | .sources = &clk_src_apll, |
| 41 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 0, .size = 1 }, |
| 42 | }; |
| 43 | |
| 44 | static struct clksrc_clk clk_mout_epll = { |
| 45 | .clk = { |
| 46 | .name = "mout_epll", |
Thomas Abraham | 59cda52 | 2010-05-17 09:38:01 +0900 | [diff] [blame] | 47 | }, |
| 48 | .sources = &clk_src_epll, |
| 49 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 8, .size = 1 }, |
| 50 | }; |
| 51 | |
| 52 | static struct clksrc_clk clk_mout_mpll = { |
| 53 | .clk = { |
| 54 | .name = "mout_mpll", |
Thomas Abraham | 59cda52 | 2010-05-17 09:38:01 +0900 | [diff] [blame] | 55 | }, |
| 56 | .sources = &clk_src_mpll, |
| 57 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 4, .size = 1 }, |
| 58 | }; |
| 59 | |
Thomas Abraham | 374e0bf | 2010-05-17 09:38:31 +0900 | [diff] [blame] | 60 | static struct clk *clkset_armclk_list[] = { |
| 61 | [0] = &clk_mout_apll.clk, |
| 62 | [1] = &clk_mout_mpll.clk, |
| 63 | }; |
| 64 | |
| 65 | static struct clksrc_sources clkset_armclk = { |
| 66 | .sources = clkset_armclk_list, |
| 67 | .nr_sources = ARRAY_SIZE(clkset_armclk_list), |
| 68 | }; |
| 69 | |
| 70 | static struct clksrc_clk clk_armclk = { |
| 71 | .clk = { |
| 72 | .name = "armclk", |
Thomas Abraham | 374e0bf | 2010-05-17 09:38:31 +0900 | [diff] [blame] | 73 | }, |
| 74 | .sources = &clkset_armclk, |
| 75 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 16, .size = 1 }, |
| 76 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 0, .size = 3 }, |
| 77 | }; |
| 78 | |
Thomas Abraham | af76a20 | 2010-05-17 09:38:34 +0900 | [diff] [blame] | 79 | static struct clksrc_clk clk_hclk_msys = { |
| 80 | .clk = { |
| 81 | .name = "hclk_msys", |
Thomas Abraham | af76a20 | 2010-05-17 09:38:34 +0900 | [diff] [blame] | 82 | .parent = &clk_armclk.clk, |
| 83 | }, |
| 84 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 8, .size = 3 }, |
| 85 | }; |
| 86 | |
Thomas Abraham | 6ed91a2 | 2010-05-17 09:38:42 +0900 | [diff] [blame] | 87 | static struct clksrc_clk clk_pclk_msys = { |
| 88 | .clk = { |
| 89 | .name = "pclk_msys", |
Thomas Abraham | 6ed91a2 | 2010-05-17 09:38:42 +0900 | [diff] [blame] | 90 | .parent = &clk_hclk_msys.clk, |
| 91 | }, |
| 92 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 12, .size = 3 }, |
| 93 | }; |
| 94 | |
Thomas Abraham | 0fe967a | 2010-05-17 09:38:37 +0900 | [diff] [blame] | 95 | static struct clksrc_clk clk_sclk_a2m = { |
| 96 | .clk = { |
| 97 | .name = "sclk_a2m", |
Thomas Abraham | 0fe967a | 2010-05-17 09:38:37 +0900 | [diff] [blame] | 98 | .parent = &clk_mout_apll.clk, |
| 99 | }, |
| 100 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 4, .size = 3 }, |
| 101 | }; |
| 102 | |
| 103 | static struct clk *clkset_hclk_sys_list[] = { |
| 104 | [0] = &clk_mout_mpll.clk, |
| 105 | [1] = &clk_sclk_a2m.clk, |
| 106 | }; |
| 107 | |
| 108 | static struct clksrc_sources clkset_hclk_sys = { |
| 109 | .sources = clkset_hclk_sys_list, |
| 110 | .nr_sources = ARRAY_SIZE(clkset_hclk_sys_list), |
| 111 | }; |
| 112 | |
| 113 | static struct clksrc_clk clk_hclk_dsys = { |
| 114 | .clk = { |
| 115 | .name = "hclk_dsys", |
Thomas Abraham | 0fe967a | 2010-05-17 09:38:37 +0900 | [diff] [blame] | 116 | }, |
| 117 | .sources = &clkset_hclk_sys, |
| 118 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 20, .size = 1 }, |
| 119 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 16, .size = 4 }, |
| 120 | }; |
| 121 | |
Thomas Abraham | 58772cd | 2010-05-17 09:38:48 +0900 | [diff] [blame] | 122 | static struct clksrc_clk clk_pclk_dsys = { |
| 123 | .clk = { |
| 124 | .name = "pclk_dsys", |
Thomas Abraham | 58772cd | 2010-05-17 09:38:48 +0900 | [diff] [blame] | 125 | .parent = &clk_hclk_dsys.clk, |
| 126 | }, |
| 127 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 20, .size = 3 }, |
| 128 | }; |
| 129 | |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 130 | static struct clksrc_clk clk_hclk_psys = { |
| 131 | .clk = { |
| 132 | .name = "hclk_psys", |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 133 | }, |
| 134 | .sources = &clkset_hclk_sys, |
| 135 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 24, .size = 1 }, |
| 136 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 24, .size = 4 }, |
| 137 | }; |
| 138 | |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 139 | static struct clksrc_clk clk_pclk_psys = { |
| 140 | .clk = { |
| 141 | .name = "pclk_psys", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 142 | .parent = &clk_hclk_psys.clk, |
| 143 | }, |
| 144 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 28, .size = 3 }, |
| 145 | }; |
| 146 | |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 147 | static int s5pv210_clk_ip0_ctrl(struct clk *clk, int enable) |
| 148 | { |
| 149 | return s5p_gatectrl(S5P_CLKGATE_IP0, clk, enable); |
| 150 | } |
| 151 | |
| 152 | static int s5pv210_clk_ip1_ctrl(struct clk *clk, int enable) |
| 153 | { |
| 154 | return s5p_gatectrl(S5P_CLKGATE_IP1, clk, enable); |
| 155 | } |
| 156 | |
| 157 | static int s5pv210_clk_ip2_ctrl(struct clk *clk, int enable) |
| 158 | { |
| 159 | return s5p_gatectrl(S5P_CLKGATE_IP2, clk, enable); |
| 160 | } |
| 161 | |
| 162 | static int s5pv210_clk_ip3_ctrl(struct clk *clk, int enable) |
| 163 | { |
| 164 | return s5p_gatectrl(S5P_CLKGATE_IP3, clk, enable); |
| 165 | } |
| 166 | |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 167 | static int s5pv210_clk_mask0_ctrl(struct clk *clk, int enable) |
| 168 | { |
| 169 | return s5p_gatectrl(S5P_CLK_SRC_MASK0, clk, enable); |
| 170 | } |
| 171 | |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 172 | static int s5pv210_clk_mask1_ctrl(struct clk *clk, int enable) |
| 173 | { |
| 174 | return s5p_gatectrl(S5P_CLK_SRC_MASK1, clk, enable); |
| 175 | } |
| 176 | |
Tomasz Stanislawski | fbf0556 | 2011-09-19 16:44:42 +0900 | [diff] [blame] | 177 | static int exynos4_clk_hdmiphy_ctrl(struct clk *clk, int enable) |
| 178 | { |
| 179 | return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable); |
| 180 | } |
| 181 | |
| 182 | static int exynos4_clk_dac_ctrl(struct clk *clk, int enable) |
| 183 | { |
| 184 | return s5p_gatectrl(S5P_DAC_PHY_CONTROL, clk, enable); |
| 185 | } |
| 186 | |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 187 | static struct clk clk_sclk_hdmi27m = { |
| 188 | .name = "sclk_hdmi27m", |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 189 | .rate = 27000000, |
| 190 | }; |
| 191 | |
Thomas Abraham | 2cf4c2e | 2010-05-17 09:38:55 +0900 | [diff] [blame] | 192 | static struct clk clk_sclk_hdmiphy = { |
| 193 | .name = "sclk_hdmiphy", |
Thomas Abraham | 2cf4c2e | 2010-05-17 09:38:55 +0900 | [diff] [blame] | 194 | }; |
| 195 | |
| 196 | static struct clk clk_sclk_usbphy0 = { |
| 197 | .name = "sclk_usbphy0", |
Thomas Abraham | 2cf4c2e | 2010-05-17 09:38:55 +0900 | [diff] [blame] | 198 | }; |
| 199 | |
| 200 | static struct clk clk_sclk_usbphy1 = { |
| 201 | .name = "sclk_usbphy1", |
Thomas Abraham | 2cf4c2e | 2010-05-17 09:38:55 +0900 | [diff] [blame] | 202 | }; |
| 203 | |
Thomas Abraham | 4583487 | 2010-05-17 09:39:00 +0900 | [diff] [blame] | 204 | static struct clk clk_pcmcdclk0 = { |
| 205 | .name = "pcmcdclk", |
Thomas Abraham | 4583487 | 2010-05-17 09:39:00 +0900 | [diff] [blame] | 206 | }; |
| 207 | |
| 208 | static struct clk clk_pcmcdclk1 = { |
| 209 | .name = "pcmcdclk", |
Thomas Abraham | 4583487 | 2010-05-17 09:39:00 +0900 | [diff] [blame] | 210 | }; |
| 211 | |
| 212 | static struct clk clk_pcmcdclk2 = { |
| 213 | .name = "pcmcdclk", |
Thomas Abraham | 4583487 | 2010-05-17 09:39:00 +0900 | [diff] [blame] | 214 | }; |
| 215 | |
Boojin Kim | dafc954 | 2011-09-02 09:44:37 +0900 | [diff] [blame] | 216 | static struct clk dummy_apb_pclk = { |
| 217 | .name = "apb_pclk", |
| 218 | .id = -1, |
| 219 | }; |
| 220 | |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 221 | static struct clk *clkset_vpllsrc_list[] = { |
| 222 | [0] = &clk_fin_vpll, |
| 223 | [1] = &clk_sclk_hdmi27m, |
| 224 | }; |
| 225 | |
| 226 | static struct clksrc_sources clkset_vpllsrc = { |
| 227 | .sources = clkset_vpllsrc_list, |
| 228 | .nr_sources = ARRAY_SIZE(clkset_vpllsrc_list), |
| 229 | }; |
| 230 | |
| 231 | static struct clksrc_clk clk_vpllsrc = { |
| 232 | .clk = { |
| 233 | .name = "vpll_src", |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 234 | .enable = s5pv210_clk_mask0_ctrl, |
| 235 | .ctrlbit = (1 << 7), |
| 236 | }, |
| 237 | .sources = &clkset_vpllsrc, |
| 238 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 28, .size = 1 }, |
| 239 | }; |
| 240 | |
| 241 | static struct clk *clkset_sclk_vpll_list[] = { |
| 242 | [0] = &clk_vpllsrc.clk, |
| 243 | [1] = &clk_fout_vpll, |
| 244 | }; |
| 245 | |
| 246 | static struct clksrc_sources clkset_sclk_vpll = { |
| 247 | .sources = clkset_sclk_vpll_list, |
| 248 | .nr_sources = ARRAY_SIZE(clkset_sclk_vpll_list), |
| 249 | }; |
| 250 | |
| 251 | static struct clksrc_clk clk_sclk_vpll = { |
| 252 | .clk = { |
| 253 | .name = "sclk_vpll", |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 254 | }, |
| 255 | .sources = &clkset_sclk_vpll, |
| 256 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 12, .size = 1 }, |
| 257 | }; |
| 258 | |
Jaecheol Lee | 08f49d1 | 2010-10-12 09:19:30 +0900 | [diff] [blame] | 259 | static struct clk *clkset_moutdmc0src_list[] = { |
| 260 | [0] = &clk_sclk_a2m.clk, |
| 261 | [1] = &clk_mout_mpll.clk, |
| 262 | [2] = NULL, |
| 263 | [3] = NULL, |
| 264 | }; |
| 265 | |
| 266 | static struct clksrc_sources clkset_moutdmc0src = { |
| 267 | .sources = clkset_moutdmc0src_list, |
| 268 | .nr_sources = ARRAY_SIZE(clkset_moutdmc0src_list), |
| 269 | }; |
| 270 | |
| 271 | static struct clksrc_clk clk_mout_dmc0 = { |
| 272 | .clk = { |
| 273 | .name = "mout_dmc0", |
Jaecheol Lee | 08f49d1 | 2010-10-12 09:19:30 +0900 | [diff] [blame] | 274 | }, |
| 275 | .sources = &clkset_moutdmc0src, |
| 276 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 24, .size = 2 }, |
| 277 | }; |
| 278 | |
| 279 | static struct clksrc_clk clk_sclk_dmc0 = { |
| 280 | .clk = { |
| 281 | .name = "sclk_dmc0", |
Jaecheol Lee | 08f49d1 | 2010-10-12 09:19:30 +0900 | [diff] [blame] | 282 | .parent = &clk_mout_dmc0.clk, |
| 283 | }, |
| 284 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 28, .size = 4 }, |
| 285 | }; |
| 286 | |
Thomas Abraham | 664f5b2 | 2010-05-17 09:38:44 +0900 | [diff] [blame] | 287 | static unsigned long s5pv210_clk_imem_get_rate(struct clk *clk) |
| 288 | { |
| 289 | return clk_get_rate(clk->parent) / 2; |
| 290 | } |
| 291 | |
| 292 | static struct clk_ops clk_hclk_imem_ops = { |
| 293 | .get_rate = s5pv210_clk_imem_get_rate, |
| 294 | }; |
| 295 | |
Jaecheol Lee | 8869584 | 2010-10-12 09:19:26 +0900 | [diff] [blame] | 296 | static unsigned long s5pv210_clk_fout_apll_get_rate(struct clk *clk) |
| 297 | { |
| 298 | return s5p_get_pll45xx(xtal, __raw_readl(S5P_APLL_CON), pll_4508); |
| 299 | } |
| 300 | |
| 301 | static struct clk_ops clk_fout_apll_ops = { |
| 302 | .get_rate = s5pv210_clk_fout_apll_get_rate, |
| 303 | }; |
| 304 | |
Kukjin Kim | 3c0fa64 | 2011-01-04 17:51:30 +0900 | [diff] [blame] | 305 | static struct clk init_clocks_off[] = { |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 306 | { |
Boojin Kim | dafc954 | 2011-09-02 09:44:37 +0900 | [diff] [blame] | 307 | .name = "dma", |
Vladimir Zapolskiy | 1ce3ea6 | 2011-08-18 19:24:55 +0900 | [diff] [blame] | 308 | .devname = "dma-pl330.0", |
Seungwhan Youn | 313068f | 2010-10-19 18:10:53 +0900 | [diff] [blame] | 309 | .parent = &clk_hclk_psys.clk, |
| 310 | .enable = s5pv210_clk_ip0_ctrl, |
| 311 | .ctrlbit = (1 << 3), |
| 312 | }, { |
Boojin Kim | dafc954 | 2011-09-02 09:44:37 +0900 | [diff] [blame] | 313 | .name = "dma", |
Vladimir Zapolskiy | 1ce3ea6 | 2011-08-18 19:24:55 +0900 | [diff] [blame] | 314 | .devname = "dma-pl330.1", |
Seungwhan Youn | 313068f | 2010-10-19 18:10:53 +0900 | [diff] [blame] | 315 | .parent = &clk_hclk_psys.clk, |
| 316 | .enable = s5pv210_clk_ip0_ctrl, |
| 317 | .ctrlbit = (1 << 4), |
| 318 | }, { |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 319 | .name = "rot", |
Thomas Abraham | 0fe967a | 2010-05-17 09:38:37 +0900 | [diff] [blame] | 320 | .parent = &clk_hclk_dsys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 321 | .enable = s5pv210_clk_ip0_ctrl, |
| 322 | .ctrlbit = (1<<29), |
| 323 | }, { |
Marek Szyprowski | da01c2f | 2010-09-10 19:43:12 +0900 | [diff] [blame] | 324 | .name = "fimc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 325 | .devname = "s5pv210-fimc.0", |
Marek Szyprowski | da01c2f | 2010-09-10 19:43:12 +0900 | [diff] [blame] | 326 | .parent = &clk_hclk_dsys.clk, |
| 327 | .enable = s5pv210_clk_ip0_ctrl, |
| 328 | .ctrlbit = (1 << 24), |
| 329 | }, { |
| 330 | .name = "fimc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 331 | .devname = "s5pv210-fimc.1", |
Marek Szyprowski | da01c2f | 2010-09-10 19:43:12 +0900 | [diff] [blame] | 332 | .parent = &clk_hclk_dsys.clk, |
| 333 | .enable = s5pv210_clk_ip0_ctrl, |
| 334 | .ctrlbit = (1 << 25), |
| 335 | }, { |
| 336 | .name = "fimc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 337 | .devname = "s5pv210-fimc.2", |
Marek Szyprowski | da01c2f | 2010-09-10 19:43:12 +0900 | [diff] [blame] | 338 | .parent = &clk_hclk_dsys.clk, |
| 339 | .enable = s5pv210_clk_ip0_ctrl, |
| 340 | .ctrlbit = (1 << 26), |
| 341 | }, { |
Kamil Debski | 0f75a96 | 2011-07-21 16:42:30 +0900 | [diff] [blame] | 342 | .name = "mfc", |
| 343 | .devname = "s5p-mfc", |
| 344 | .parent = &clk_pclk_psys.clk, |
| 345 | .enable = s5pv210_clk_ip0_ctrl, |
| 346 | .ctrlbit = (1 << 16), |
| 347 | }, { |
Tomasz Stanislawski | fbf0556 | 2011-09-19 16:44:42 +0900 | [diff] [blame] | 348 | .name = "dac", |
| 349 | .devname = "s5p-sdo", |
| 350 | .parent = &clk_hclk_dsys.clk, |
| 351 | .enable = s5pv210_clk_ip1_ctrl, |
| 352 | .ctrlbit = (1 << 10), |
| 353 | }, { |
| 354 | .name = "mixer", |
| 355 | .devname = "s5p-mixer", |
| 356 | .parent = &clk_hclk_dsys.clk, |
| 357 | .enable = s5pv210_clk_ip1_ctrl, |
| 358 | .ctrlbit = (1 << 9), |
| 359 | }, { |
| 360 | .name = "vp", |
| 361 | .devname = "s5p-mixer", |
| 362 | .parent = &clk_hclk_dsys.clk, |
| 363 | .enable = s5pv210_clk_ip1_ctrl, |
| 364 | .ctrlbit = (1 << 8), |
| 365 | }, { |
| 366 | .name = "hdmi", |
| 367 | .devname = "s5pv210-hdmi", |
| 368 | .parent = &clk_hclk_dsys.clk, |
| 369 | .enable = s5pv210_clk_ip1_ctrl, |
| 370 | .ctrlbit = (1 << 11), |
| 371 | }, { |
| 372 | .name = "hdmiphy", |
| 373 | .devname = "s5pv210-hdmi", |
| 374 | .enable = exynos4_clk_hdmiphy_ctrl, |
| 375 | .ctrlbit = (1 << 0), |
| 376 | }, { |
| 377 | .name = "dacphy", |
| 378 | .devname = "s5p-sdo", |
| 379 | .enable = exynos4_clk_dac_ctrl, |
| 380 | .ctrlbit = (1 << 0), |
| 381 | }, { |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 382 | .name = "otg", |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 383 | .parent = &clk_hclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 384 | .enable = s5pv210_clk_ip1_ctrl, |
| 385 | .ctrlbit = (1<<16), |
| 386 | }, { |
| 387 | .name = "usb-host", |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 388 | .parent = &clk_hclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 389 | .enable = s5pv210_clk_ip1_ctrl, |
| 390 | .ctrlbit = (1<<17), |
| 391 | }, { |
| 392 | .name = "lcd", |
Thomas Abraham | 0fe967a | 2010-05-17 09:38:37 +0900 | [diff] [blame] | 393 | .parent = &clk_hclk_dsys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 394 | .enable = s5pv210_clk_ip1_ctrl, |
| 395 | .ctrlbit = (1<<0), |
| 396 | }, { |
| 397 | .name = "cfcon", |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 398 | .parent = &clk_hclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 399 | .enable = s5pv210_clk_ip1_ctrl, |
| 400 | .ctrlbit = (1<<25), |
| 401 | }, { |
| 402 | .name = "hsmmc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 403 | .devname = "s3c-sdhci.0", |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 404 | .parent = &clk_hclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 405 | .enable = s5pv210_clk_ip2_ctrl, |
| 406 | .ctrlbit = (1<<16), |
| 407 | }, { |
| 408 | .name = "hsmmc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 409 | .devname = "s3c-sdhci.1", |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 410 | .parent = &clk_hclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 411 | .enable = s5pv210_clk_ip2_ctrl, |
| 412 | .ctrlbit = (1<<17), |
| 413 | }, { |
| 414 | .name = "hsmmc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 415 | .devname = "s3c-sdhci.2", |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 416 | .parent = &clk_hclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 417 | .enable = s5pv210_clk_ip2_ctrl, |
| 418 | .ctrlbit = (1<<18), |
| 419 | }, { |
| 420 | .name = "hsmmc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 421 | .devname = "s3c-sdhci.3", |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 422 | .parent = &clk_hclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 423 | .enable = s5pv210_clk_ip2_ctrl, |
| 424 | .ctrlbit = (1<<19), |
| 425 | }, { |
| 426 | .name = "systimer", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 427 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 428 | .enable = s5pv210_clk_ip3_ctrl, |
| 429 | .ctrlbit = (1<<16), |
| 430 | }, { |
| 431 | .name = "watchdog", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 432 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 433 | .enable = s5pv210_clk_ip3_ctrl, |
| 434 | .ctrlbit = (1<<22), |
| 435 | }, { |
| 436 | .name = "rtc", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 437 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 438 | .enable = s5pv210_clk_ip3_ctrl, |
| 439 | .ctrlbit = (1<<15), |
| 440 | }, { |
| 441 | .name = "i2c", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 442 | .devname = "s3c2440-i2c.0", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 443 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 444 | .enable = s5pv210_clk_ip3_ctrl, |
| 445 | .ctrlbit = (1<<7), |
| 446 | }, { |
| 447 | .name = "i2c", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 448 | .devname = "s3c2440-i2c.1", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 449 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 450 | .enable = s5pv210_clk_ip3_ctrl, |
MyungJoo Ham | f1c894d | 2010-08-21 09:18:19 +0900 | [diff] [blame] | 451 | .ctrlbit = (1 << 10), |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 452 | }, { |
| 453 | .name = "i2c", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 454 | .devname = "s3c2440-i2c.2", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 455 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 456 | .enable = s5pv210_clk_ip3_ctrl, |
| 457 | .ctrlbit = (1<<9), |
| 458 | }, { |
Tomasz Stanislawski | c40e7e0 | 2011-09-16 18:44:36 +0900 | [diff] [blame] | 459 | .name = "i2c", |
| 460 | .devname = "s3c2440-hdmiphy-i2c", |
| 461 | .parent = &clk_pclk_psys.clk, |
| 462 | .enable = s5pv210_clk_ip3_ctrl, |
| 463 | .ctrlbit = (1 << 11), |
| 464 | }, { |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 465 | .name = "spi", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 466 | .devname = "s3c64xx-spi.0", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 467 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 468 | .enable = s5pv210_clk_ip3_ctrl, |
| 469 | .ctrlbit = (1<<12), |
| 470 | }, { |
| 471 | .name = "spi", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 472 | .devname = "s3c64xx-spi.1", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 473 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 474 | .enable = s5pv210_clk_ip3_ctrl, |
| 475 | .ctrlbit = (1<<13), |
| 476 | }, { |
| 477 | .name = "spi", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 478 | .devname = "s3c64xx-spi.2", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 479 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 480 | .enable = s5pv210_clk_ip3_ctrl, |
| 481 | .ctrlbit = (1<<14), |
| 482 | }, { |
| 483 | .name = "timers", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 484 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 485 | .enable = s5pv210_clk_ip3_ctrl, |
| 486 | .ctrlbit = (1<<23), |
| 487 | }, { |
| 488 | .name = "adc", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 489 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 490 | .enable = s5pv210_clk_ip3_ctrl, |
| 491 | .ctrlbit = (1<<24), |
| 492 | }, { |
| 493 | .name = "keypad", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 494 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 495 | .enable = s5pv210_clk_ip3_ctrl, |
| 496 | .ctrlbit = (1<<21), |
| 497 | }, { |
Jassi Brar | 9aa2570 | 2010-11-19 08:49:44 +0900 | [diff] [blame] | 498 | .name = "iis", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 499 | .devname = "samsung-i2s.0", |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 500 | .parent = &clk_p, |
| 501 | .enable = s5pv210_clk_ip3_ctrl, |
| 502 | .ctrlbit = (1<<4), |
| 503 | }, { |
Jassi Brar | 9aa2570 | 2010-11-19 08:49:44 +0900 | [diff] [blame] | 504 | .name = "iis", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 505 | .devname = "samsung-i2s.1", |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 506 | .parent = &clk_p, |
| 507 | .enable = s5pv210_clk_ip3_ctrl, |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 508 | .ctrlbit = (1 << 5), |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 509 | }, { |
Jassi Brar | 9aa2570 | 2010-11-19 08:49:44 +0900 | [diff] [blame] | 510 | .name = "iis", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 511 | .devname = "samsung-i2s.2", |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 512 | .parent = &clk_p, |
| 513 | .enable = s5pv210_clk_ip3_ctrl, |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 514 | .ctrlbit = (1 << 6), |
Seungwhan Youn | aa21ae3 | 2010-10-14 10:35:24 +0900 | [diff] [blame] | 515 | }, { |
| 516 | .name = "spdif", |
Seungwhan Youn | aa21ae3 | 2010-10-14 10:35:24 +0900 | [diff] [blame] | 517 | .parent = &clk_p, |
| 518 | .enable = s5pv210_clk_ip3_ctrl, |
| 519 | .ctrlbit = (1 << 0), |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 520 | }, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 521 | }; |
| 522 | |
| 523 | static struct clk init_clocks[] = { |
| 524 | { |
Thomas Abraham | 664f5b2 | 2010-05-17 09:38:44 +0900 | [diff] [blame] | 525 | .name = "hclk_imem", |
Thomas Abraham | 664f5b2 | 2010-05-17 09:38:44 +0900 | [diff] [blame] | 526 | .parent = &clk_hclk_msys.clk, |
| 527 | .ctrlbit = (1 << 5), |
| 528 | .enable = s5pv210_clk_ip0_ctrl, |
| 529 | .ops = &clk_hclk_imem_ops, |
| 530 | }, { |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 531 | .name = "uart", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 532 | .devname = "s5pv210-uart.0", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 533 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 534 | .enable = s5pv210_clk_ip3_ctrl, |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 535 | .ctrlbit = (1 << 17), |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 536 | }, { |
| 537 | .name = "uart", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 538 | .devname = "s5pv210-uart.1", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 539 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 540 | .enable = s5pv210_clk_ip3_ctrl, |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 541 | .ctrlbit = (1 << 18), |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 542 | }, { |
| 543 | .name = "uart", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 544 | .devname = "s5pv210-uart.2", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 545 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 546 | .enable = s5pv210_clk_ip3_ctrl, |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 547 | .ctrlbit = (1 << 19), |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 548 | }, { |
| 549 | .name = "uart", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 550 | .devname = "s5pv210-uart.3", |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 551 | .parent = &clk_pclk_psys.clk, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 552 | .enable = s5pv210_clk_ip3_ctrl, |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 553 | .ctrlbit = (1 << 20), |
Thomas Abraham | 81f9bec | 2010-12-01 18:12:48 +0530 | [diff] [blame] | 554 | }, { |
| 555 | .name = "sromc", |
Thomas Abraham | 81f9bec | 2010-12-01 18:12:48 +0530 | [diff] [blame] | 556 | .parent = &clk_hclk_psys.clk, |
| 557 | .enable = s5pv210_clk_ip1_ctrl, |
| 558 | .ctrlbit = (1 << 26), |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 559 | }, |
| 560 | }; |
| 561 | |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 562 | static struct clk *clkset_uart_list[] = { |
| 563 | [6] = &clk_mout_mpll.clk, |
| 564 | [7] = &clk_mout_epll.clk, |
| 565 | }; |
| 566 | |
| 567 | static struct clksrc_sources clkset_uart = { |
| 568 | .sources = clkset_uart_list, |
| 569 | .nr_sources = ARRAY_SIZE(clkset_uart_list), |
| 570 | }; |
| 571 | |
Thomas Abraham | 2cf4c2e | 2010-05-17 09:38:55 +0900 | [diff] [blame] | 572 | static struct clk *clkset_group1_list[] = { |
| 573 | [0] = &clk_sclk_a2m.clk, |
| 574 | [1] = &clk_mout_mpll.clk, |
| 575 | [2] = &clk_mout_epll.clk, |
| 576 | [3] = &clk_sclk_vpll.clk, |
| 577 | }; |
| 578 | |
| 579 | static struct clksrc_sources clkset_group1 = { |
| 580 | .sources = clkset_group1_list, |
| 581 | .nr_sources = ARRAY_SIZE(clkset_group1_list), |
| 582 | }; |
| 583 | |
| 584 | static struct clk *clkset_sclk_onenand_list[] = { |
| 585 | [0] = &clk_hclk_psys.clk, |
| 586 | [1] = &clk_hclk_dsys.clk, |
| 587 | }; |
| 588 | |
| 589 | static struct clksrc_sources clkset_sclk_onenand = { |
| 590 | .sources = clkset_sclk_onenand_list, |
| 591 | .nr_sources = ARRAY_SIZE(clkset_sclk_onenand_list), |
| 592 | }; |
| 593 | |
Thomas Abraham | 9e20614 | 2010-05-17 09:38:57 +0900 | [diff] [blame] | 594 | static struct clk *clkset_sclk_dac_list[] = { |
| 595 | [0] = &clk_sclk_vpll.clk, |
| 596 | [1] = &clk_sclk_hdmiphy, |
| 597 | }; |
| 598 | |
| 599 | static struct clksrc_sources clkset_sclk_dac = { |
| 600 | .sources = clkset_sclk_dac_list, |
| 601 | .nr_sources = ARRAY_SIZE(clkset_sclk_dac_list), |
| 602 | }; |
| 603 | |
| 604 | static struct clksrc_clk clk_sclk_dac = { |
| 605 | .clk = { |
| 606 | .name = "sclk_dac", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 607 | .enable = s5pv210_clk_mask0_ctrl, |
| 608 | .ctrlbit = (1 << 2), |
Thomas Abraham | 9e20614 | 2010-05-17 09:38:57 +0900 | [diff] [blame] | 609 | }, |
| 610 | .sources = &clkset_sclk_dac, |
| 611 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 8, .size = 1 }, |
| 612 | }; |
| 613 | |
| 614 | static struct clksrc_clk clk_sclk_pixel = { |
| 615 | .clk = { |
| 616 | .name = "sclk_pixel", |
Thomas Abraham | 9e20614 | 2010-05-17 09:38:57 +0900 | [diff] [blame] | 617 | .parent = &clk_sclk_vpll.clk, |
| 618 | }, |
| 619 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 0, .size = 4}, |
| 620 | }; |
| 621 | |
| 622 | static struct clk *clkset_sclk_hdmi_list[] = { |
| 623 | [0] = &clk_sclk_pixel.clk, |
| 624 | [1] = &clk_sclk_hdmiphy, |
| 625 | }; |
| 626 | |
| 627 | static struct clksrc_sources clkset_sclk_hdmi = { |
| 628 | .sources = clkset_sclk_hdmi_list, |
| 629 | .nr_sources = ARRAY_SIZE(clkset_sclk_hdmi_list), |
| 630 | }; |
| 631 | |
| 632 | static struct clksrc_clk clk_sclk_hdmi = { |
| 633 | .clk = { |
| 634 | .name = "sclk_hdmi", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 635 | .enable = s5pv210_clk_mask0_ctrl, |
| 636 | .ctrlbit = (1 << 0), |
Thomas Abraham | 9e20614 | 2010-05-17 09:38:57 +0900 | [diff] [blame] | 637 | }, |
| 638 | .sources = &clkset_sclk_hdmi, |
| 639 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 0, .size = 1 }, |
| 640 | }; |
| 641 | |
| 642 | static struct clk *clkset_sclk_mixer_list[] = { |
| 643 | [0] = &clk_sclk_dac.clk, |
| 644 | [1] = &clk_sclk_hdmi.clk, |
| 645 | }; |
| 646 | |
| 647 | static struct clksrc_sources clkset_sclk_mixer = { |
| 648 | .sources = clkset_sclk_mixer_list, |
| 649 | .nr_sources = ARRAY_SIZE(clkset_sclk_mixer_list), |
| 650 | }; |
| 651 | |
Tomasz Stanislawski | fbf0556 | 2011-09-19 16:44:42 +0900 | [diff] [blame] | 652 | static struct clksrc_clk clk_sclk_mixer = { |
| 653 | .clk = { |
| 654 | .name = "sclk_mixer", |
| 655 | .enable = s5pv210_clk_mask0_ctrl, |
| 656 | .ctrlbit = (1 << 1), |
| 657 | }, |
| 658 | .sources = &clkset_sclk_mixer, |
| 659 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 4, .size = 1 }, |
| 660 | }; |
| 661 | |
| 662 | static struct clksrc_clk *sclk_tv[] = { |
| 663 | &clk_sclk_dac, |
| 664 | &clk_sclk_pixel, |
| 665 | &clk_sclk_hdmi, |
| 666 | &clk_sclk_mixer, |
| 667 | }; |
| 668 | |
Thomas Abraham | 4583487 | 2010-05-17 09:39:00 +0900 | [diff] [blame] | 669 | static struct clk *clkset_sclk_audio0_list[] = { |
| 670 | [0] = &clk_ext_xtal_mux, |
| 671 | [1] = &clk_pcmcdclk0, |
| 672 | [2] = &clk_sclk_hdmi27m, |
| 673 | [3] = &clk_sclk_usbphy0, |
| 674 | [4] = &clk_sclk_usbphy1, |
| 675 | [5] = &clk_sclk_hdmiphy, |
| 676 | [6] = &clk_mout_mpll.clk, |
| 677 | [7] = &clk_mout_epll.clk, |
| 678 | [8] = &clk_sclk_vpll.clk, |
| 679 | }; |
| 680 | |
| 681 | static struct clksrc_sources clkset_sclk_audio0 = { |
| 682 | .sources = clkset_sclk_audio0_list, |
| 683 | .nr_sources = ARRAY_SIZE(clkset_sclk_audio0_list), |
| 684 | }; |
| 685 | |
| 686 | static struct clksrc_clk clk_sclk_audio0 = { |
| 687 | .clk = { |
| 688 | .name = "sclk_audio", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 689 | .devname = "soc-audio.0", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 690 | .enable = s5pv210_clk_mask0_ctrl, |
| 691 | .ctrlbit = (1 << 24), |
Thomas Abraham | 4583487 | 2010-05-17 09:39:00 +0900 | [diff] [blame] | 692 | }, |
| 693 | .sources = &clkset_sclk_audio0, |
| 694 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 0, .size = 4 }, |
| 695 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 0, .size = 4 }, |
| 696 | }; |
| 697 | |
| 698 | static struct clk *clkset_sclk_audio1_list[] = { |
| 699 | [0] = &clk_ext_xtal_mux, |
| 700 | [1] = &clk_pcmcdclk1, |
| 701 | [2] = &clk_sclk_hdmi27m, |
| 702 | [3] = &clk_sclk_usbphy0, |
| 703 | [4] = &clk_sclk_usbphy1, |
| 704 | [5] = &clk_sclk_hdmiphy, |
| 705 | [6] = &clk_mout_mpll.clk, |
| 706 | [7] = &clk_mout_epll.clk, |
| 707 | [8] = &clk_sclk_vpll.clk, |
| 708 | }; |
| 709 | |
| 710 | static struct clksrc_sources clkset_sclk_audio1 = { |
| 711 | .sources = clkset_sclk_audio1_list, |
| 712 | .nr_sources = ARRAY_SIZE(clkset_sclk_audio1_list), |
| 713 | }; |
| 714 | |
| 715 | static struct clksrc_clk clk_sclk_audio1 = { |
| 716 | .clk = { |
| 717 | .name = "sclk_audio", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 718 | .devname = "soc-audio.1", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 719 | .enable = s5pv210_clk_mask0_ctrl, |
| 720 | .ctrlbit = (1 << 25), |
Thomas Abraham | 4583487 | 2010-05-17 09:39:00 +0900 | [diff] [blame] | 721 | }, |
| 722 | .sources = &clkset_sclk_audio1, |
| 723 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 4, .size = 4 }, |
| 724 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 4, .size = 4 }, |
| 725 | }; |
| 726 | |
| 727 | static struct clk *clkset_sclk_audio2_list[] = { |
| 728 | [0] = &clk_ext_xtal_mux, |
| 729 | [1] = &clk_pcmcdclk0, |
| 730 | [2] = &clk_sclk_hdmi27m, |
| 731 | [3] = &clk_sclk_usbphy0, |
| 732 | [4] = &clk_sclk_usbphy1, |
| 733 | [5] = &clk_sclk_hdmiphy, |
| 734 | [6] = &clk_mout_mpll.clk, |
| 735 | [7] = &clk_mout_epll.clk, |
| 736 | [8] = &clk_sclk_vpll.clk, |
| 737 | }; |
| 738 | |
| 739 | static struct clksrc_sources clkset_sclk_audio2 = { |
| 740 | .sources = clkset_sclk_audio2_list, |
| 741 | .nr_sources = ARRAY_SIZE(clkset_sclk_audio2_list), |
| 742 | }; |
| 743 | |
| 744 | static struct clksrc_clk clk_sclk_audio2 = { |
| 745 | .clk = { |
| 746 | .name = "sclk_audio", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 747 | .devname = "soc-audio.2", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 748 | .enable = s5pv210_clk_mask0_ctrl, |
| 749 | .ctrlbit = (1 << 26), |
Thomas Abraham | 4583487 | 2010-05-17 09:39:00 +0900 | [diff] [blame] | 750 | }, |
| 751 | .sources = &clkset_sclk_audio2, |
| 752 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 8, .size = 4 }, |
| 753 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 8, .size = 4 }, |
| 754 | }; |
| 755 | |
| 756 | static struct clk *clkset_sclk_spdif_list[] = { |
| 757 | [0] = &clk_sclk_audio0.clk, |
| 758 | [1] = &clk_sclk_audio1.clk, |
| 759 | [2] = &clk_sclk_audio2.clk, |
| 760 | }; |
| 761 | |
| 762 | static struct clksrc_sources clkset_sclk_spdif = { |
| 763 | .sources = clkset_sclk_spdif_list, |
| 764 | .nr_sources = ARRAY_SIZE(clkset_sclk_spdif_list), |
| 765 | }; |
| 766 | |
Seungwhan Youn | aa21ae3 | 2010-10-14 10:35:24 +0900 | [diff] [blame] | 767 | static struct clksrc_clk clk_sclk_spdif = { |
| 768 | .clk = { |
| 769 | .name = "sclk_spdif", |
Seungwhan Youn | aa21ae3 | 2010-10-14 10:35:24 +0900 | [diff] [blame] | 770 | .enable = s5pv210_clk_mask0_ctrl, |
| 771 | .ctrlbit = (1 << 27), |
Naveen Krishna Chatradhi | 65f5eaa | 2011-07-18 14:44:19 +0900 | [diff] [blame] | 772 | .ops = &s5p_sclk_spdif_ops, |
Seungwhan Youn | aa21ae3 | 2010-10-14 10:35:24 +0900 | [diff] [blame] | 773 | }, |
| 774 | .sources = &clkset_sclk_spdif, |
| 775 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 12, .size = 2 }, |
| 776 | }; |
| 777 | |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 778 | static struct clk *clkset_group2_list[] = { |
| 779 | [0] = &clk_ext_xtal_mux, |
| 780 | [1] = &clk_xusbxti, |
| 781 | [2] = &clk_sclk_hdmi27m, |
| 782 | [3] = &clk_sclk_usbphy0, |
| 783 | [4] = &clk_sclk_usbphy1, |
| 784 | [5] = &clk_sclk_hdmiphy, |
| 785 | [6] = &clk_mout_mpll.clk, |
| 786 | [7] = &clk_mout_epll.clk, |
| 787 | [8] = &clk_sclk_vpll.clk, |
| 788 | }; |
| 789 | |
| 790 | static struct clksrc_sources clkset_group2 = { |
| 791 | .sources = clkset_group2_list, |
| 792 | .nr_sources = ARRAY_SIZE(clkset_group2_list), |
| 793 | }; |
| 794 | |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 795 | static struct clksrc_clk clksrcs[] = { |
| 796 | { |
| 797 | .clk = { |
Thomas Abraham | 2cf4c2e | 2010-05-17 09:38:55 +0900 | [diff] [blame] | 798 | .name = "sclk_dmc", |
Thomas Abraham | 2cf4c2e | 2010-05-17 09:38:55 +0900 | [diff] [blame] | 799 | }, |
| 800 | .sources = &clkset_group1, |
| 801 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 24, .size = 2 }, |
| 802 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 28, .size = 4 }, |
| 803 | }, { |
| 804 | .clk = { |
| 805 | .name = "sclk_onenand", |
Thomas Abraham | 2cf4c2e | 2010-05-17 09:38:55 +0900 | [diff] [blame] | 806 | }, |
| 807 | .sources = &clkset_sclk_onenand, |
| 808 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 28, .size = 1 }, |
| 809 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 12, .size = 3 }, |
| 810 | }, { |
| 811 | .clk = { |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 812 | .name = "uclk1", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 813 | .devname = "s5pv210-uart.0", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 814 | .enable = s5pv210_clk_mask0_ctrl, |
| 815 | .ctrlbit = (1 << 12), |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 816 | }, |
| 817 | .sources = &clkset_uart, |
| 818 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 16, .size = 4 }, |
| 819 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 16, .size = 4 }, |
Thomas Abraham | 9e20614 | 2010-05-17 09:38:57 +0900 | [diff] [blame] | 820 | }, { |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 821 | .clk = { |
| 822 | .name = "uclk1", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 823 | .devname = "s5pv210-uart.1", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 824 | .enable = s5pv210_clk_mask0_ctrl, |
| 825 | .ctrlbit = (1 << 13), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 826 | }, |
| 827 | .sources = &clkset_uart, |
| 828 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 20, .size = 4 }, |
| 829 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 20, .size = 4 }, |
| 830 | }, { |
| 831 | .clk = { |
| 832 | .name = "uclk1", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 833 | .devname = "s5pv210-uart.2", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 834 | .enable = s5pv210_clk_mask0_ctrl, |
| 835 | .ctrlbit = (1 << 14), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 836 | }, |
| 837 | .sources = &clkset_uart, |
| 838 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 24, .size = 4 }, |
| 839 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 24, .size = 4 }, |
| 840 | }, { |
| 841 | .clk = { |
| 842 | .name = "uclk1", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 843 | .devname = "s5pv210-uart.3", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 844 | .enable = s5pv210_clk_mask0_ctrl, |
| 845 | .ctrlbit = (1 << 15), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 846 | }, |
| 847 | .sources = &clkset_uart, |
| 848 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 28, .size = 4 }, |
| 849 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 28, .size = 4 }, |
| 850 | }, { |
Thomas Abraham | 9e20614 | 2010-05-17 09:38:57 +0900 | [diff] [blame] | 851 | .clk = { |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 852 | .name = "sclk_fimc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 853 | .devname = "s5pv210-fimc.0", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 854 | .enable = s5pv210_clk_mask1_ctrl, |
| 855 | .ctrlbit = (1 << 2), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 856 | }, |
| 857 | .sources = &clkset_group2, |
| 858 | .reg_src = { .reg = S5P_CLK_SRC3, .shift = 12, .size = 4 }, |
| 859 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 12, .size = 4 }, |
| 860 | }, { |
| 861 | .clk = { |
| 862 | .name = "sclk_fimc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 863 | .devname = "s5pv210-fimc.1", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 864 | .enable = s5pv210_clk_mask1_ctrl, |
| 865 | .ctrlbit = (1 << 3), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 866 | }, |
| 867 | .sources = &clkset_group2, |
| 868 | .reg_src = { .reg = S5P_CLK_SRC3, .shift = 16, .size = 4 }, |
| 869 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 16, .size = 4 }, |
| 870 | }, { |
| 871 | .clk = { |
| 872 | .name = "sclk_fimc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 873 | .devname = "s5pv210-fimc.2", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 874 | .enable = s5pv210_clk_mask1_ctrl, |
| 875 | .ctrlbit = (1 << 4), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 876 | }, |
| 877 | .sources = &clkset_group2, |
| 878 | .reg_src = { .reg = S5P_CLK_SRC3, .shift = 20, .size = 4 }, |
| 879 | .reg_div = { .reg = S5P_CLK_DIV3, .shift = 20, .size = 4 }, |
| 880 | }, { |
| 881 | .clk = { |
Sylwester Nawrocki | 83427c2 | 2011-09-27 07:00:53 +0900 | [diff] [blame] | 882 | .name = "sclk_cam0", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 883 | .enable = s5pv210_clk_mask0_ctrl, |
| 884 | .ctrlbit = (1 << 3), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 885 | }, |
| 886 | .sources = &clkset_group2, |
| 887 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 12, .size = 4 }, |
| 888 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 12, .size = 4 }, |
| 889 | }, { |
| 890 | .clk = { |
Sylwester Nawrocki | 83427c2 | 2011-09-27 07:00:53 +0900 | [diff] [blame] | 891 | .name = "sclk_cam1", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 892 | .enable = s5pv210_clk_mask0_ctrl, |
| 893 | .ctrlbit = (1 << 4), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 894 | }, |
| 895 | .sources = &clkset_group2, |
| 896 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 16, .size = 4 }, |
| 897 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 16, .size = 4 }, |
| 898 | }, { |
| 899 | .clk = { |
| 900 | .name = "sclk_fimd", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 901 | .enable = s5pv210_clk_mask0_ctrl, |
| 902 | .ctrlbit = (1 << 5), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 903 | }, |
| 904 | .sources = &clkset_group2, |
| 905 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 20, .size = 4 }, |
| 906 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 20, .size = 4 }, |
| 907 | }, { |
| 908 | .clk = { |
| 909 | .name = "sclk_mmc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 910 | .devname = "s3c-sdhci.0", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 911 | .enable = s5pv210_clk_mask0_ctrl, |
| 912 | .ctrlbit = (1 << 8), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 913 | }, |
| 914 | .sources = &clkset_group2, |
| 915 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 0, .size = 4 }, |
| 916 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 0, .size = 4 }, |
| 917 | }, { |
| 918 | .clk = { |
| 919 | .name = "sclk_mmc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 920 | .devname = "s3c-sdhci.1", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 921 | .enable = s5pv210_clk_mask0_ctrl, |
| 922 | .ctrlbit = (1 << 9), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 923 | }, |
| 924 | .sources = &clkset_group2, |
| 925 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 4, .size = 4 }, |
| 926 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 4, .size = 4 }, |
| 927 | }, { |
| 928 | .clk = { |
| 929 | .name = "sclk_mmc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 930 | .devname = "s3c-sdhci.2", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 931 | .enable = s5pv210_clk_mask0_ctrl, |
| 932 | .ctrlbit = (1 << 10), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 933 | }, |
| 934 | .sources = &clkset_group2, |
| 935 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 8, .size = 4 }, |
| 936 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 8, .size = 4 }, |
| 937 | }, { |
| 938 | .clk = { |
| 939 | .name = "sclk_mmc", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 940 | .devname = "s3c-sdhci.3", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 941 | .enable = s5pv210_clk_mask0_ctrl, |
| 942 | .ctrlbit = (1 << 11), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 943 | }, |
| 944 | .sources = &clkset_group2, |
| 945 | .reg_src = { .reg = S5P_CLK_SRC4, .shift = 12, .size = 4 }, |
| 946 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 12, .size = 4 }, |
| 947 | }, { |
| 948 | .clk = { |
| 949 | .name = "sclk_mfc", |
Kamil Debski | 0f75a96 | 2011-07-21 16:42:30 +0900 | [diff] [blame] | 950 | .devname = "s5p-mfc", |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 951 | .enable = s5pv210_clk_ip0_ctrl, |
| 952 | .ctrlbit = (1 << 16), |
| 953 | }, |
| 954 | .sources = &clkset_group1, |
| 955 | .reg_src = { .reg = S5P_CLK_SRC2, .shift = 4, .size = 2 }, |
| 956 | .reg_div = { .reg = S5P_CLK_DIV2, .shift = 4, .size = 4 }, |
| 957 | }, { |
| 958 | .clk = { |
| 959 | .name = "sclk_g2d", |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 960 | .enable = s5pv210_clk_ip0_ctrl, |
| 961 | .ctrlbit = (1 << 12), |
| 962 | }, |
| 963 | .sources = &clkset_group1, |
| 964 | .reg_src = { .reg = S5P_CLK_SRC2, .shift = 8, .size = 2 }, |
| 965 | .reg_div = { .reg = S5P_CLK_DIV2, .shift = 8, .size = 4 }, |
| 966 | }, { |
| 967 | .clk = { |
| 968 | .name = "sclk_g3d", |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 969 | .enable = s5pv210_clk_ip0_ctrl, |
| 970 | .ctrlbit = (1 << 8), |
| 971 | }, |
| 972 | .sources = &clkset_group1, |
| 973 | .reg_src = { .reg = S5P_CLK_SRC2, .shift = 0, .size = 2 }, |
| 974 | .reg_div = { .reg = S5P_CLK_DIV2, .shift = 0, .size = 4 }, |
| 975 | }, { |
| 976 | .clk = { |
| 977 | .name = "sclk_csis", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 978 | .enable = s5pv210_clk_mask0_ctrl, |
| 979 | .ctrlbit = (1 << 6), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 980 | }, |
| 981 | .sources = &clkset_group2, |
| 982 | .reg_src = { .reg = S5P_CLK_SRC1, .shift = 24, .size = 4 }, |
| 983 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 28, .size = 4 }, |
| 984 | }, { |
| 985 | .clk = { |
| 986 | .name = "sclk_spi", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 987 | .devname = "s3c64xx-spi.0", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 988 | .enable = s5pv210_clk_mask0_ctrl, |
| 989 | .ctrlbit = (1 << 16), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 990 | }, |
| 991 | .sources = &clkset_group2, |
| 992 | .reg_src = { .reg = S5P_CLK_SRC5, .shift = 0, .size = 4 }, |
| 993 | .reg_div = { .reg = S5P_CLK_DIV5, .shift = 0, .size = 4 }, |
| 994 | }, { |
| 995 | .clk = { |
| 996 | .name = "sclk_spi", |
Thomas Abraham | b2a9dd4 | 2011-06-14 19:12:27 +0900 | [diff] [blame] | 997 | .devname = "s3c64xx-spi.1", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 998 | .enable = s5pv210_clk_mask0_ctrl, |
| 999 | .ctrlbit = (1 << 17), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 1000 | }, |
| 1001 | .sources = &clkset_group2, |
| 1002 | .reg_src = { .reg = S5P_CLK_SRC5, .shift = 4, .size = 4 }, |
| 1003 | .reg_div = { .reg = S5P_CLK_DIV5, .shift = 4, .size = 4 }, |
| 1004 | }, { |
| 1005 | .clk = { |
| 1006 | .name = "sclk_pwi", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 1007 | .enable = s5pv210_clk_mask0_ctrl, |
| 1008 | .ctrlbit = (1 << 29), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 1009 | }, |
| 1010 | .sources = &clkset_group2, |
| 1011 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 20, .size = 4 }, |
| 1012 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 24, .size = 4 }, |
| 1013 | }, { |
| 1014 | .clk = { |
| 1015 | .name = "sclk_pwm", |
MyungJoo Ham | 154d62e | 2010-06-26 17:21:50 +0900 | [diff] [blame] | 1016 | .enable = s5pv210_clk_mask0_ctrl, |
| 1017 | .ctrlbit = (1 << 19), |
Thomas Abraham | f64cacc | 2010-05-17 09:39:03 +0900 | [diff] [blame] | 1018 | }, |
| 1019 | .sources = &clkset_group2, |
| 1020 | .reg_src = { .reg = S5P_CLK_SRC5, .shift = 12, .size = 4 }, |
| 1021 | .reg_div = { .reg = S5P_CLK_DIV5, .shift = 12, .size = 4 }, |
Thomas Abraham | 9e20614 | 2010-05-17 09:38:57 +0900 | [diff] [blame] | 1022 | }, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1023 | }; |
| 1024 | |
| 1025 | /* Clock initialisation code */ |
Thomas Abraham | eb1ef1e | 2010-05-17 09:38:12 +0900 | [diff] [blame] | 1026 | static struct clksrc_clk *sysclks[] = { |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1027 | &clk_mout_apll, |
| 1028 | &clk_mout_epll, |
| 1029 | &clk_mout_mpll, |
Thomas Abraham | 374e0bf | 2010-05-17 09:38:31 +0900 | [diff] [blame] | 1030 | &clk_armclk, |
Thomas Abraham | af76a20 | 2010-05-17 09:38:34 +0900 | [diff] [blame] | 1031 | &clk_hclk_msys, |
Thomas Abraham | 0fe967a | 2010-05-17 09:38:37 +0900 | [diff] [blame] | 1032 | &clk_sclk_a2m, |
| 1033 | &clk_hclk_dsys, |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 1034 | &clk_hclk_psys, |
Thomas Abraham | 6ed91a2 | 2010-05-17 09:38:42 +0900 | [diff] [blame] | 1035 | &clk_pclk_msys, |
Thomas Abraham | 58772cd | 2010-05-17 09:38:48 +0900 | [diff] [blame] | 1036 | &clk_pclk_dsys, |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 1037 | &clk_pclk_psys, |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 1038 | &clk_vpllsrc, |
| 1039 | &clk_sclk_vpll, |
Jaecheol Lee | 08f49d1 | 2010-10-12 09:19:30 +0900 | [diff] [blame] | 1040 | &clk_mout_dmc0, |
| 1041 | &clk_sclk_dmc0, |
Seungwhan Youn | 900fa01 | 2010-10-14 10:35:24 +0900 | [diff] [blame] | 1042 | &clk_sclk_audio0, |
| 1043 | &clk_sclk_audio1, |
| 1044 | &clk_sclk_audio2, |
| 1045 | &clk_sclk_spdif, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1046 | }; |
| 1047 | |
Seungwhan Youn | c9fa7a0 | 2010-10-14 10:39:28 +0900 | [diff] [blame] | 1048 | static u32 epll_div[][6] = { |
| 1049 | { 48000000, 0, 48, 3, 3, 0 }, |
| 1050 | { 96000000, 0, 48, 3, 2, 0 }, |
| 1051 | { 144000000, 1, 72, 3, 2, 0 }, |
| 1052 | { 192000000, 0, 48, 3, 1, 0 }, |
| 1053 | { 288000000, 1, 72, 3, 1, 0 }, |
| 1054 | { 32750000, 1, 65, 3, 4, 35127 }, |
| 1055 | { 32768000, 1, 65, 3, 4, 35127 }, |
| 1056 | { 45158400, 0, 45, 3, 3, 10355 }, |
| 1057 | { 45000000, 0, 45, 3, 3, 10355 }, |
| 1058 | { 45158000, 0, 45, 3, 3, 10355 }, |
| 1059 | { 49125000, 0, 49, 3, 3, 9961 }, |
| 1060 | { 49152000, 0, 49, 3, 3, 9961 }, |
| 1061 | { 67737600, 1, 67, 3, 3, 48366 }, |
| 1062 | { 67738000, 1, 67, 3, 3, 48366 }, |
| 1063 | { 73800000, 1, 73, 3, 3, 47710 }, |
| 1064 | { 73728000, 1, 73, 3, 3, 47710 }, |
| 1065 | { 36000000, 1, 32, 3, 4, 0 }, |
| 1066 | { 60000000, 1, 60, 3, 3, 0 }, |
| 1067 | { 72000000, 1, 72, 3, 3, 0 }, |
| 1068 | { 80000000, 1, 80, 3, 3, 0 }, |
| 1069 | { 84000000, 0, 42, 3, 2, 0 }, |
| 1070 | { 50000000, 0, 50, 3, 3, 0 }, |
| 1071 | }; |
| 1072 | |
| 1073 | static int s5pv210_epll_set_rate(struct clk *clk, unsigned long rate) |
| 1074 | { |
| 1075 | unsigned int epll_con, epll_con_k; |
| 1076 | unsigned int i; |
| 1077 | |
| 1078 | /* Return if nothing changed */ |
| 1079 | if (clk->rate == rate) |
| 1080 | return 0; |
| 1081 | |
| 1082 | epll_con = __raw_readl(S5P_EPLL_CON); |
| 1083 | epll_con_k = __raw_readl(S5P_EPLL_CON1); |
| 1084 | |
| 1085 | epll_con_k &= ~PLL46XX_KDIV_MASK; |
| 1086 | epll_con &= ~(1 << 27 | |
| 1087 | PLL46XX_MDIV_MASK << PLL46XX_MDIV_SHIFT | |
| 1088 | PLL46XX_PDIV_MASK << PLL46XX_PDIV_SHIFT | |
| 1089 | PLL46XX_SDIV_MASK << PLL46XX_SDIV_SHIFT); |
| 1090 | |
| 1091 | for (i = 0; i < ARRAY_SIZE(epll_div); i++) { |
| 1092 | if (epll_div[i][0] == rate) { |
| 1093 | epll_con_k |= epll_div[i][5] << 0; |
| 1094 | epll_con |= (epll_div[i][1] << 27 | |
| 1095 | epll_div[i][2] << PLL46XX_MDIV_SHIFT | |
| 1096 | epll_div[i][3] << PLL46XX_PDIV_SHIFT | |
| 1097 | epll_div[i][4] << PLL46XX_SDIV_SHIFT); |
| 1098 | break; |
| 1099 | } |
| 1100 | } |
| 1101 | |
| 1102 | if (i == ARRAY_SIZE(epll_div)) { |
| 1103 | printk(KERN_ERR "%s: Invalid Clock EPLL Frequency\n", |
| 1104 | __func__); |
| 1105 | return -EINVAL; |
| 1106 | } |
| 1107 | |
| 1108 | __raw_writel(epll_con, S5P_EPLL_CON); |
| 1109 | __raw_writel(epll_con_k, S5P_EPLL_CON1); |
| 1110 | |
Seungwhan Youn | 9616674 | 2010-10-14 10:39:33 +0900 | [diff] [blame] | 1111 | printk(KERN_WARNING "EPLL Rate changes from %lu to %lu\n", |
| 1112 | clk->rate, rate); |
| 1113 | |
Seungwhan Youn | c9fa7a0 | 2010-10-14 10:39:28 +0900 | [diff] [blame] | 1114 | clk->rate = rate; |
| 1115 | |
| 1116 | return 0; |
| 1117 | } |
| 1118 | |
| 1119 | static struct clk_ops s5pv210_epll_ops = { |
| 1120 | .set_rate = s5pv210_epll_set_rate, |
| 1121 | .get_rate = s5p_epll_get_rate, |
| 1122 | }; |
| 1123 | |
Tomasz Stanislawski | fbf0556 | 2011-09-19 16:44:42 +0900 | [diff] [blame] | 1124 | static u32 vpll_div[][5] = { |
| 1125 | { 54000000, 3, 53, 3, 0 }, |
| 1126 | { 108000000, 3, 53, 2, 0 }, |
| 1127 | }; |
| 1128 | |
| 1129 | static unsigned long s5pv210_vpll_get_rate(struct clk *clk) |
| 1130 | { |
| 1131 | return clk->rate; |
| 1132 | } |
| 1133 | |
| 1134 | static int s5pv210_vpll_set_rate(struct clk *clk, unsigned long rate) |
| 1135 | { |
| 1136 | unsigned int vpll_con; |
| 1137 | unsigned int i; |
| 1138 | |
| 1139 | /* Return if nothing changed */ |
| 1140 | if (clk->rate == rate) |
| 1141 | return 0; |
| 1142 | |
| 1143 | vpll_con = __raw_readl(S5P_VPLL_CON); |
| 1144 | vpll_con &= ~(0x1 << 27 | \ |
| 1145 | PLL90XX_MDIV_MASK << PLL90XX_MDIV_SHIFT | \ |
| 1146 | PLL90XX_PDIV_MASK << PLL90XX_PDIV_SHIFT | \ |
| 1147 | PLL90XX_SDIV_MASK << PLL90XX_SDIV_SHIFT); |
| 1148 | |
| 1149 | for (i = 0; i < ARRAY_SIZE(vpll_div); i++) { |
| 1150 | if (vpll_div[i][0] == rate) { |
| 1151 | vpll_con |= vpll_div[i][1] << PLL90XX_PDIV_SHIFT; |
| 1152 | vpll_con |= vpll_div[i][2] << PLL90XX_MDIV_SHIFT; |
| 1153 | vpll_con |= vpll_div[i][3] << PLL90XX_SDIV_SHIFT; |
| 1154 | vpll_con |= vpll_div[i][4] << 27; |
| 1155 | break; |
| 1156 | } |
| 1157 | } |
| 1158 | |
| 1159 | if (i == ARRAY_SIZE(vpll_div)) { |
| 1160 | printk(KERN_ERR "%s: Invalid Clock VPLL Frequency\n", |
| 1161 | __func__); |
| 1162 | return -EINVAL; |
| 1163 | } |
| 1164 | |
| 1165 | __raw_writel(vpll_con, S5P_VPLL_CON); |
| 1166 | |
| 1167 | /* Wait for VPLL lock */ |
| 1168 | while (!(__raw_readl(S5P_VPLL_CON) & (1 << PLL90XX_LOCKED_SHIFT))) |
| 1169 | continue; |
| 1170 | |
| 1171 | clk->rate = rate; |
| 1172 | return 0; |
| 1173 | } |
| 1174 | static struct clk_ops s5pv210_vpll_ops = { |
| 1175 | .get_rate = s5pv210_vpll_get_rate, |
| 1176 | .set_rate = s5pv210_vpll_set_rate, |
| 1177 | }; |
| 1178 | |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1179 | void __init_or_cpufreq s5pv210_setup_clocks(void) |
| 1180 | { |
| 1181 | struct clk *xtal_clk; |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 1182 | unsigned long vpllsrc; |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1183 | unsigned long armclk; |
Thomas Abraham | af76a20 | 2010-05-17 09:38:34 +0900 | [diff] [blame] | 1184 | unsigned long hclk_msys; |
Thomas Abraham | 0fe967a | 2010-05-17 09:38:37 +0900 | [diff] [blame] | 1185 | unsigned long hclk_dsys; |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 1186 | unsigned long hclk_psys; |
Thomas Abraham | 6ed91a2 | 2010-05-17 09:38:42 +0900 | [diff] [blame] | 1187 | unsigned long pclk_msys; |
Thomas Abraham | 58772cd | 2010-05-17 09:38:48 +0900 | [diff] [blame] | 1188 | unsigned long pclk_dsys; |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 1189 | unsigned long pclk_psys; |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1190 | unsigned long apll; |
| 1191 | unsigned long mpll; |
| 1192 | unsigned long epll; |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 1193 | unsigned long vpll; |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1194 | unsigned int ptr; |
| 1195 | u32 clkdiv0, clkdiv1; |
| 1196 | |
Seungwhan Youn | c9fa7a0 | 2010-10-14 10:39:28 +0900 | [diff] [blame] | 1197 | /* Set functions for clk_fout_epll */ |
| 1198 | clk_fout_epll.enable = s5p_epll_enable; |
| 1199 | clk_fout_epll.ops = &s5pv210_epll_ops; |
| 1200 | |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1201 | printk(KERN_DEBUG "%s: registering clocks\n", __func__); |
| 1202 | |
| 1203 | clkdiv0 = __raw_readl(S5P_CLK_DIV0); |
| 1204 | clkdiv1 = __raw_readl(S5P_CLK_DIV1); |
| 1205 | |
| 1206 | printk(KERN_DEBUG "%s: clkdiv0 = %08x, clkdiv1 = %08x\n", |
| 1207 | __func__, clkdiv0, clkdiv1); |
| 1208 | |
| 1209 | xtal_clk = clk_get(NULL, "xtal"); |
| 1210 | BUG_ON(IS_ERR(xtal_clk)); |
| 1211 | |
| 1212 | xtal = clk_get_rate(xtal_clk); |
| 1213 | clk_put(xtal_clk); |
| 1214 | |
| 1215 | printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal); |
| 1216 | |
| 1217 | apll = s5p_get_pll45xx(xtal, __raw_readl(S5P_APLL_CON), pll_4508); |
| 1218 | mpll = s5p_get_pll45xx(xtal, __raw_readl(S5P_MPLL_CON), pll_4502); |
Seungwhan Youn | 42a6e20 | 2010-10-14 10:39:15 +0900 | [diff] [blame] | 1219 | epll = s5p_get_pll46xx(xtal, __raw_readl(S5P_EPLL_CON), |
| 1220 | __raw_readl(S5P_EPLL_CON1), pll_4600); |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 1221 | vpllsrc = clk_get_rate(&clk_vpllsrc.clk); |
| 1222 | vpll = s5p_get_pll45xx(vpllsrc, __raw_readl(S5P_VPLL_CON), pll_4502); |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1223 | |
Jaecheol Lee | 8869584 | 2010-10-12 09:19:26 +0900 | [diff] [blame] | 1224 | clk_fout_apll.ops = &clk_fout_apll_ops; |
Thomas Abraham | c62ec6a | 2010-05-17 09:38:28 +0900 | [diff] [blame] | 1225 | clk_fout_mpll.rate = mpll; |
| 1226 | clk_fout_epll.rate = epll; |
Tomasz Stanislawski | fbf0556 | 2011-09-19 16:44:42 +0900 | [diff] [blame] | 1227 | clk_fout_vpll.ops = &s5pv210_vpll_ops; |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 1228 | clk_fout_vpll.rate = vpll; |
Thomas Abraham | c62ec6a | 2010-05-17 09:38:28 +0900 | [diff] [blame] | 1229 | |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 1230 | printk(KERN_INFO "S5PV210: PLL settings, A=%ld, M=%ld, E=%ld V=%ld", |
| 1231 | apll, mpll, epll, vpll); |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1232 | |
Thomas Abraham | 374e0bf | 2010-05-17 09:38:31 +0900 | [diff] [blame] | 1233 | armclk = clk_get_rate(&clk_armclk.clk); |
Thomas Abraham | af76a20 | 2010-05-17 09:38:34 +0900 | [diff] [blame] | 1234 | hclk_msys = clk_get_rate(&clk_hclk_msys.clk); |
Thomas Abraham | 0fe967a | 2010-05-17 09:38:37 +0900 | [diff] [blame] | 1235 | hclk_dsys = clk_get_rate(&clk_hclk_dsys.clk); |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 1236 | hclk_psys = clk_get_rate(&clk_hclk_psys.clk); |
Thomas Abraham | 6ed91a2 | 2010-05-17 09:38:42 +0900 | [diff] [blame] | 1237 | pclk_msys = clk_get_rate(&clk_pclk_msys.clk); |
Thomas Abraham | 58772cd | 2010-05-17 09:38:48 +0900 | [diff] [blame] | 1238 | pclk_dsys = clk_get_rate(&clk_pclk_dsys.clk); |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 1239 | pclk_psys = clk_get_rate(&clk_pclk_psys.clk); |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1240 | |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 1241 | printk(KERN_INFO "S5PV210: ARMCLK=%ld, HCLKM=%ld, HCLKD=%ld\n" |
| 1242 | "HCLKP=%ld, PCLKM=%ld, PCLKD=%ld, PCLKP=%ld\n", |
| 1243 | armclk, hclk_msys, hclk_dsys, hclk_psys, |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 1244 | pclk_msys, pclk_dsys, pclk_psys); |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1245 | |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1246 | clk_f.rate = armclk; |
Thomas Abraham | acfa245 | 2010-05-17 09:38:40 +0900 | [diff] [blame] | 1247 | clk_h.rate = hclk_psys; |
Thomas Abraham | f44cf78 | 2010-05-17 09:38:50 +0900 | [diff] [blame] | 1248 | clk_p.rate = pclk_psys; |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1249 | |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1250 | for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++) |
| 1251 | s3c_set_clksrc(&clksrcs[ptr], true); |
| 1252 | } |
| 1253 | |
| 1254 | static struct clk *clks[] __initdata = { |
Thomas Abraham | f445dbd | 2010-05-17 09:38:52 +0900 | [diff] [blame] | 1255 | &clk_sclk_hdmi27m, |
Thomas Abraham | 2cf4c2e | 2010-05-17 09:38:55 +0900 | [diff] [blame] | 1256 | &clk_sclk_hdmiphy, |
| 1257 | &clk_sclk_usbphy0, |
| 1258 | &clk_sclk_usbphy1, |
Thomas Abraham | 4583487 | 2010-05-17 09:39:00 +0900 | [diff] [blame] | 1259 | &clk_pcmcdclk0, |
| 1260 | &clk_pcmcdclk1, |
| 1261 | &clk_pcmcdclk2, |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1262 | }; |
| 1263 | |
| 1264 | void __init s5pv210_register_clocks(void) |
| 1265 | { |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1266 | int ptr; |
| 1267 | |
Kukjin Kim | 3c0fa64 | 2011-01-04 17:51:30 +0900 | [diff] [blame] | 1268 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1269 | |
Thomas Abraham | eb1ef1e | 2010-05-17 09:38:12 +0900 | [diff] [blame] | 1270 | for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) |
| 1271 | s3c_register_clksrc(sysclks[ptr], 1); |
| 1272 | |
Tomasz Stanislawski | fbf0556 | 2011-09-19 16:44:42 +0900 | [diff] [blame] | 1273 | for (ptr = 0; ptr < ARRAY_SIZE(sclk_tv); ptr++) |
| 1274 | s3c_register_clksrc(sclk_tv[ptr], 1); |
| 1275 | |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1276 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
| 1277 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
| 1278 | |
Kukjin Kim | 3c0fa64 | 2011-01-04 17:51:30 +0900 | [diff] [blame] | 1279 | s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
| 1280 | s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1281 | |
Boojin Kim | dafc954 | 2011-09-02 09:44:37 +0900 | [diff] [blame] | 1282 | s3c24xx_register_clock(&dummy_apb_pclk); |
Kukjin Kim | 0c1945d | 2010-02-24 16:40:36 +0900 | [diff] [blame] | 1283 | s3c_pwmclk_init(); |
| 1284 | } |