aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/tegra/clk-tegra20.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-04 15:31:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-04 15:31:18 -0400
commit6fa52ed33bea997374a88dbacbba5bf8c7ac4fef (patch)
treea0904b78d66c9b99d6acf944cf58bcaa0cffc511 /drivers/clk/tegra/clk-tegra20.c
parent1db772216f48978d5146b858586f6178433aad38 (diff)
parentbc8fd900c4d460b4e4bf785bb48bfced0ac9941b (diff)
Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC driver changes from Olof Johansson: "This is a rather large set of patches for device drivers that for one reason or another the subsystem maintainer preferred to get merged through the arm-soc tree. There are both new drivers as well as existing drivers that are getting converted from platform-specific code into standalone drivers using the appropriate subsystem specific interfaces. In particular, we can now have pinctrl, clk, clksource and irqchip drivers in one file per driver, without the need to call into platform specific interface, or to get called from platform specific code, as long as all information about the hardware is provided through a device tree. Most of the drivers we touch this time are for clocksource. Since now most of them are part of drivers/clocksource, I expect that we won't have to touch these again from arm-soc and can let the clocksource maintainers take care of these in the future. Another larger part of this series is specific to the exynos platform, which is seeing some significant effort in upstreaming and modernization of its device drivers this time around, which unfortunately is also the cause for the churn and a lot of the merge conflicts. There is one new subsystem that gets merged as part of this series: the reset controller interface, which is a very simple interface for taking devices on the SoC out of reset or back into reset. Patches to use this interface on i.MX follow later in this merge window, and we are going to have other platforms (at least tegra and sirf) get converted in 3.11. This will let us get rid of platform specific callbacks in a number of platform independent device drivers." * tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (256 commits) irqchip: s3c24xx: add missing __init annotations ARM: dts: Disable the RTC by default on exynos5 clk: exynos5250: Fix parent clock for sclk_mmc{0,1,2,3} ARM: exynos: restore mach/regs-clock.h for exynos5 clocksource: exynos_mct: fix build error on non-DT pinctrl: vt8500: wmt: Fix checking return value of pinctrl_register() irqchip: vt8500: Convert arch-vt8500 to new irqchip infrastructure reset: NULL deref on allocation failure reset: Add reset controller API dt: describe base reset signal binding ARM: EXYNOS: Add arm-pmu DT binding for exynos421x ARM: EXYNOS: Add arm-pmu DT binding for exynos5250 ARM: EXYNOS: Enable PMUs for exynos4 irqchip: exynos-combiner: Correct combined IRQs for exynos4 irqchip: exynos-combiner: Add set_irq_affinity function for combiner_irq ARM: EXYNOS: fix compilation error introduced due to common clock migration clk: exynos5250: Fix divider values for sclk_mmc{0,1,2,3} clk: exynos4: export clocks required for fimc-is clk: samsung: Fix compilation error clk: tegra: fix enum tegra114_clk to match binding ...
Diffstat (limited to 'drivers/clk/tegra/clk-tegra20.c')
-rw-r--r--drivers/clk/tegra/clk-tegra20.c184
1 files changed, 99 insertions, 85 deletions
diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index bf194009e20f..8292a00c3de9 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -86,8 +86,8 @@
86#define PLLE_BASE 0xe8 86#define PLLE_BASE 0xe8
87#define PLLE_MISC 0xec 87#define PLLE_MISC 0xec
88 88
89#define PLL_BASE_LOCK 27 89#define PLL_BASE_LOCK BIT(27)
90#define PLLE_MISC_LOCK 11 90#define PLLE_MISC_LOCK BIT(11)
91 91
92#define PLL_MISC_LOCK_ENABLE 18 92#define PLL_MISC_LOCK_ENABLE 18
93#define PLLDU_MISC_LOCK_ENABLE 22 93#define PLLDU_MISC_LOCK_ENABLE 22
@@ -236,7 +236,7 @@ enum tegra20_clk {
236 dvc, dsi, mipi = 50, hdmi, csi, tvdac, i2c2, uartc, emc = 57, usb2, 236 dvc, dsi, mipi = 50, hdmi, csi, tvdac, i2c2, uartc, emc = 57, usb2,
237 usb3, mpe, vde, bsea, bsev, speedo, uartd, uarte, i2c3, sbc4, sdmmc3, 237 usb3, mpe, vde, bsea, bsev, speedo, uartd, uarte, i2c3, sbc4, sdmmc3,
238 pex, owr, afi, csite, pcie_xclk, avpucq = 75, la, irama = 84, iramb, 238 pex, owr, afi, csite, pcie_xclk, avpucq = 75, la, irama = 84, iramb,
239 iramc, iramd, cram2, audio_2x, clk_d, csus = 92, cdev1, cdev2, 239 iramc, iramd, cram2, audio_2x, clk_d, csus = 92, cdev2, cdev1,
240 uartb = 96, vfir, spdif_in, spdif_out, vi, vi_sensor, tvo, cve, 240 uartb = 96, vfir, spdif_in, spdif_out, vi, vi_sensor, tvo, cve,
241 osc, clk_32k, clk_m, sclk, cclk, hclk, pclk, blink, pll_a, pll_a_out0, 241 osc, clk_32k, clk_m, sclk, cclk, hclk, pclk, blink, pll_a, pll_a_out0,
242 pll_c, pll_c_out1, pll_d, pll_d_out0, pll_e, pll_m, pll_m_out1, 242 pll_c, pll_c_out1, pll_d, pll_d_out0, pll_e, pll_m, pll_m_out1,
@@ -248,125 +248,125 @@ static struct clk *clks[clk_max];
248static struct clk_onecell_data clk_data; 248static struct clk_onecell_data clk_data;
249 249
250static struct tegra_clk_pll_freq_table pll_c_freq_table[] = { 250static struct tegra_clk_pll_freq_table pll_c_freq_table[] = {
251 { 12000000, 600000000, 600, 12, 1, 8 }, 251 { 12000000, 600000000, 600, 12, 0, 8 },
252 { 13000000, 600000000, 600, 13, 1, 8 }, 252 { 13000000, 600000000, 600, 13, 0, 8 },
253 { 19200000, 600000000, 500, 16, 1, 6 }, 253 { 19200000, 600000000, 500, 16, 0, 6 },
254 { 26000000, 600000000, 600, 26, 1, 8 }, 254 { 26000000, 600000000, 600, 26, 0, 8 },
255 { 0, 0, 0, 0, 0, 0 }, 255 { 0, 0, 0, 0, 0, 0 },
256}; 256};
257 257
258static struct tegra_clk_pll_freq_table pll_m_freq_table[] = { 258static struct tegra_clk_pll_freq_table pll_m_freq_table[] = {
259 { 12000000, 666000000, 666, 12, 1, 8}, 259 { 12000000, 666000000, 666, 12, 0, 8},
260 { 13000000, 666000000, 666, 13, 1, 8}, 260 { 13000000, 666000000, 666, 13, 0, 8},
261 { 19200000, 666000000, 555, 16, 1, 8}, 261 { 19200000, 666000000, 555, 16, 0, 8},
262 { 26000000, 666000000, 666, 26, 1, 8}, 262 { 26000000, 666000000, 666, 26, 0, 8},
263 { 12000000, 600000000, 600, 12, 1, 8}, 263 { 12000000, 600000000, 600, 12, 0, 8},
264 { 13000000, 600000000, 600, 13, 1, 8}, 264 { 13000000, 600000000, 600, 13, 0, 8},
265 { 19200000, 600000000, 375, 12, 1, 6}, 265 { 19200000, 600000000, 375, 12, 0, 6},
266 { 26000000, 600000000, 600, 26, 1, 8}, 266 { 26000000, 600000000, 600, 26, 0, 8},
267 { 0, 0, 0, 0, 0, 0 }, 267 { 0, 0, 0, 0, 0, 0 },
268}; 268};
269 269
270static struct tegra_clk_pll_freq_table pll_p_freq_table[] = { 270static struct tegra_clk_pll_freq_table pll_p_freq_table[] = {
271 { 12000000, 216000000, 432, 12, 2, 8}, 271 { 12000000, 216000000, 432, 12, 1, 8},
272 { 13000000, 216000000, 432, 13, 2, 8}, 272 { 13000000, 216000000, 432, 13, 1, 8},
273 { 19200000, 216000000, 90, 4, 2, 1}, 273 { 19200000, 216000000, 90, 4, 1, 1},
274 { 26000000, 216000000, 432, 26, 2, 8}, 274 { 26000000, 216000000, 432, 26, 1, 8},
275 { 12000000, 432000000, 432, 12, 1, 8}, 275 { 12000000, 432000000, 432, 12, 0, 8},
276 { 13000000, 432000000, 432, 13, 1, 8}, 276 { 13000000, 432000000, 432, 13, 0, 8},
277 { 19200000, 432000000, 90, 4, 1, 1}, 277 { 19200000, 432000000, 90, 4, 0, 1},
278 { 26000000, 432000000, 432, 26, 1, 8}, 278 { 26000000, 432000000, 432, 26, 0, 8},
279 { 0, 0, 0, 0, 0, 0 }, 279 { 0, 0, 0, 0, 0, 0 },
280}; 280};
281 281
282static struct tegra_clk_pll_freq_table pll_a_freq_table[] = { 282static struct tegra_clk_pll_freq_table pll_a_freq_table[] = {
283 { 28800000, 56448000, 49, 25, 1, 1}, 283 { 28800000, 56448000, 49, 25, 0, 1},
284 { 28800000, 73728000, 64, 25, 1, 1}, 284 { 28800000, 73728000, 64, 25, 0, 1},
285 { 28800000, 24000000, 5, 6, 1, 1}, 285 { 28800000, 24000000, 5, 6, 0, 1},
286 { 0, 0, 0, 0, 0, 0 }, 286 { 0, 0, 0, 0, 0, 0 },
287}; 287};
288 288
289static struct tegra_clk_pll_freq_table pll_d_freq_table[] = { 289static struct tegra_clk_pll_freq_table pll_d_freq_table[] = {
290 { 12000000, 216000000, 216, 12, 1, 4}, 290 { 12000000, 216000000, 216, 12, 0, 4},
291 { 13000000, 216000000, 216, 13, 1, 4}, 291 { 13000000, 216000000, 216, 13, 0, 4},
292 { 19200000, 216000000, 135, 12, 1, 3}, 292 { 19200000, 216000000, 135, 12, 0, 3},
293 { 26000000, 216000000, 216, 26, 1, 4}, 293 { 26000000, 216000000, 216, 26, 0, 4},
294 294
295 { 12000000, 594000000, 594, 12, 1, 8}, 295 { 12000000, 594000000, 594, 12, 0, 8},
296 { 13000000, 594000000, 594, 13, 1, 8}, 296 { 13000000, 594000000, 594, 13, 0, 8},
297 { 19200000, 594000000, 495, 16, 1, 8}, 297 { 19200000, 594000000, 495, 16, 0, 8},
298 { 26000000, 594000000, 594, 26, 1, 8}, 298 { 26000000, 594000000, 594, 26, 0, 8},
299 299
300 { 12000000, 1000000000, 1000, 12, 1, 12}, 300 { 12000000, 1000000000, 1000, 12, 0, 12},
301 { 13000000, 1000000000, 1000, 13, 1, 12}, 301 { 13000000, 1000000000, 1000, 13, 0, 12},
302 { 19200000, 1000000000, 625, 12, 1, 8}, 302 { 19200000, 1000000000, 625, 12, 0, 8},
303 { 26000000, 1000000000, 1000, 26, 1, 12}, 303 { 26000000, 1000000000, 1000, 26, 0, 12},
304 304
305 { 0, 0, 0, 0, 0, 0 }, 305 { 0, 0, 0, 0, 0, 0 },
306}; 306};
307 307
308static struct tegra_clk_pll_freq_table pll_u_freq_table[] = { 308static struct tegra_clk_pll_freq_table pll_u_freq_table[] = {
309 { 12000000, 480000000, 960, 12, 2, 0}, 309 { 12000000, 480000000, 960, 12, 0, 0},
310 { 13000000, 480000000, 960, 13, 2, 0}, 310 { 13000000, 480000000, 960, 13, 0, 0},
311 { 19200000, 480000000, 200, 4, 2, 0}, 311 { 19200000, 480000000, 200, 4, 0, 0},
312 { 26000000, 480000000, 960, 26, 2, 0}, 312 { 26000000, 480000000, 960, 26, 0, 0},
313 { 0, 0, 0, 0, 0, 0 }, 313 { 0, 0, 0, 0, 0, 0 },
314}; 314};
315 315
316static struct tegra_clk_pll_freq_table pll_x_freq_table[] = { 316static struct tegra_clk_pll_freq_table pll_x_freq_table[] = {
317 /* 1 GHz */ 317 /* 1 GHz */
318 { 12000000, 1000000000, 1000, 12, 1, 12}, 318 { 12000000, 1000000000, 1000, 12, 0, 12},
319 { 13000000, 1000000000, 1000, 13, 1, 12}, 319 { 13000000, 1000000000, 1000, 13, 0, 12},
320 { 19200000, 1000000000, 625, 12, 1, 8}, 320 { 19200000, 1000000000, 625, 12, 0, 8},
321 { 26000000, 1000000000, 1000, 26, 1, 12}, 321 { 26000000, 1000000000, 1000, 26, 0, 12},
322 322
323 /* 912 MHz */ 323 /* 912 MHz */
324 { 12000000, 912000000, 912, 12, 1, 12}, 324 { 12000000, 912000000, 912, 12, 0, 12},
325 { 13000000, 912000000, 912, 13, 1, 12}, 325 { 13000000, 912000000, 912, 13, 0, 12},
326 { 19200000, 912000000, 760, 16, 1, 8}, 326 { 19200000, 912000000, 760, 16, 0, 8},
327 { 26000000, 912000000, 912, 26, 1, 12}, 327 { 26000000, 912000000, 912, 26, 0, 12},
328 328
329 /* 816 MHz */ 329 /* 816 MHz */
330 { 12000000, 816000000, 816, 12, 1, 12}, 330 { 12000000, 816000000, 816, 12, 0, 12},
331 { 13000000, 816000000, 816, 13, 1, 12}, 331 { 13000000, 816000000, 816, 13, 0, 12},
332 { 19200000, 816000000, 680, 16, 1, 8}, 332 { 19200000, 816000000, 680, 16, 0, 8},
333 { 26000000, 816000000, 816, 26, 1, 12}, 333 { 26000000, 816000000, 816, 26, 0, 12},
334 334
335 /* 760 MHz */ 335 /* 760 MHz */
336 { 12000000, 760000000, 760, 12, 1, 12}, 336 { 12000000, 760000000, 760, 12, 0, 12},
337 { 13000000, 760000000, 760, 13, 1, 12}, 337 { 13000000, 760000000, 760, 13, 0, 12},
338 { 19200000, 760000000, 950, 24, 1, 8}, 338 { 19200000, 760000000, 950, 24, 0, 8},
339 { 26000000, 760000000, 760, 26, 1, 12}, 339 { 26000000, 760000000, 760, 26, 0, 12},
340 340
341 /* 750 MHz */ 341 /* 750 MHz */
342 { 12000000, 750000000, 750, 12, 1, 12}, 342 { 12000000, 750000000, 750, 12, 0, 12},
343 { 13000000, 750000000, 750, 13, 1, 12}, 343 { 13000000, 750000000, 750, 13, 0, 12},
344 { 19200000, 750000000, 625, 16, 1, 8}, 344 { 19200000, 750000000, 625, 16, 0, 8},
345 { 26000000, 750000000, 750, 26, 1, 12}, 345 { 26000000, 750000000, 750, 26, 0, 12},
346 346
347 /* 608 MHz */ 347 /* 608 MHz */
348 { 12000000, 608000000, 608, 12, 1, 12}, 348 { 12000000, 608000000, 608, 12, 0, 12},
349 { 13000000, 608000000, 608, 13, 1, 12}, 349 { 13000000, 608000000, 608, 13, 0, 12},
350 { 19200000, 608000000, 380, 12, 1, 8}, 350 { 19200000, 608000000, 380, 12, 0, 8},
351 { 26000000, 608000000, 608, 26, 1, 12}, 351 { 26000000, 608000000, 608, 26, 0, 12},
352 352
353 /* 456 MHz */ 353 /* 456 MHz */
354 { 12000000, 456000000, 456, 12, 1, 12}, 354 { 12000000, 456000000, 456, 12, 0, 12},
355 { 13000000, 456000000, 456, 13, 1, 12}, 355 { 13000000, 456000000, 456, 13, 0, 12},
356 { 19200000, 456000000, 380, 16, 1, 8}, 356 { 19200000, 456000000, 380, 16, 0, 8},
357 { 26000000, 456000000, 456, 26, 1, 12}, 357 { 26000000, 456000000, 456, 26, 0, 12},
358 358
359 /* 312 MHz */ 359 /* 312 MHz */
360 { 12000000, 312000000, 312, 12, 1, 12}, 360 { 12000000, 312000000, 312, 12, 0, 12},
361 { 13000000, 312000000, 312, 13, 1, 12}, 361 { 13000000, 312000000, 312, 13, 0, 12},
362 { 19200000, 312000000, 260, 16, 1, 8}, 362 { 19200000, 312000000, 260, 16, 0, 8},
363 { 26000000, 312000000, 312, 26, 1, 12}, 363 { 26000000, 312000000, 312, 26, 0, 12},
364 364
365 { 0, 0, 0, 0, 0, 0 }, 365 { 0, 0, 0, 0, 0, 0 },
366}; 366};
367 367
368static struct tegra_clk_pll_freq_table pll_e_freq_table[] = { 368static struct tegra_clk_pll_freq_table pll_e_freq_table[] = {
369 { 12000000, 100000000, 200, 24, 1, 0 }, 369 { 12000000, 100000000, 200, 24, 0, 0 },
370 { 0, 0, 0, 0, 0, 0 }, 370 { 0, 0, 0, 0, 0, 0 },
371}; 371};
372 372
@@ -380,7 +380,7 @@ static struct tegra_clk_pll_params pll_c_params = {
380 .vco_max = 1400000000, 380 .vco_max = 1400000000,
381 .base_reg = PLLC_BASE, 381 .base_reg = PLLC_BASE,
382 .misc_reg = PLLC_MISC, 382 .misc_reg = PLLC_MISC,
383 .lock_bit_idx = PLL_BASE_LOCK, 383 .lock_mask = PLL_BASE_LOCK,
384 .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE, 384 .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
385 .lock_delay = 300, 385 .lock_delay = 300,
386}; 386};
@@ -394,7 +394,7 @@ static struct tegra_clk_pll_params pll_m_params = {
394 .vco_max = 1200000000, 394 .vco_max = 1200000000,
395 .base_reg = PLLM_BASE, 395 .base_reg = PLLM_BASE,
396 .misc_reg = PLLM_MISC, 396 .misc_reg = PLLM_MISC,
397 .lock_bit_idx = PLL_BASE_LOCK, 397 .lock_mask = PLL_BASE_LOCK,
398 .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE, 398 .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
399 .lock_delay = 300, 399 .lock_delay = 300,
400}; 400};
@@ -408,7 +408,7 @@ static struct tegra_clk_pll_params pll_p_params = {
408 .vco_max = 1400000000, 408 .vco_max = 1400000000,
409 .base_reg = PLLP_BASE, 409 .base_reg = PLLP_BASE,
410 .misc_reg = PLLP_MISC, 410 .misc_reg = PLLP_MISC,
411 .lock_bit_idx = PLL_BASE_LOCK, 411 .lock_mask = PLL_BASE_LOCK,
412 .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE, 412 .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
413 .lock_delay = 300, 413 .lock_delay = 300,
414}; 414};
@@ -422,7 +422,7 @@ static struct tegra_clk_pll_params pll_a_params = {
422 .vco_max = 1400000000, 422 .vco_max = 1400000000,
423 .base_reg = PLLA_BASE, 423 .base_reg = PLLA_BASE,
424 .misc_reg = PLLA_MISC, 424 .misc_reg = PLLA_MISC,
425 .lock_bit_idx = PLL_BASE_LOCK, 425 .lock_mask = PLL_BASE_LOCK,
426 .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE, 426 .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
427 .lock_delay = 300, 427 .lock_delay = 300,
428}; 428};
@@ -436,11 +436,17 @@ static struct tegra_clk_pll_params pll_d_params = {
436 .vco_max = 1000000000, 436 .vco_max = 1000000000,
437 .base_reg = PLLD_BASE, 437 .base_reg = PLLD_BASE,
438 .misc_reg = PLLD_MISC, 438 .misc_reg = PLLD_MISC,
439 .lock_bit_idx = PLL_BASE_LOCK, 439 .lock_mask = PLL_BASE_LOCK,
440 .lock_enable_bit_idx = PLLDU_MISC_LOCK_ENABLE, 440 .lock_enable_bit_idx = PLLDU_MISC_LOCK_ENABLE,
441 .lock_delay = 1000, 441 .lock_delay = 1000,
442}; 442};
443 443
444static struct pdiv_map pllu_p[] = {
445 { .pdiv = 1, .hw_val = 1 },
446 { .pdiv = 2, .hw_val = 0 },
447 { .pdiv = 0, .hw_val = 0 },
448};
449
444static struct tegra_clk_pll_params pll_u_params = { 450static struct tegra_clk_pll_params pll_u_params = {
445 .input_min = 2000000, 451 .input_min = 2000000,
446 .input_max = 40000000, 452 .input_max = 40000000,
@@ -450,9 +456,10 @@ static struct tegra_clk_pll_params pll_u_params = {
450 .vco_max = 960000000, 456 .vco_max = 960000000,
451 .base_reg = PLLU_BASE, 457 .base_reg = PLLU_BASE,
452 .misc_reg = PLLU_MISC, 458 .misc_reg = PLLU_MISC,
453 .lock_bit_idx = PLL_BASE_LOCK, 459 .lock_mask = PLL_BASE_LOCK,
454 .lock_enable_bit_idx = PLLDU_MISC_LOCK_ENABLE, 460 .lock_enable_bit_idx = PLLDU_MISC_LOCK_ENABLE,
455 .lock_delay = 1000, 461 .lock_delay = 1000,
462 .pdiv_tohw = pllu_p,
456}; 463};
457 464
458static struct tegra_clk_pll_params pll_x_params = { 465static struct tegra_clk_pll_params pll_x_params = {
@@ -464,7 +471,7 @@ static struct tegra_clk_pll_params pll_x_params = {
464 .vco_max = 1200000000, 471 .vco_max = 1200000000,
465 .base_reg = PLLX_BASE, 472 .base_reg = PLLX_BASE,
466 .misc_reg = PLLX_MISC, 473 .misc_reg = PLLX_MISC,
467 .lock_bit_idx = PLL_BASE_LOCK, 474 .lock_mask = PLL_BASE_LOCK,
468 .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE, 475 .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
469 .lock_delay = 300, 476 .lock_delay = 300,
470}; 477};
@@ -478,7 +485,7 @@ static struct tegra_clk_pll_params pll_e_params = {
478 .vco_max = 0, 485 .vco_max = 0,
479 .base_reg = PLLE_BASE, 486 .base_reg = PLLE_BASE,
480 .misc_reg = PLLE_MISC, 487 .misc_reg = PLLE_MISC,
481 .lock_bit_idx = PLLE_MISC_LOCK, 488 .lock_mask = PLLE_MISC_LOCK,
482 .lock_enable_bit_idx = PLLE_MISC_LOCK_ENABLE, 489 .lock_enable_bit_idx = PLLE_MISC_LOCK_ENABLE,
483 .lock_delay = 0, 490 .lock_delay = 0,
484}; 491};
@@ -1012,7 +1019,7 @@ static void __init tegra20_periph_clk_init(void)
1012 data = &tegra_periph_clk_list[i]; 1019 data = &tegra_periph_clk_list[i];
1013 clk = tegra_clk_register_periph(data->name, data->parent_names, 1020 clk = tegra_clk_register_periph(data->name, data->parent_names,
1014 data->num_parents, &data->periph, 1021 data->num_parents, &data->periph,
1015 clk_base, data->offset); 1022 clk_base, data->offset, data->flags);
1016 clk_register_clkdev(clk, data->con_id, data->dev_id); 1023 clk_register_clkdev(clk, data->con_id, data->dev_id);
1017 clks[data->clk_id] = clk; 1024 clks[data->clk_id] = clk;
1018 } 1025 }
@@ -1247,9 +1254,16 @@ static __initdata struct tegra_clk_init_table init_table[] = {
1247 {host1x, pll_c, 150000000, 0}, 1254 {host1x, pll_c, 150000000, 0},
1248 {disp1, pll_p, 600000000, 0}, 1255 {disp1, pll_p, 600000000, 0},
1249 {disp2, pll_p, 600000000, 0}, 1256 {disp2, pll_p, 600000000, 0},
1257 {gr2d, pll_c, 300000000, 0},
1258 {gr3d, pll_c, 300000000, 0},
1250 {clk_max, clk_max, 0, 0}, /* This MUST be the last entry */ 1259 {clk_max, clk_max, 0, 0}, /* This MUST be the last entry */
1251}; 1260};
1252 1261
1262static void __init tegra20_clock_apply_init_table(void)
1263{
1264 tegra_init_from_table(init_table, clks, clk_max);
1265}
1266
1253/* 1267/*
1254 * Some clocks may be used by different drivers depending on the board 1268 * Some clocks may be used by different drivers depending on the board
1255 * configuration. List those here to register them twice in the clock lookup 1269 * configuration. List those here to register them twice in the clock lookup
@@ -1316,7 +1330,7 @@ void __init tegra20_clock_init(struct device_node *np)
1316 clk_data.clk_num = ARRAY_SIZE(clks); 1330 clk_data.clk_num = ARRAY_SIZE(clks);
1317 of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data); 1331 of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
1318 1332
1319 tegra_init_from_table(init_table, clks, clk_max); 1333 tegra_clk_apply_init_table = tegra20_clock_apply_init_table;
1320 1334
1321 tegra_cpu_car_ops = &tegra20_cpu_car_ops; 1335 tegra_cpu_car_ops = &tegra20_cpu_car_ops;
1322} 1336}