diff options
author | Vipul Kumar Samar <vipulkumar.samar@st.com> | 2012-07-10 07:42:43 -0400 |
---|---|---|
committer | Shiraz Hashim <shiraz.hashim@st.com> | 2012-07-18 00:34:33 -0400 |
commit | 5cb6a9bccaa65e0cbf567485ac6d04ca3fdae79c (patch) | |
tree | 25e8af57b3f085bf4dab50e58f33e9ea8607c60b /drivers/clk | |
parent | 84a1caf1453c3d44050bd22db958af4a7f99315c (diff) |
clk:spear1340:Fix: Rename clk ids within predefined limit
The max limit of con_id is 16 and dev_id is 20. As of now for spear1340, many
clk ids are exceeding this predefined limit.
This patch rename clk ids like:
mux_clk -> _mclk
gate_clk -> _gclk
synth_clk -> syn_clk
gmac_phy -> phy_
gmii_125m_pad_ -> gmii_pad
Signed-off-by: Vipul Kumar Samar <vipulkumar.samar@st.com>
Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/spear/spear1340_clock.c | 273 |
1 files changed, 135 insertions, 138 deletions
diff --git a/drivers/clk/spear/spear1340_clock.c b/drivers/clk/spear/spear1340_clock.c index e3ea72162236..0f2324b9321b 100644 --- a/drivers/clk/spear/spear1340_clock.c +++ b/drivers/clk/spear/spear1340_clock.c | |||
@@ -370,26 +370,24 @@ static struct frac_rate_tbl gen_rtbl[] = { | |||
370 | /* clock parents */ | 370 | /* clock parents */ |
371 | static const char *vco_parents[] = { "osc_24m_clk", "osc_25m_clk", }; | 371 | static const char *vco_parents[] = { "osc_24m_clk", "osc_25m_clk", }; |
372 | static const char *sys_parents[] = { "none", "pll1_clk", "none", "none", | 372 | static const char *sys_parents[] = { "none", "pll1_clk", "none", "none", |
373 | "sys_synth_clk", "none", "pll2_clk", "pll3_clk", }; | 373 | "sys_syn_clk", "none", "pll2_clk", "pll3_clk", }; |
374 | static const char *ahb_parents[] = { "cpu_div3_clk", "amba_synth_clk", }; | 374 | static const char *ahb_parents[] = { "cpu_div3_clk", "amba_syn_clk", }; |
375 | static const char *gpt_parents[] = { "osc_24m_clk", "apb_clk", }; | 375 | static const char *gpt_parents[] = { "osc_24m_clk", "apb_clk", }; |
376 | static const char *uart0_parents[] = { "pll5_clk", "osc_24m_clk", | 376 | static const char *uart0_parents[] = { "pll5_clk", "osc_24m_clk", |
377 | "uart0_synth_gate_clk", }; | 377 | "uart0_syn_gclk", }; |
378 | static const char *uart1_parents[] = { "pll5_clk", "osc_24m_clk", | 378 | static const char *uart1_parents[] = { "pll5_clk", "osc_24m_clk", |
379 | "uart1_synth_gate_clk", }; | 379 | "uart1_syn_gclk", }; |
380 | static const char *c3_parents[] = { "pll5_clk", "c3_synth_gate_clk", }; | 380 | static const char *c3_parents[] = { "pll5_clk", "c3_syn_gclk", }; |
381 | static const char *gmac_phy_input_parents[] = { "gmii_125m_pad_clk", "pll2_clk", | 381 | static const char *gmac_phy_input_parents[] = { "gmii_pad_clk", "pll2_clk", |
382 | "osc_25m_clk", }; | 382 | "osc_25m_clk", }; |
383 | static const char *gmac_phy_parents[] = { "gmac_phy_input_mux_clk", | 383 | static const char *gmac_phy_parents[] = { "phy_input_mclk", "phy_syn_gclk", }; |
384 | "gmac_phy_synth_gate_clk", }; | ||
385 | static const char *clcd_synth_parents[] = { "vco1div4_clk", "pll2_clk", }; | 384 | static const char *clcd_synth_parents[] = { "vco1div4_clk", "pll2_clk", }; |
386 | static const char *clcd_pixel_parents[] = { "pll5_clk", "clcd_synth_clk", }; | 385 | static const char *clcd_pixel_parents[] = { "pll5_clk", "clcd_syn_clk", }; |
387 | static const char *i2s_src_parents[] = { "vco1div2_clk", "pll2_clk", "pll3_clk", | 386 | static const char *i2s_src_parents[] = { "vco1div2_clk", "pll2_clk", "pll3_clk", |
388 | "i2s_src_pad_clk", }; | 387 | "i2s_src_pad_clk", }; |
389 | static const char *i2s_ref_parents[] = { "i2s_src_mux_clk", "i2s_prs1_clk", }; | 388 | static const char *i2s_ref_parents[] = { "i2s_src_mclk", "i2s_prs1_clk", }; |
390 | static const char *spdif_out_parents[] = { "i2s_src_pad_clk", "gen_synth2_clk", | 389 | static const char *spdif_out_parents[] = { "i2s_src_pad_clk", "gen_syn2_clk", }; |
391 | }; | 390 | static const char *spdif_in_parents[] = { "pll2_clk", "gen_syn3_clk", }; |
392 | static const char *spdif_in_parents[] = { "pll2_clk", "gen_synth3_clk", }; | ||
393 | 391 | ||
394 | static const char *gen_synth0_1_parents[] = { "vco1div4_clk", "vco3div2_clk", | 392 | static const char *gen_synth0_1_parents[] = { "vco1div4_clk", "vco3div2_clk", |
395 | "pll3_clk", }; | 393 | "pll3_clk", }; |
@@ -415,9 +413,9 @@ void __init spear1340_clk_init(void) | |||
415 | 25000000); | 413 | 25000000); |
416 | clk_register_clkdev(clk, "osc_25m_clk", NULL); | 414 | clk_register_clkdev(clk, "osc_25m_clk", NULL); |
417 | 415 | ||
418 | clk = clk_register_fixed_rate(NULL, "gmii_125m_pad_clk", NULL, | 416 | clk = clk_register_fixed_rate(NULL, "gmii_pad_clk", NULL, CLK_IS_ROOT, |
419 | CLK_IS_ROOT, 125000000); | 417 | 125000000); |
420 | clk_register_clkdev(clk, "gmii_125m_pad_clk", NULL); | 418 | clk_register_clkdev(clk, "gmii_pad_clk", NULL); |
421 | 419 | ||
422 | clk = clk_register_fixed_rate(NULL, "i2s_src_pad_clk", NULL, | 420 | clk = clk_register_fixed_rate(NULL, "i2s_src_pad_clk", NULL, |
423 | CLK_IS_ROOT, 12288000); | 421 | CLK_IS_ROOT, 12288000); |
@@ -431,35 +429,35 @@ void __init spear1340_clk_init(void) | |||
431 | 429 | ||
432 | /* clock derived from 24 or 25 MHz osc clk */ | 430 | /* clock derived from 24 or 25 MHz osc clk */ |
433 | /* vco-pll */ | 431 | /* vco-pll */ |
434 | clk = clk_register_mux(NULL, "vco1_mux_clk", vco_parents, | 432 | clk = clk_register_mux(NULL, "vco1_mclk", vco_parents, |
435 | ARRAY_SIZE(vco_parents), 0, SPEAR1340_PLL_CFG, | 433 | ARRAY_SIZE(vco_parents), 0, SPEAR1340_PLL_CFG, |
436 | SPEAR1340_PLL1_CLK_SHIFT, SPEAR1340_PLL_CLK_MASK, 0, | 434 | SPEAR1340_PLL1_CLK_SHIFT, SPEAR1340_PLL_CLK_MASK, 0, |
437 | &_lock); | 435 | &_lock); |
438 | clk_register_clkdev(clk, "vco1_mux_clk", NULL); | 436 | clk_register_clkdev(clk, "vco1_mclk", NULL); |
439 | clk = clk_register_vco_pll("vco1_clk", "pll1_clk", NULL, "vco1_mux_clk", | 437 | clk = clk_register_vco_pll("vco1_clk", "pll1_clk", NULL, "vco1_mclk", 0, |
440 | 0, SPEAR1340_PLL1_CTR, SPEAR1340_PLL1_FRQ, pll_rtbl, | 438 | SPEAR1340_PLL1_CTR, SPEAR1340_PLL1_FRQ, pll_rtbl, |
441 | ARRAY_SIZE(pll_rtbl), &_lock, &clk1, NULL); | 439 | ARRAY_SIZE(pll_rtbl), &_lock, &clk1, NULL); |
442 | clk_register_clkdev(clk, "vco1_clk", NULL); | 440 | clk_register_clkdev(clk, "vco1_clk", NULL); |
443 | clk_register_clkdev(clk1, "pll1_clk", NULL); | 441 | clk_register_clkdev(clk1, "pll1_clk", NULL); |
444 | 442 | ||
445 | clk = clk_register_mux(NULL, "vco2_mux_clk", vco_parents, | 443 | clk = clk_register_mux(NULL, "vco2_mclk", vco_parents, |
446 | ARRAY_SIZE(vco_parents), 0, SPEAR1340_PLL_CFG, | 444 | ARRAY_SIZE(vco_parents), 0, SPEAR1340_PLL_CFG, |
447 | SPEAR1340_PLL2_CLK_SHIFT, SPEAR1340_PLL_CLK_MASK, 0, | 445 | SPEAR1340_PLL2_CLK_SHIFT, SPEAR1340_PLL_CLK_MASK, 0, |
448 | &_lock); | 446 | &_lock); |
449 | clk_register_clkdev(clk, "vco2_mux_clk", NULL); | 447 | clk_register_clkdev(clk, "vco2_mclk", NULL); |
450 | clk = clk_register_vco_pll("vco2_clk", "pll2_clk", NULL, "vco2_mux_clk", | 448 | clk = clk_register_vco_pll("vco2_clk", "pll2_clk", NULL, "vco2_mclk", 0, |
451 | 0, SPEAR1340_PLL2_CTR, SPEAR1340_PLL2_FRQ, pll_rtbl, | 449 | SPEAR1340_PLL2_CTR, SPEAR1340_PLL2_FRQ, pll_rtbl, |
452 | ARRAY_SIZE(pll_rtbl), &_lock, &clk1, NULL); | 450 | ARRAY_SIZE(pll_rtbl), &_lock, &clk1, NULL); |
453 | clk_register_clkdev(clk, "vco2_clk", NULL); | 451 | clk_register_clkdev(clk, "vco2_clk", NULL); |
454 | clk_register_clkdev(clk1, "pll2_clk", NULL); | 452 | clk_register_clkdev(clk1, "pll2_clk", NULL); |
455 | 453 | ||
456 | clk = clk_register_mux(NULL, "vco3_mux_clk", vco_parents, | 454 | clk = clk_register_mux(NULL, "vco3_mclk", vco_parents, |
457 | ARRAY_SIZE(vco_parents), 0, SPEAR1340_PLL_CFG, | 455 | ARRAY_SIZE(vco_parents), 0, SPEAR1340_PLL_CFG, |
458 | SPEAR1340_PLL3_CLK_SHIFT, SPEAR1340_PLL_CLK_MASK, 0, | 456 | SPEAR1340_PLL3_CLK_SHIFT, SPEAR1340_PLL_CLK_MASK, 0, |
459 | &_lock); | 457 | &_lock); |
460 | clk_register_clkdev(clk, "vco3_mux_clk", NULL); | 458 | clk_register_clkdev(clk, "vco3_mclk", NULL); |
461 | clk = clk_register_vco_pll("vco3_clk", "pll3_clk", NULL, "vco3_mux_clk", | 459 | clk = clk_register_vco_pll("vco3_clk", "pll3_clk", NULL, "vco3_mclk", 0, |
462 | 0, SPEAR1340_PLL3_CTR, SPEAR1340_PLL3_FRQ, pll_rtbl, | 460 | SPEAR1340_PLL3_CTR, SPEAR1340_PLL3_FRQ, pll_rtbl, |
463 | ARRAY_SIZE(pll_rtbl), &_lock, &clk1, NULL); | 461 | ARRAY_SIZE(pll_rtbl), &_lock, &clk1, NULL); |
464 | clk_register_clkdev(clk, "vco3_clk", NULL); | 462 | clk_register_clkdev(clk, "vco3_clk", NULL); |
465 | clk_register_clkdev(clk1, "pll3_clk", NULL); | 463 | clk_register_clkdev(clk1, "pll3_clk", NULL); |
@@ -498,7 +496,7 @@ void __init spear1340_clk_init(void) | |||
498 | /* peripherals */ | 496 | /* peripherals */ |
499 | clk_register_fixed_factor(NULL, "thermal_clk", "osc_24m_clk", 0, 1, | 497 | clk_register_fixed_factor(NULL, "thermal_clk", "osc_24m_clk", 0, 1, |
500 | 128); | 498 | 128); |
501 | clk = clk_register_gate(NULL, "thermal_gate_clk", "thermal_clk", 0, | 499 | clk = clk_register_gate(NULL, "thermal_gclk", "thermal_clk", 0, |
502 | SPEAR1340_PERIP2_CLK_ENB, SPEAR1340_THSENS_CLK_ENB, 0, | 500 | SPEAR1340_PERIP2_CLK_ENB, SPEAR1340_THSENS_CLK_ENB, 0, |
503 | &_lock); | 501 | &_lock); |
504 | clk_register_clkdev(clk, NULL, "spear_thermal"); | 502 | clk_register_clkdev(clk, NULL, "spear_thermal"); |
@@ -509,23 +507,23 @@ void __init spear1340_clk_init(void) | |||
509 | clk_register_clkdev(clk, "ddr_clk", NULL); | 507 | clk_register_clkdev(clk, "ddr_clk", NULL); |
510 | 508 | ||
511 | /* clock derived from pll1 clk */ | 509 | /* clock derived from pll1 clk */ |
512 | clk = clk_register_frac("sys_synth_clk", "vco1div2_clk", 0, | 510 | clk = clk_register_frac("sys_syn_clk", "vco1div2_clk", 0, |
513 | SPEAR1340_SYS_CLK_SYNT, sys_synth_rtbl, | 511 | SPEAR1340_SYS_CLK_SYNT, sys_synth_rtbl, |
514 | ARRAY_SIZE(sys_synth_rtbl), &_lock); | 512 | ARRAY_SIZE(sys_synth_rtbl), &_lock); |
515 | clk_register_clkdev(clk, "sys_synth_clk", NULL); | 513 | clk_register_clkdev(clk, "sys_syn_clk", NULL); |
516 | 514 | ||
517 | clk = clk_register_frac("amba_synth_clk", "vco1div2_clk", 0, | 515 | clk = clk_register_frac("amba_syn_clk", "vco1div2_clk", 0, |
518 | SPEAR1340_AMBA_CLK_SYNT, amba_synth_rtbl, | 516 | SPEAR1340_AMBA_CLK_SYNT, amba_synth_rtbl, |
519 | ARRAY_SIZE(amba_synth_rtbl), &_lock); | 517 | ARRAY_SIZE(amba_synth_rtbl), &_lock); |
520 | clk_register_clkdev(clk, "amba_synth_clk", NULL); | 518 | clk_register_clkdev(clk, "amba_syn_clk", NULL); |
521 | 519 | ||
522 | clk = clk_register_mux(NULL, "sys_mux_clk", sys_parents, | 520 | clk = clk_register_mux(NULL, "sys_mclk", sys_parents, |
523 | ARRAY_SIZE(sys_parents), 0, SPEAR1340_SYS_CLK_CTRL, | 521 | ARRAY_SIZE(sys_parents), 0, SPEAR1340_SYS_CLK_CTRL, |
524 | SPEAR1340_SCLK_SRC_SEL_SHIFT, | 522 | SPEAR1340_SCLK_SRC_SEL_SHIFT, |
525 | SPEAR1340_SCLK_SRC_SEL_MASK, 0, &_lock); | 523 | SPEAR1340_SCLK_SRC_SEL_MASK, 0, &_lock); |
526 | clk_register_clkdev(clk, "sys_clk", NULL); | 524 | clk_register_clkdev(clk, "sys_clk", NULL); |
527 | 525 | ||
528 | clk = clk_register_fixed_factor(NULL, "cpu_clk", "sys_mux_clk", 0, 1, | 526 | clk = clk_register_fixed_factor(NULL, "cpu_clk", "sys_mclk", 0, 1, |
529 | 2); | 527 | 2); |
530 | clk_register_clkdev(clk, "cpu_clk", NULL); | 528 | clk_register_clkdev(clk, "cpu_clk", NULL); |
531 | 529 | ||
@@ -548,194 +546,193 @@ void __init spear1340_clk_init(void) | |||
548 | clk_register_clkdev(clk, "apb_clk", NULL); | 546 | clk_register_clkdev(clk, "apb_clk", NULL); |
549 | 547 | ||
550 | /* gpt clocks */ | 548 | /* gpt clocks */ |
551 | clk = clk_register_mux(NULL, "gpt0_mux_clk", gpt_parents, | 549 | clk = clk_register_mux(NULL, "gpt0_mclk", gpt_parents, |
552 | ARRAY_SIZE(gpt_parents), 0, SPEAR1340_PERIP_CLK_CFG, | 550 | ARRAY_SIZE(gpt_parents), 0, SPEAR1340_PERIP_CLK_CFG, |
553 | SPEAR1340_GPT0_CLK_SHIFT, SPEAR1340_GPT_CLK_MASK, 0, | 551 | SPEAR1340_GPT0_CLK_SHIFT, SPEAR1340_GPT_CLK_MASK, 0, |
554 | &_lock); | 552 | &_lock); |
555 | clk_register_clkdev(clk, "gpt0_mux_clk", NULL); | 553 | clk_register_clkdev(clk, "gpt0_mclk", NULL); |
556 | clk = clk_register_gate(NULL, "gpt0_clk", "gpt0_mux_clk", 0, | 554 | clk = clk_register_gate(NULL, "gpt0_clk", "gpt0_mclk", 0, |
557 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_GPT0_CLK_ENB, 0, | 555 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_GPT0_CLK_ENB, 0, |
558 | &_lock); | 556 | &_lock); |
559 | clk_register_clkdev(clk, NULL, "gpt0"); | 557 | clk_register_clkdev(clk, NULL, "gpt0"); |
560 | 558 | ||
561 | clk = clk_register_mux(NULL, "gpt1_mux_clk", gpt_parents, | 559 | clk = clk_register_mux(NULL, "gpt1_mclk", gpt_parents, |
562 | ARRAY_SIZE(gpt_parents), 0, SPEAR1340_PERIP_CLK_CFG, | 560 | ARRAY_SIZE(gpt_parents), 0, SPEAR1340_PERIP_CLK_CFG, |
563 | SPEAR1340_GPT1_CLK_SHIFT, SPEAR1340_GPT_CLK_MASK, 0, | 561 | SPEAR1340_GPT1_CLK_SHIFT, SPEAR1340_GPT_CLK_MASK, 0, |
564 | &_lock); | 562 | &_lock); |
565 | clk_register_clkdev(clk, "gpt1_mux_clk", NULL); | 563 | clk_register_clkdev(clk, "gpt1_mclk", NULL); |
566 | clk = clk_register_gate(NULL, "gpt1_clk", "gpt1_mux_clk", 0, | 564 | clk = clk_register_gate(NULL, "gpt1_clk", "gpt1_mclk", 0, |
567 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_GPT1_CLK_ENB, 0, | 565 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_GPT1_CLK_ENB, 0, |
568 | &_lock); | 566 | &_lock); |
569 | clk_register_clkdev(clk, NULL, "gpt1"); | 567 | clk_register_clkdev(clk, NULL, "gpt1"); |
570 | 568 | ||
571 | clk = clk_register_mux(NULL, "gpt2_mux_clk", gpt_parents, | 569 | clk = clk_register_mux(NULL, "gpt2_mclk", gpt_parents, |
572 | ARRAY_SIZE(gpt_parents), 0, SPEAR1340_PERIP_CLK_CFG, | 570 | ARRAY_SIZE(gpt_parents), 0, SPEAR1340_PERIP_CLK_CFG, |
573 | SPEAR1340_GPT2_CLK_SHIFT, SPEAR1340_GPT_CLK_MASK, 0, | 571 | SPEAR1340_GPT2_CLK_SHIFT, SPEAR1340_GPT_CLK_MASK, 0, |
574 | &_lock); | 572 | &_lock); |
575 | clk_register_clkdev(clk, "gpt2_mux_clk", NULL); | 573 | clk_register_clkdev(clk, "gpt2_mclk", NULL); |
576 | clk = clk_register_gate(NULL, "gpt2_clk", "gpt2_mux_clk", 0, | 574 | clk = clk_register_gate(NULL, "gpt2_clk", "gpt2_mclk", 0, |
577 | SPEAR1340_PERIP2_CLK_ENB, SPEAR1340_GPT2_CLK_ENB, 0, | 575 | SPEAR1340_PERIP2_CLK_ENB, SPEAR1340_GPT2_CLK_ENB, 0, |
578 | &_lock); | 576 | &_lock); |
579 | clk_register_clkdev(clk, NULL, "gpt2"); | 577 | clk_register_clkdev(clk, NULL, "gpt2"); |
580 | 578 | ||
581 | clk = clk_register_mux(NULL, "gpt3_mux_clk", gpt_parents, | 579 | clk = clk_register_mux(NULL, "gpt3_mclk", gpt_parents, |
582 | ARRAY_SIZE(gpt_parents), 0, SPEAR1340_PERIP_CLK_CFG, | 580 | ARRAY_SIZE(gpt_parents), 0, SPEAR1340_PERIP_CLK_CFG, |
583 | SPEAR1340_GPT3_CLK_SHIFT, SPEAR1340_GPT_CLK_MASK, 0, | 581 | SPEAR1340_GPT3_CLK_SHIFT, SPEAR1340_GPT_CLK_MASK, 0, |
584 | &_lock); | 582 | &_lock); |
585 | clk_register_clkdev(clk, "gpt3_mux_clk", NULL); | 583 | clk_register_clkdev(clk, "gpt3_mclk", NULL); |
586 | clk = clk_register_gate(NULL, "gpt3_clk", "gpt3_mux_clk", 0, | 584 | clk = clk_register_gate(NULL, "gpt3_clk", "gpt3_mclk", 0, |
587 | SPEAR1340_PERIP2_CLK_ENB, SPEAR1340_GPT3_CLK_ENB, 0, | 585 | SPEAR1340_PERIP2_CLK_ENB, SPEAR1340_GPT3_CLK_ENB, 0, |
588 | &_lock); | 586 | &_lock); |
589 | clk_register_clkdev(clk, NULL, "gpt3"); | 587 | clk_register_clkdev(clk, NULL, "gpt3"); |
590 | 588 | ||
591 | /* others */ | 589 | /* others */ |
592 | clk = clk_register_aux("uart0_synth_clk", "uart0_synth_gate_clk", | 590 | clk = clk_register_aux("uart0_syn_clk", "uart0_syn_gclk", |
593 | "vco1div2_clk", 0, SPEAR1340_UART0_CLK_SYNT, NULL, | 591 | "vco1div2_clk", 0, SPEAR1340_UART0_CLK_SYNT, NULL, |
594 | aux_rtbl, ARRAY_SIZE(aux_rtbl), &_lock, &clk1); | 592 | aux_rtbl, ARRAY_SIZE(aux_rtbl), &_lock, &clk1); |
595 | clk_register_clkdev(clk, "uart0_synth_clk", NULL); | 593 | clk_register_clkdev(clk, "uart0_syn_clk", NULL); |
596 | clk_register_clkdev(clk1, "uart0_synth_gate_clk", NULL); | 594 | clk_register_clkdev(clk1, "uart0_syn_gclk", NULL); |
597 | 595 | ||
598 | clk = clk_register_mux(NULL, "uart0_mux_clk", uart0_parents, | 596 | clk = clk_register_mux(NULL, "uart0_mclk", uart0_parents, |
599 | ARRAY_SIZE(uart0_parents), 0, SPEAR1340_PERIP_CLK_CFG, | 597 | ARRAY_SIZE(uart0_parents), 0, SPEAR1340_PERIP_CLK_CFG, |
600 | SPEAR1340_UART0_CLK_SHIFT, SPEAR1340_UART_CLK_MASK, 0, | 598 | SPEAR1340_UART0_CLK_SHIFT, SPEAR1340_UART_CLK_MASK, 0, |
601 | &_lock); | 599 | &_lock); |
602 | clk_register_clkdev(clk, "uart0_mux_clk", NULL); | 600 | clk_register_clkdev(clk, "uart0_mclk", NULL); |
603 | 601 | ||
604 | clk = clk_register_gate(NULL, "uart0_clk", "uart0_mux_clk", 0, | 602 | clk = clk_register_gate(NULL, "uart0_clk", "uart0_mclk", 0, |
605 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_UART0_CLK_ENB, 0, | 603 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_UART0_CLK_ENB, 0, |
606 | &_lock); | 604 | &_lock); |
607 | clk_register_clkdev(clk, NULL, "e0000000.serial"); | 605 | clk_register_clkdev(clk, NULL, "e0000000.serial"); |
608 | 606 | ||
609 | clk = clk_register_aux("uart1_synth_clk", "uart1_synth_gate_clk", | 607 | clk = clk_register_aux("uart1_syn_clk", "uart1_syn_gclk", |
610 | "vco1div2_clk", 0, SPEAR1340_UART1_CLK_SYNT, NULL, | 608 | "vco1div2_clk", 0, SPEAR1340_UART1_CLK_SYNT, NULL, |
611 | aux_rtbl, ARRAY_SIZE(aux_rtbl), &_lock, &clk1); | 609 | aux_rtbl, ARRAY_SIZE(aux_rtbl), &_lock, &clk1); |
612 | clk_register_clkdev(clk, "uart1_synth_clk", NULL); | 610 | clk_register_clkdev(clk, "uart1_syn_clk", NULL); |
613 | clk_register_clkdev(clk1, "uart1_synth_gate_clk", NULL); | 611 | clk_register_clkdev(clk1, "uart1_syn_gclk", NULL); |
614 | 612 | ||
615 | clk = clk_register_mux(NULL, "uart1_mux_clk", uart1_parents, | 613 | clk = clk_register_mux(NULL, "uart1_mclk", uart1_parents, |
616 | ARRAY_SIZE(uart1_parents), 0, SPEAR1340_PERIP_CLK_CFG, | 614 | ARRAY_SIZE(uart1_parents), 0, SPEAR1340_PERIP_CLK_CFG, |
617 | SPEAR1340_UART1_CLK_SHIFT, SPEAR1340_UART_CLK_MASK, 0, | 615 | SPEAR1340_UART1_CLK_SHIFT, SPEAR1340_UART_CLK_MASK, 0, |
618 | &_lock); | 616 | &_lock); |
619 | clk_register_clkdev(clk, "uart1_mux_clk", NULL); | 617 | clk_register_clkdev(clk, "uart1_mclk", NULL); |
620 | 618 | ||
621 | clk = clk_register_gate(NULL, "uart1_clk", "uart1_mux_clk", 0, | 619 | clk = clk_register_gate(NULL, "uart1_clk", "uart1_mclk", 0, |
622 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_UART1_CLK_ENB, 0, | 620 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_UART1_CLK_ENB, 0, |
623 | &_lock); | 621 | &_lock); |
624 | clk_register_clkdev(clk, NULL, "b4100000.serial"); | 622 | clk_register_clkdev(clk, NULL, "b4100000.serial"); |
625 | 623 | ||
626 | clk = clk_register_aux("sdhci_synth_clk", "sdhci_synth_gate_clk", | 624 | clk = clk_register_aux("sdhci_syn_clk", "sdhci_syn_gclk", |
627 | "vco1div2_clk", 0, SPEAR1340_SDHCI_CLK_SYNT, NULL, | 625 | "vco1div2_clk", 0, SPEAR1340_SDHCI_CLK_SYNT, NULL, |
628 | aux_rtbl, ARRAY_SIZE(aux_rtbl), &_lock, &clk1); | 626 | aux_rtbl, ARRAY_SIZE(aux_rtbl), &_lock, &clk1); |
629 | clk_register_clkdev(clk, "sdhci_synth_clk", NULL); | 627 | clk_register_clkdev(clk, "sdhci_syn_clk", NULL); |
630 | clk_register_clkdev(clk1, "sdhci_synth_gate_clk", NULL); | 628 | clk_register_clkdev(clk1, "sdhci_syn_gclk", NULL); |
631 | 629 | ||
632 | clk = clk_register_gate(NULL, "sdhci_clk", "sdhci_synth_gate_clk", 0, | 630 | clk = clk_register_gate(NULL, "sdhci_clk", "sdhci_syn_gclk", 0, |
633 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_SDHCI_CLK_ENB, 0, | 631 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_SDHCI_CLK_ENB, 0, |
634 | &_lock); | 632 | &_lock); |
635 | clk_register_clkdev(clk, NULL, "b3000000.sdhci"); | 633 | clk_register_clkdev(clk, NULL, "b3000000.sdhci"); |
636 | 634 | ||
637 | clk = clk_register_aux("cfxd_synth_clk", "cfxd_synth_gate_clk", | 635 | clk = clk_register_aux("cfxd_syn_clk", "cfxd_syn_gclk", "vco1div2_clk", |
638 | "vco1div2_clk", 0, SPEAR1340_CFXD_CLK_SYNT, NULL, | 636 | 0, SPEAR1340_CFXD_CLK_SYNT, NULL, aux_rtbl, |
639 | aux_rtbl, ARRAY_SIZE(aux_rtbl), &_lock, &clk1); | 637 | ARRAY_SIZE(aux_rtbl), &_lock, &clk1); |
640 | clk_register_clkdev(clk, "cfxd_synth_clk", NULL); | 638 | clk_register_clkdev(clk, "cfxd_syn_clk", NULL); |
641 | clk_register_clkdev(clk1, "cfxd_synth_gate_clk", NULL); | 639 | clk_register_clkdev(clk1, "cfxd_syn_gclk", NULL); |
642 | 640 | ||
643 | clk = clk_register_gate(NULL, "cfxd_clk", "cfxd_synth_gate_clk", 0, | 641 | clk = clk_register_gate(NULL, "cfxd_clk", "cfxd_syn_gclk", 0, |
644 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_CFXD_CLK_ENB, 0, | 642 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_CFXD_CLK_ENB, 0, |
645 | &_lock); | 643 | &_lock); |
646 | clk_register_clkdev(clk, NULL, "b2800000.cf"); | 644 | clk_register_clkdev(clk, NULL, "b2800000.cf"); |
647 | clk_register_clkdev(clk, NULL, "arasan_xd"); | 645 | clk_register_clkdev(clk, NULL, "arasan_xd"); |
648 | 646 | ||
649 | clk = clk_register_aux("c3_synth_clk", "c3_synth_gate_clk", | 647 | clk = clk_register_aux("c3_syn_clk", "c3_syn_gclk", "vco1div2_clk", 0, |
650 | "vco1div2_clk", 0, SPEAR1340_C3_CLK_SYNT, NULL, | 648 | SPEAR1340_C3_CLK_SYNT, NULL, aux_rtbl, |
651 | aux_rtbl, ARRAY_SIZE(aux_rtbl), &_lock, &clk1); | 649 | ARRAY_SIZE(aux_rtbl), &_lock, &clk1); |
652 | clk_register_clkdev(clk, "c3_synth_clk", NULL); | 650 | clk_register_clkdev(clk, "c3_syn_clk", NULL); |
653 | clk_register_clkdev(clk1, "c3_synth_gate_clk", NULL); | 651 | clk_register_clkdev(clk1, "c3_syn_gclk", NULL); |
654 | 652 | ||
655 | clk = clk_register_mux(NULL, "c3_mux_clk", c3_parents, | 653 | clk = clk_register_mux(NULL, "c3_mclk", c3_parents, |
656 | ARRAY_SIZE(c3_parents), 0, SPEAR1340_PERIP_CLK_CFG, | 654 | ARRAY_SIZE(c3_parents), 0, SPEAR1340_PERIP_CLK_CFG, |
657 | SPEAR1340_C3_CLK_SHIFT, SPEAR1340_C3_CLK_MASK, 0, | 655 | SPEAR1340_C3_CLK_SHIFT, SPEAR1340_C3_CLK_MASK, 0, |
658 | &_lock); | 656 | &_lock); |
659 | clk_register_clkdev(clk, "c3_mux_clk", NULL); | 657 | clk_register_clkdev(clk, "c3_mclk", NULL); |
660 | 658 | ||
661 | clk = clk_register_gate(NULL, "c3_clk", "c3_mux_clk", 0, | 659 | clk = clk_register_gate(NULL, "c3_clk", "c3_mclk", 0, |
662 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_C3_CLK_ENB, 0, | 660 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_C3_CLK_ENB, 0, |
663 | &_lock); | 661 | &_lock); |
664 | clk_register_clkdev(clk, NULL, "c3"); | 662 | clk_register_clkdev(clk, NULL, "c3"); |
665 | 663 | ||
666 | /* gmac */ | 664 | /* gmac */ |
667 | clk = clk_register_mux(NULL, "gmac_phy_input_mux_clk", | 665 | clk = clk_register_mux(NULL, "phy_input_mclk", gmac_phy_input_parents, |
668 | gmac_phy_input_parents, | ||
669 | ARRAY_SIZE(gmac_phy_input_parents), 0, | 666 | ARRAY_SIZE(gmac_phy_input_parents), 0, |
670 | SPEAR1340_GMAC_CLK_CFG, | 667 | SPEAR1340_GMAC_CLK_CFG, |
671 | SPEAR1340_GMAC_PHY_INPUT_CLK_SHIFT, | 668 | SPEAR1340_GMAC_PHY_INPUT_CLK_SHIFT, |
672 | SPEAR1340_GMAC_PHY_INPUT_CLK_MASK, 0, &_lock); | 669 | SPEAR1340_GMAC_PHY_INPUT_CLK_MASK, 0, &_lock); |
673 | clk_register_clkdev(clk, "gmac_phy_input_mux_clk", NULL); | 670 | clk_register_clkdev(clk, "phy_input_mclk", NULL); |
674 | 671 | ||
675 | clk = clk_register_aux("gmac_phy_synth_clk", "gmac_phy_synth_gate_clk", | 672 | clk = clk_register_aux("phy_syn_clk", "phy_syn_gclk", "phy_input_mclk", |
676 | "gmac_phy_input_mux_clk", 0, SPEAR1340_GMAC_CLK_SYNT, | 673 | 0, SPEAR1340_GMAC_CLK_SYNT, NULL, gmac_rtbl, |
677 | NULL, gmac_rtbl, ARRAY_SIZE(gmac_rtbl), &_lock, &clk1); | 674 | ARRAY_SIZE(gmac_rtbl), &_lock, &clk1); |
678 | clk_register_clkdev(clk, "gmac_phy_synth_clk", NULL); | 675 | clk_register_clkdev(clk, "phy_syn_clk", NULL); |
679 | clk_register_clkdev(clk1, "gmac_phy_synth_gate_clk", NULL); | 676 | clk_register_clkdev(clk1, "phy_syn_gclk", NULL); |
680 | 677 | ||
681 | clk = clk_register_mux(NULL, "gmac_phy_mux_clk", gmac_phy_parents, | 678 | clk = clk_register_mux(NULL, "phy_mclk", gmac_phy_parents, |
682 | ARRAY_SIZE(gmac_phy_parents), 0, | 679 | ARRAY_SIZE(gmac_phy_parents), 0, |
683 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_GMAC_PHY_CLK_SHIFT, | 680 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_GMAC_PHY_CLK_SHIFT, |
684 | SPEAR1340_GMAC_PHY_CLK_MASK, 0, &_lock); | 681 | SPEAR1340_GMAC_PHY_CLK_MASK, 0, &_lock); |
685 | clk_register_clkdev(clk, NULL, "stmmacphy.0"); | 682 | clk_register_clkdev(clk, NULL, "stmmacphy.0"); |
686 | 683 | ||
687 | /* clcd */ | 684 | /* clcd */ |
688 | clk = clk_register_mux(NULL, "clcd_synth_mux_clk", clcd_synth_parents, | 685 | clk = clk_register_mux(NULL, "clcd_syn_mclk", clcd_synth_parents, |
689 | ARRAY_SIZE(clcd_synth_parents), 0, | 686 | ARRAY_SIZE(clcd_synth_parents), 0, |
690 | SPEAR1340_CLCD_CLK_SYNT, SPEAR1340_CLCD_SYNT_CLK_SHIFT, | 687 | SPEAR1340_CLCD_CLK_SYNT, SPEAR1340_CLCD_SYNT_CLK_SHIFT, |
691 | SPEAR1340_CLCD_SYNT_CLK_MASK, 0, &_lock); | 688 | SPEAR1340_CLCD_SYNT_CLK_MASK, 0, &_lock); |
692 | clk_register_clkdev(clk, "clcd_synth_mux_clk", NULL); | 689 | clk_register_clkdev(clk, "clcd_syn_mclk", NULL); |
693 | 690 | ||
694 | clk = clk_register_frac("clcd_synth_clk", "clcd_synth_mux_clk", 0, | 691 | clk = clk_register_frac("clcd_syn_clk", "clcd_syn_mclk", 0, |
695 | SPEAR1340_CLCD_CLK_SYNT, clcd_rtbl, | 692 | SPEAR1340_CLCD_CLK_SYNT, clcd_rtbl, |
696 | ARRAY_SIZE(clcd_rtbl), &_lock); | 693 | ARRAY_SIZE(clcd_rtbl), &_lock); |
697 | clk_register_clkdev(clk, "clcd_synth_clk", NULL); | 694 | clk_register_clkdev(clk, "clcd_syn_clk", NULL); |
698 | 695 | ||
699 | clk = clk_register_mux(NULL, "clcd_pixel_mux_clk", clcd_pixel_parents, | 696 | clk = clk_register_mux(NULL, "clcd_pixel_mclk", clcd_pixel_parents, |
700 | ARRAY_SIZE(clcd_pixel_parents), 0, | 697 | ARRAY_SIZE(clcd_pixel_parents), 0, |
701 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_CLCD_CLK_SHIFT, | 698 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_CLCD_CLK_SHIFT, |
702 | SPEAR1340_CLCD_CLK_MASK, 0, &_lock); | 699 | SPEAR1340_CLCD_CLK_MASK, 0, &_lock); |
703 | clk_register_clkdev(clk, "clcd_pixel_clk", NULL); | 700 | clk_register_clkdev(clk, "clcd_pixel_clk", NULL); |
704 | 701 | ||
705 | clk = clk_register_gate(NULL, "clcd_clk", "clcd_pixel_mux_clk", 0, | 702 | clk = clk_register_gate(NULL, "clcd_clk", "clcd_pixel_mclk", 0, |
706 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_CLCD_CLK_ENB, 0, | 703 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_CLCD_CLK_ENB, 0, |
707 | &_lock); | 704 | &_lock); |
708 | clk_register_clkdev(clk, "clcd_clk", NULL); | 705 | clk_register_clkdev(clk, "clcd_clk", NULL); |
709 | 706 | ||
710 | /* i2s */ | 707 | /* i2s */ |
711 | clk = clk_register_mux(NULL, "i2s_src_mux_clk", i2s_src_parents, | 708 | clk = clk_register_mux(NULL, "i2s_src_mclk", i2s_src_parents, |
712 | ARRAY_SIZE(i2s_src_parents), 0, SPEAR1340_I2S_CLK_CFG, | 709 | ARRAY_SIZE(i2s_src_parents), 0, SPEAR1340_I2S_CLK_CFG, |
713 | SPEAR1340_I2S_SRC_CLK_SHIFT, SPEAR1340_I2S_SRC_CLK_MASK, | 710 | SPEAR1340_I2S_SRC_CLK_SHIFT, SPEAR1340_I2S_SRC_CLK_MASK, |
714 | 0, &_lock); | 711 | 0, &_lock); |
715 | clk_register_clkdev(clk, "i2s_src_clk", NULL); | 712 | clk_register_clkdev(clk, "i2s_src_clk", NULL); |
716 | 713 | ||
717 | clk = clk_register_aux("i2s_prs1_clk", NULL, "i2s_src_mux_clk", 0, | 714 | clk = clk_register_aux("i2s_prs1_clk", NULL, "i2s_src_mclk", 0, |
718 | SPEAR1340_I2S_CLK_CFG, &i2s_prs1_masks, i2s_prs1_rtbl, | 715 | SPEAR1340_I2S_CLK_CFG, &i2s_prs1_masks, i2s_prs1_rtbl, |
719 | ARRAY_SIZE(i2s_prs1_rtbl), &_lock, NULL); | 716 | ARRAY_SIZE(i2s_prs1_rtbl), &_lock, NULL); |
720 | clk_register_clkdev(clk, "i2s_prs1_clk", NULL); | 717 | clk_register_clkdev(clk, "i2s_prs1_clk", NULL); |
721 | 718 | ||
722 | clk = clk_register_mux(NULL, "i2s_ref_mux_clk", i2s_ref_parents, | 719 | clk = clk_register_mux(NULL, "i2s_ref_mclk", i2s_ref_parents, |
723 | ARRAY_SIZE(i2s_ref_parents), 0, SPEAR1340_I2S_CLK_CFG, | 720 | ARRAY_SIZE(i2s_ref_parents), 0, SPEAR1340_I2S_CLK_CFG, |
724 | SPEAR1340_I2S_REF_SHIFT, SPEAR1340_I2S_REF_SEL_MASK, 0, | 721 | SPEAR1340_I2S_REF_SHIFT, SPEAR1340_I2S_REF_SEL_MASK, 0, |
725 | &_lock); | 722 | &_lock); |
726 | clk_register_clkdev(clk, "i2s_ref_clk", NULL); | 723 | clk_register_clkdev(clk, "i2s_ref_clk", NULL); |
727 | 724 | ||
728 | clk = clk_register_gate(NULL, "i2s_ref_pad_clk", "i2s_ref_mux_clk", 0, | 725 | clk = clk_register_gate(NULL, "i2s_ref_pad_clk", "i2s_ref_mclk", 0, |
729 | SPEAR1340_PERIP2_CLK_ENB, SPEAR1340_I2S_REF_PAD_CLK_ENB, | 726 | SPEAR1340_PERIP2_CLK_ENB, SPEAR1340_I2S_REF_PAD_CLK_ENB, |
730 | 0, &_lock); | 727 | 0, &_lock); |
731 | clk_register_clkdev(clk, "i2s_ref_pad_clk", NULL); | 728 | clk_register_clkdev(clk, "i2s_ref_pad_clk", NULL); |
732 | 729 | ||
733 | clk = clk_register_aux("i2s_sclk_clk", "i2s_sclk_gate_clk", | 730 | clk = clk_register_aux("i2s_sclk_clk", "i2s_sclk_gclk", "i2s_ref_mclk", |
734 | "i2s_ref_mux_clk", 0, SPEAR1340_I2S_CLK_CFG, | 731 | 0, SPEAR1340_I2S_CLK_CFG, &i2s_sclk_masks, |
735 | &i2s_sclk_masks, i2s_sclk_rtbl, | 732 | i2s_sclk_rtbl, ARRAY_SIZE(i2s_sclk_rtbl), &_lock, |
736 | ARRAY_SIZE(i2s_sclk_rtbl), &_lock, &clk1); | 733 | &clk1); |
737 | clk_register_clkdev(clk, "i2s_sclk_clk", NULL); | 734 | clk_register_clkdev(clk, "i2s_sclk_clk", NULL); |
738 | clk_register_clkdev(clk1, "i2s_sclk_gate_clk", NULL); | 735 | clk_register_clkdev(clk1, "i2s_sclk_gclk", NULL); |
739 | 736 | ||
740 | /* clock derived from ahb clk */ | 737 | /* clock derived from ahb clk */ |
741 | clk = clk_register_gate(NULL, "i2c0_clk", "ahb_clk", 0, | 738 | clk = clk_register_gate(NULL, "i2c0_clk", "ahb_clk", 0, |
@@ -800,13 +797,13 @@ void __init spear1340_clk_init(void) | |||
800 | &_lock); | 797 | &_lock); |
801 | clk_register_clkdev(clk, "sysram1_clk", NULL); | 798 | clk_register_clkdev(clk, "sysram1_clk", NULL); |
802 | 799 | ||
803 | clk = clk_register_aux("adc_synth_clk", "adc_synth_gate_clk", "ahb_clk", | 800 | clk = clk_register_aux("adc_syn_clk", "adc_syn_gclk", "ahb_clk", |
804 | 0, SPEAR1340_ADC_CLK_SYNT, NULL, adc_rtbl, | 801 | 0, SPEAR1340_ADC_CLK_SYNT, NULL, adc_rtbl, |
805 | ARRAY_SIZE(adc_rtbl), &_lock, &clk1); | 802 | ARRAY_SIZE(adc_rtbl), &_lock, &clk1); |
806 | clk_register_clkdev(clk, "adc_synth_clk", NULL); | 803 | clk_register_clkdev(clk, "adc_syn_clk", NULL); |
807 | clk_register_clkdev(clk1, "adc_synth_gate_clk", NULL); | 804 | clk_register_clkdev(clk1, "adc_syn_gclk", NULL); |
808 | 805 | ||
809 | clk = clk_register_gate(NULL, "adc_clk", "adc_synth_gate_clk", 0, | 806 | clk = clk_register_gate(NULL, "adc_clk", "adc_syn_gclk", 0, |
810 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_ADC_CLK_ENB, 0, | 807 | SPEAR1340_PERIP1_CLK_ENB, SPEAR1340_ADC_CLK_ENB, 0, |
811 | &_lock); | 808 | &_lock); |
812 | clk_register_clkdev(clk, NULL, "adc_clk"); | 809 | clk_register_clkdev(clk, NULL, "adc_clk"); |
@@ -843,39 +840,39 @@ void __init spear1340_clk_init(void) | |||
843 | clk_register_clkdev(clk, NULL, "e0300000.kbd"); | 840 | clk_register_clkdev(clk, NULL, "e0300000.kbd"); |
844 | 841 | ||
845 | /* RAS clks */ | 842 | /* RAS clks */ |
846 | clk = clk_register_mux(NULL, "gen_synth0_1_mux_clk", | 843 | clk = clk_register_mux(NULL, "gen_syn0_1_mclk", gen_synth0_1_parents, |
847 | gen_synth0_1_parents, ARRAY_SIZE(gen_synth0_1_parents), | 844 | ARRAY_SIZE(gen_synth0_1_parents), 0, SPEAR1340_PLL_CFG, |
848 | 0, SPEAR1340_PLL_CFG, SPEAR1340_GEN_SYNT0_1_CLK_SHIFT, | 845 | SPEAR1340_GEN_SYNT0_1_CLK_SHIFT, |
849 | SPEAR1340_GEN_SYNT_CLK_MASK, 0, &_lock); | 846 | SPEAR1340_GEN_SYNT_CLK_MASK, 0, &_lock); |
850 | clk_register_clkdev(clk, "gen_synth0_1_clk", NULL); | 847 | clk_register_clkdev(clk, "gen_syn0_1_clk", NULL); |
851 | 848 | ||
852 | clk = clk_register_mux(NULL, "gen_synth2_3_mux_clk", | 849 | clk = clk_register_mux(NULL, "gen_syn2_3_mclk", gen_synth2_3_parents, |
853 | gen_synth2_3_parents, ARRAY_SIZE(gen_synth2_3_parents), | 850 | ARRAY_SIZE(gen_synth2_3_parents), 0, SPEAR1340_PLL_CFG, |
854 | 0, SPEAR1340_PLL_CFG, SPEAR1340_GEN_SYNT2_3_CLK_SHIFT, | 851 | SPEAR1340_GEN_SYNT2_3_CLK_SHIFT, |
855 | SPEAR1340_GEN_SYNT_CLK_MASK, 0, &_lock); | 852 | SPEAR1340_GEN_SYNT_CLK_MASK, 0, &_lock); |
856 | clk_register_clkdev(clk, "gen_synth2_3_clk", NULL); | 853 | clk_register_clkdev(clk, "gen_syn2_3_clk", NULL); |
857 | 854 | ||
858 | clk = clk_register_frac("gen_synth0_clk", "gen_synth0_1_clk", 0, | 855 | clk = clk_register_frac("gen_syn0_clk", "gen_syn0_1_clk", 0, |
859 | SPEAR1340_GEN_CLK_SYNT0, gen_rtbl, ARRAY_SIZE(gen_rtbl), | 856 | SPEAR1340_GEN_CLK_SYNT0, gen_rtbl, ARRAY_SIZE(gen_rtbl), |
860 | &_lock); | 857 | &_lock); |
861 | clk_register_clkdev(clk, "gen_synth0_clk", NULL); | 858 | clk_register_clkdev(clk, "gen_syn0_clk", NULL); |
862 | 859 | ||
863 | clk = clk_register_frac("gen_synth1_clk", "gen_synth0_1_clk", 0, | 860 | clk = clk_register_frac("gen_syn1_clk", "gen_syn0_1_clk", 0, |
864 | SPEAR1340_GEN_CLK_SYNT1, gen_rtbl, ARRAY_SIZE(gen_rtbl), | 861 | SPEAR1340_GEN_CLK_SYNT1, gen_rtbl, ARRAY_SIZE(gen_rtbl), |
865 | &_lock); | 862 | &_lock); |
866 | clk_register_clkdev(clk, "gen_synth1_clk", NULL); | 863 | clk_register_clkdev(clk, "gen_syn1_clk", NULL); |
867 | 864 | ||
868 | clk = clk_register_frac("gen_synth2_clk", "gen_synth2_3_clk", 0, | 865 | clk = clk_register_frac("gen_syn2_clk", "gen_syn2_3_clk", 0, |
869 | SPEAR1340_GEN_CLK_SYNT2, gen_rtbl, ARRAY_SIZE(gen_rtbl), | 866 | SPEAR1340_GEN_CLK_SYNT2, gen_rtbl, ARRAY_SIZE(gen_rtbl), |
870 | &_lock); | 867 | &_lock); |
871 | clk_register_clkdev(clk, "gen_synth2_clk", NULL); | 868 | clk_register_clkdev(clk, "gen_syn2_clk", NULL); |
872 | 869 | ||
873 | clk = clk_register_frac("gen_synth3_clk", "gen_synth2_3_clk", 0, | 870 | clk = clk_register_frac("gen_syn3_clk", "gen_syn2_3_clk", 0, |
874 | SPEAR1340_GEN_CLK_SYNT3, gen_rtbl, ARRAY_SIZE(gen_rtbl), | 871 | SPEAR1340_GEN_CLK_SYNT3, gen_rtbl, ARRAY_SIZE(gen_rtbl), |
875 | &_lock); | 872 | &_lock); |
876 | clk_register_clkdev(clk, "gen_synth3_clk", NULL); | 873 | clk_register_clkdev(clk, "gen_syn3_clk", NULL); |
877 | 874 | ||
878 | clk = clk_register_gate(NULL, "mali_clk", "gen_synth3_clk", 0, | 875 | clk = clk_register_gate(NULL, "mali_clk", "gen_syn3_clk", 0, |
879 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_MALI_CLK_ENB, 0, | 876 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_MALI_CLK_ENB, 0, |
880 | &_lock); | 877 | &_lock); |
881 | clk_register_clkdev(clk, NULL, "mali"); | 878 | clk_register_clkdev(clk, NULL, "mali"); |
@@ -890,74 +887,74 @@ void __init spear1340_clk_init(void) | |||
890 | &_lock); | 887 | &_lock); |
891 | clk_register_clkdev(clk, NULL, "spear_cec.1"); | 888 | clk_register_clkdev(clk, NULL, "spear_cec.1"); |
892 | 889 | ||
893 | clk = clk_register_mux(NULL, "spdif_out_mux_clk", spdif_out_parents, | 890 | clk = clk_register_mux(NULL, "spdif_out_mclk", spdif_out_parents, |
894 | ARRAY_SIZE(spdif_out_parents), 0, | 891 | ARRAY_SIZE(spdif_out_parents), 0, |
895 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_SPDIF_OUT_CLK_SHIFT, | 892 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_SPDIF_OUT_CLK_SHIFT, |
896 | SPEAR1340_SPDIF_CLK_MASK, 0, &_lock); | 893 | SPEAR1340_SPDIF_CLK_MASK, 0, &_lock); |
897 | clk_register_clkdev(clk, "spdif_out_mux_clk", NULL); | 894 | clk_register_clkdev(clk, "spdif_out_mclk", NULL); |
898 | 895 | ||
899 | clk = clk_register_gate(NULL, "spdif_out_clk", "spdif_out_mux_clk", 0, | 896 | clk = clk_register_gate(NULL, "spdif_out_clk", "spdif_out_mclk", 0, |
900 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_SPDIF_OUT_CLK_ENB, | 897 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_SPDIF_OUT_CLK_ENB, |
901 | 0, &_lock); | 898 | 0, &_lock); |
902 | clk_register_clkdev(clk, NULL, "spdif-out"); | 899 | clk_register_clkdev(clk, NULL, "spdif-out"); |
903 | 900 | ||
904 | clk = clk_register_mux(NULL, "spdif_in_mux_clk", spdif_in_parents, | 901 | clk = clk_register_mux(NULL, "spdif_in_mclk", spdif_in_parents, |
905 | ARRAY_SIZE(spdif_in_parents), 0, | 902 | ARRAY_SIZE(spdif_in_parents), 0, |
906 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_SPDIF_IN_CLK_SHIFT, | 903 | SPEAR1340_PERIP_CLK_CFG, SPEAR1340_SPDIF_IN_CLK_SHIFT, |
907 | SPEAR1340_SPDIF_CLK_MASK, 0, &_lock); | 904 | SPEAR1340_SPDIF_CLK_MASK, 0, &_lock); |
908 | clk_register_clkdev(clk, "spdif_in_mux_clk", NULL); | 905 | clk_register_clkdev(clk, "spdif_in_mclk", NULL); |
909 | 906 | ||
910 | clk = clk_register_gate(NULL, "spdif_in_clk", "spdif_in_mux_clk", 0, | 907 | clk = clk_register_gate(NULL, "spdif_in_clk", "spdif_in_mclk", 0, |
911 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_SPDIF_IN_CLK_ENB, 0, | 908 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_SPDIF_IN_CLK_ENB, 0, |
912 | &_lock); | 909 | &_lock); |
913 | clk_register_clkdev(clk, NULL, "spdif-in"); | 910 | clk_register_clkdev(clk, NULL, "spdif-in"); |
914 | 911 | ||
915 | clk = clk_register_gate(NULL, "acp_clk", "acp_mux_clk", 0, | 912 | clk = clk_register_gate(NULL, "acp_clk", "acp_mclk", 0, |
916 | SPEAR1340_PERIP2_CLK_ENB, SPEAR1340_ACP_CLK_ENB, 0, | 913 | SPEAR1340_PERIP2_CLK_ENB, SPEAR1340_ACP_CLK_ENB, 0, |
917 | &_lock); | 914 | &_lock); |
918 | clk_register_clkdev(clk, NULL, "acp_clk"); | 915 | clk_register_clkdev(clk, NULL, "acp_clk"); |
919 | 916 | ||
920 | clk = clk_register_gate(NULL, "plgpio_clk", "plgpio_mux_clk", 0, | 917 | clk = clk_register_gate(NULL, "plgpio_clk", "plgpio_mclk", 0, |
921 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_PLGPIO_CLK_ENB, 0, | 918 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_PLGPIO_CLK_ENB, 0, |
922 | &_lock); | 919 | &_lock); |
923 | clk_register_clkdev(clk, NULL, "plgpio"); | 920 | clk_register_clkdev(clk, NULL, "plgpio"); |
924 | 921 | ||
925 | clk = clk_register_gate(NULL, "video_dec_clk", "video_dec_mux_clk", 0, | 922 | clk = clk_register_gate(NULL, "video_dec_clk", "video_dec_mclk", 0, |
926 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_VIDEO_DEC_CLK_ENB, | 923 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_VIDEO_DEC_CLK_ENB, |
927 | 0, &_lock); | 924 | 0, &_lock); |
928 | clk_register_clkdev(clk, NULL, "video_dec"); | 925 | clk_register_clkdev(clk, NULL, "video_dec"); |
929 | 926 | ||
930 | clk = clk_register_gate(NULL, "video_enc_clk", "video_enc_mux_clk", 0, | 927 | clk = clk_register_gate(NULL, "video_enc_clk", "video_enc_mclk", 0, |
931 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_VIDEO_ENC_CLK_ENB, | 928 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_VIDEO_ENC_CLK_ENB, |
932 | 0, &_lock); | 929 | 0, &_lock); |
933 | clk_register_clkdev(clk, NULL, "video_enc"); | 930 | clk_register_clkdev(clk, NULL, "video_enc"); |
934 | 931 | ||
935 | clk = clk_register_gate(NULL, "video_in_clk", "video_in_mux_clk", 0, | 932 | clk = clk_register_gate(NULL, "video_in_clk", "video_in_mclk", 0, |
936 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_VIDEO_IN_CLK_ENB, 0, | 933 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_VIDEO_IN_CLK_ENB, 0, |
937 | &_lock); | 934 | &_lock); |
938 | clk_register_clkdev(clk, NULL, "spear_vip"); | 935 | clk_register_clkdev(clk, NULL, "spear_vip"); |
939 | 936 | ||
940 | clk = clk_register_gate(NULL, "cam0_clk", "cam0_mux_clk", 0, | 937 | clk = clk_register_gate(NULL, "cam0_clk", "cam0_mclk", 0, |
941 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_CAM0_CLK_ENB, 0, | 938 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_CAM0_CLK_ENB, 0, |
942 | &_lock); | 939 | &_lock); |
943 | clk_register_clkdev(clk, NULL, "spear_camif.0"); | 940 | clk_register_clkdev(clk, NULL, "spear_camif.0"); |
944 | 941 | ||
945 | clk = clk_register_gate(NULL, "cam1_clk", "cam1_mux_clk", 0, | 942 | clk = clk_register_gate(NULL, "cam1_clk", "cam1_mclk", 0, |
946 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_CAM1_CLK_ENB, 0, | 943 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_CAM1_CLK_ENB, 0, |
947 | &_lock); | 944 | &_lock); |
948 | clk_register_clkdev(clk, NULL, "spear_camif.1"); | 945 | clk_register_clkdev(clk, NULL, "spear_camif.1"); |
949 | 946 | ||
950 | clk = clk_register_gate(NULL, "cam2_clk", "cam2_mux_clk", 0, | 947 | clk = clk_register_gate(NULL, "cam2_clk", "cam2_mclk", 0, |
951 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_CAM2_CLK_ENB, 0, | 948 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_CAM2_CLK_ENB, 0, |
952 | &_lock); | 949 | &_lock); |
953 | clk_register_clkdev(clk, NULL, "spear_camif.2"); | 950 | clk_register_clkdev(clk, NULL, "spear_camif.2"); |
954 | 951 | ||
955 | clk = clk_register_gate(NULL, "cam3_clk", "cam3_mux_clk", 0, | 952 | clk = clk_register_gate(NULL, "cam3_clk", "cam3_mclk", 0, |
956 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_CAM3_CLK_ENB, 0, | 953 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_CAM3_CLK_ENB, 0, |
957 | &_lock); | 954 | &_lock); |
958 | clk_register_clkdev(clk, NULL, "spear_camif.3"); | 955 | clk_register_clkdev(clk, NULL, "spear_camif.3"); |
959 | 956 | ||
960 | clk = clk_register_gate(NULL, "pwm_clk", "pwm_mux_clk", 0, | 957 | clk = clk_register_gate(NULL, "pwm_clk", "pwm_mclk", 0, |
961 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_PWM_CLK_ENB, 0, | 958 | SPEAR1340_PERIP3_CLK_ENB, SPEAR1340_PWM_CLK_ENB, 0, |
962 | &_lock); | 959 | &_lock); |
963 | clk_register_clkdev(clk, NULL, "pwm"); | 960 | clk_register_clkdev(clk, NULL, "pwm"); |