aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/spear
diff options
context:
space:
mode:
authorVipul Kumar Samar <vipulkumar.samar@st.com>2012-07-10 07:42:44 -0400
committerShiraz Hashim <shiraz.hashim@st.com>2012-07-18 00:34:36 -0400
commite28f1aa110c919716188b979c4404e4c8e9794b9 (patch)
tree5fedc1ee2fd8cb3731ea4b588cc2519d2320eba7 /drivers/clk/spear
parent5cb6a9bccaa65e0cbf567485ac6d04ca3fdae79c (diff)
clk:spear1310:Fix: Rename clk ids within predefined limit
The max limit of con_id is 16 and dev_id is 20. As of now for spear1310, many clk ids are exceeding this predefined limit. This patch is intended to 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/spear')
-rw-r--r--drivers/clk/spear/spear1310_clock.c312
1 files changed, 155 insertions, 157 deletions
diff --git a/drivers/clk/spear/spear1310_clock.c b/drivers/clk/spear/spear1310_clock.c
index 8f05652d53e6..0fcec2aae19c 100644
--- a/drivers/clk/spear/spear1310_clock.c
+++ b/drivers/clk/spear/spear1310_clock.c
@@ -345,31 +345,30 @@ static struct frac_rate_tbl gen_rtbl[] = {
345/* clock parents */ 345/* clock parents */
346static const char *vco_parents[] = { "osc_24m_clk", "osc_25m_clk", }; 346static const char *vco_parents[] = { "osc_24m_clk", "osc_25m_clk", };
347static const char *gpt_parents[] = { "osc_24m_clk", "apb_clk", }; 347static const char *gpt_parents[] = { "osc_24m_clk", "apb_clk", };
348static const char *uart0_parents[] = { "pll5_clk", "uart_synth_gate_clk", }; 348static const char *uart0_parents[] = { "pll5_clk", "uart_syn_gclk", };
349static const char *c3_parents[] = { "pll5_clk", "c3_synth_gate_clk", }; 349static const char *c3_parents[] = { "pll5_clk", "c3_syn_gclk", };
350static const char *gmac_phy_input_parents[] = { "gmii_125m_pad_clk", "pll2_clk", 350static const char *gmac_phy_input_parents[] = { "gmii_pad_clk", "pll2_clk",
351 "osc_25m_clk", }; 351 "osc_25m_clk", };
352static const char *gmac_phy_parents[] = { "gmac_phy_input_mux_clk", 352static const char *gmac_phy_parents[] = { "phy_input_mclk", "phy_syn_gclk", };
353 "gmac_phy_synth_gate_clk", };
354static const char *clcd_synth_parents[] = { "vco1div4_clk", "pll2_clk", }; 353static const char *clcd_synth_parents[] = { "vco1div4_clk", "pll2_clk", };
355static const char *clcd_pixel_parents[] = { "pll5_clk", "clcd_synth_clk", }; 354static const char *clcd_pixel_parents[] = { "pll5_clk", "clcd_syn_clk", };
356static const char *i2s_src_parents[] = { "vco1div2_clk", "none", "pll3_clk", 355static const char *i2s_src_parents[] = { "vco1div2_clk", "none", "pll3_clk",
357 "i2s_src_pad_clk", }; 356 "i2s_src_pad_clk", };
358static const char *i2s_ref_parents[] = { "i2s_src_mux_clk", "i2s_prs1_clk", }; 357static const char *i2s_ref_parents[] = { "i2s_src_mclk", "i2s_prs1_clk", };
359static const char *gen_synth0_1_parents[] = { "vco1div4_clk", "vco3div2_clk", 358static const char *gen_synth0_1_parents[] = { "vco1div4_clk", "vco3div2_clk",
360 "pll3_clk", }; 359 "pll3_clk", };
361static const char *gen_synth2_3_parents[] = { "vco1div4_clk", "vco3div2_clk", 360static const char *gen_synth2_3_parents[] = { "vco1div4_clk", "vco3div2_clk",
362 "pll2_clk", }; 361 "pll2_clk", };
363static const char *rmii_phy_parents[] = { "ras_tx50_clk", "none", 362static const char *rmii_phy_parents[] = { "ras_tx50_clk", "none",
364 "ras_pll2_clk", "ras_synth0_clk", }; 363 "ras_pll2_clk", "ras_syn0_clk", };
365static const char *smii_rgmii_phy_parents[] = { "none", "ras_tx125_clk", 364static const char *smii_rgmii_phy_parents[] = { "none", "ras_tx125_clk",
366 "ras_pll2_clk", "ras_synth0_clk", }; 365 "ras_pll2_clk", "ras_syn0_clk", };
367static const char *uart_parents[] = { "ras_apb_clk", "gen_synth3_clk", }; 366static const char *uart_parents[] = { "ras_apb_clk", "gen_syn3_clk", };
368static const char *i2c_parents[] = { "ras_apb_clk", "gen_synth1_clk", }; 367static const char *i2c_parents[] = { "ras_apb_clk", "gen_syn1_clk", };
369static const char *ssp1_parents[] = { "ras_apb_clk", "gen_synth1_clk", 368static const char *ssp1_parents[] = { "ras_apb_clk", "gen_syn1_clk",
370 "ras_plclk0_clk", }; 369 "ras_plclk0_clk", };
371static const char *pci_parents[] = { "ras_pll3_clk", "gen_synth2_clk", }; 370static const char *pci_parents[] = { "ras_pll3_clk", "gen_syn2_clk", };
372static const char *tdm_parents[] = { "ras_pll3_clk", "gen_synth1_clk", }; 371static const char *tdm_parents[] = { "ras_pll3_clk", "gen_syn1_clk", };
373 372
374void __init spear1310_clk_init(void) 373void __init spear1310_clk_init(void)
375{ 374{
@@ -390,9 +389,9 @@ void __init spear1310_clk_init(void)
390 25000000); 389 25000000);
391 clk_register_clkdev(clk, "osc_25m_clk", NULL); 390 clk_register_clkdev(clk, "osc_25m_clk", NULL);
392 391
393 clk = clk_register_fixed_rate(NULL, "gmii_125m_pad_clk", NULL, 392 clk = clk_register_fixed_rate(NULL, "gmii_pad_clk", NULL, CLK_IS_ROOT,
394 CLK_IS_ROOT, 125000000); 393 125000000);
395 clk_register_clkdev(clk, "gmii_125m_pad_clk", NULL); 394 clk_register_clkdev(clk, "gmii_pad_clk", NULL);
396 395
397 clk = clk_register_fixed_rate(NULL, "i2s_src_pad_clk", NULL, 396 clk = clk_register_fixed_rate(NULL, "i2s_src_pad_clk", NULL,
398 CLK_IS_ROOT, 12288000); 397 CLK_IS_ROOT, 12288000);
@@ -406,34 +405,34 @@ void __init spear1310_clk_init(void)
406 405
407 /* clock derived from 24 or 25 MHz osc clk */ 406 /* clock derived from 24 or 25 MHz osc clk */
408 /* vco-pll */ 407 /* vco-pll */
409 clk = clk_register_mux(NULL, "vco1_mux_clk", vco_parents, 408 clk = clk_register_mux(NULL, "vco1_mclk", vco_parents,
410 ARRAY_SIZE(vco_parents), 0, SPEAR1310_PLL_CFG, 409 ARRAY_SIZE(vco_parents), 0, SPEAR1310_PLL_CFG,
411 SPEAR1310_PLL1_CLK_SHIFT, SPEAR1310_PLL_CLK_MASK, 0, 410 SPEAR1310_PLL1_CLK_SHIFT, SPEAR1310_PLL_CLK_MASK, 0,
412 &_lock); 411 &_lock);
413 clk_register_clkdev(clk, "vco1_mux_clk", NULL); 412 clk_register_clkdev(clk, "vco1_mclk", NULL);
414 clk = clk_register_vco_pll("vco1_clk", "pll1_clk", NULL, "vco1_mux_clk", 413 clk = clk_register_vco_pll("vco1_clk", "pll1_clk", NULL, "vco1_mclk",
415 0, SPEAR1310_PLL1_CTR, SPEAR1310_PLL1_FRQ, pll_rtbl, 414 0, SPEAR1310_PLL1_CTR, SPEAR1310_PLL1_FRQ, pll_rtbl,
416 ARRAY_SIZE(pll_rtbl), &_lock, &clk1, NULL); 415 ARRAY_SIZE(pll_rtbl), &_lock, &clk1, NULL);
417 clk_register_clkdev(clk, "vco1_clk", NULL); 416 clk_register_clkdev(clk, "vco1_clk", NULL);
418 clk_register_clkdev(clk1, "pll1_clk", NULL); 417 clk_register_clkdev(clk1, "pll1_clk", NULL);
419 418
420 clk = clk_register_mux(NULL, "vco2_mux_clk", vco_parents, 419 clk = clk_register_mux(NULL, "vco2_mclk", vco_parents,
421 ARRAY_SIZE(vco_parents), 0, SPEAR1310_PLL_CFG, 420 ARRAY_SIZE(vco_parents), 0, SPEAR1310_PLL_CFG,
422 SPEAR1310_PLL2_CLK_SHIFT, SPEAR1310_PLL_CLK_MASK, 0, 421 SPEAR1310_PLL2_CLK_SHIFT, SPEAR1310_PLL_CLK_MASK, 0,
423 &_lock); 422 &_lock);
424 clk_register_clkdev(clk, "vco2_mux_clk", NULL); 423 clk_register_clkdev(clk, "vco2_mclk", NULL);
425 clk = clk_register_vco_pll("vco2_clk", "pll2_clk", NULL, "vco2_mux_clk", 424 clk = clk_register_vco_pll("vco2_clk", "pll2_clk", NULL, "vco2_mclk",
426 0, SPEAR1310_PLL2_CTR, SPEAR1310_PLL2_FRQ, pll_rtbl, 425 0, SPEAR1310_PLL2_CTR, SPEAR1310_PLL2_FRQ, pll_rtbl,
427 ARRAY_SIZE(pll_rtbl), &_lock, &clk1, NULL); 426 ARRAY_SIZE(pll_rtbl), &_lock, &clk1, NULL);
428 clk_register_clkdev(clk, "vco2_clk", NULL); 427 clk_register_clkdev(clk, "vco2_clk", NULL);
429 clk_register_clkdev(clk1, "pll2_clk", NULL); 428 clk_register_clkdev(clk1, "pll2_clk", NULL);
430 429
431 clk = clk_register_mux(NULL, "vco3_mux_clk", vco_parents, 430 clk = clk_register_mux(NULL, "vco3_mclk", vco_parents,
432 ARRAY_SIZE(vco_parents), 0, SPEAR1310_PLL_CFG, 431 ARRAY_SIZE(vco_parents), 0, SPEAR1310_PLL_CFG,
433 SPEAR1310_PLL3_CLK_SHIFT, SPEAR1310_PLL_CLK_MASK, 0, 432 SPEAR1310_PLL3_CLK_SHIFT, SPEAR1310_PLL_CLK_MASK, 0,
434 &_lock); 433 &_lock);
435 clk_register_clkdev(clk, "vco3_mux_clk", NULL); 434 clk_register_clkdev(clk, "vco3_mclk", NULL);
436 clk = clk_register_vco_pll("vco3_clk", "pll3_clk", NULL, "vco3_mux_clk", 435 clk = clk_register_vco_pll("vco3_clk", "pll3_clk", NULL, "vco3_mclk",
437 0, SPEAR1310_PLL3_CTR, SPEAR1310_PLL3_FRQ, pll_rtbl, 436 0, SPEAR1310_PLL3_CTR, SPEAR1310_PLL3_FRQ, pll_rtbl,
438 ARRAY_SIZE(pll_rtbl), &_lock, &clk1, NULL); 437 ARRAY_SIZE(pll_rtbl), &_lock, &clk1, NULL);
439 clk_register_clkdev(clk, "vco3_clk", NULL); 438 clk_register_clkdev(clk, "vco3_clk", NULL);
@@ -473,7 +472,7 @@ void __init spear1310_clk_init(void)
473 /* peripherals */ 472 /* peripherals */
474 clk_register_fixed_factor(NULL, "thermal_clk", "osc_24m_clk", 0, 1, 473 clk_register_fixed_factor(NULL, "thermal_clk", "osc_24m_clk", 0, 1,
475 128); 474 128);
476 clk = clk_register_gate(NULL, "thermal_gate_clk", "thermal_clk", 0, 475 clk = clk_register_gate(NULL, "thermal_gclk", "thermal_clk", 0,
477 SPEAR1310_PERIP2_CLK_ENB, SPEAR1310_THSENS_CLK_ENB, 0, 476 SPEAR1310_PERIP2_CLK_ENB, SPEAR1310_THSENS_CLK_ENB, 0,
478 &_lock); 477 &_lock);
479 clk_register_clkdev(clk, NULL, "spear_thermal"); 478 clk_register_clkdev(clk, NULL, "spear_thermal");
@@ -500,177 +499,176 @@ void __init spear1310_clk_init(void)
500 clk_register_clkdev(clk, "apb_clk", NULL); 499 clk_register_clkdev(clk, "apb_clk", NULL);
501 500
502 /* gpt clocks */ 501 /* gpt clocks */
503 clk = clk_register_mux(NULL, "gpt0_mux_clk", gpt_parents, 502 clk = clk_register_mux(NULL, "gpt0_mclk", gpt_parents,
504 ARRAY_SIZE(gpt_parents), 0, SPEAR1310_PERIP_CLK_CFG, 503 ARRAY_SIZE(gpt_parents), 0, SPEAR1310_PERIP_CLK_CFG,
505 SPEAR1310_GPT0_CLK_SHIFT, SPEAR1310_GPT_CLK_MASK, 0, 504 SPEAR1310_GPT0_CLK_SHIFT, SPEAR1310_GPT_CLK_MASK, 0,
506 &_lock); 505 &_lock);
507 clk_register_clkdev(clk, "gpt0_mux_clk", NULL); 506 clk_register_clkdev(clk, "gpt0_mclk", NULL);
508 clk = clk_register_gate(NULL, "gpt0_clk", "gpt0_mux_clk", 0, 507 clk = clk_register_gate(NULL, "gpt0_clk", "gpt0_mclk", 0,
509 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_GPT0_CLK_ENB, 0, 508 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_GPT0_CLK_ENB, 0,
510 &_lock); 509 &_lock);
511 clk_register_clkdev(clk, NULL, "gpt0"); 510 clk_register_clkdev(clk, NULL, "gpt0");
512 511
513 clk = clk_register_mux(NULL, "gpt1_mux_clk", gpt_parents, 512 clk = clk_register_mux(NULL, "gpt1_mclk", gpt_parents,
514 ARRAY_SIZE(gpt_parents), 0, SPEAR1310_PERIP_CLK_CFG, 513 ARRAY_SIZE(gpt_parents), 0, SPEAR1310_PERIP_CLK_CFG,
515 SPEAR1310_GPT1_CLK_SHIFT, SPEAR1310_GPT_CLK_MASK, 0, 514 SPEAR1310_GPT1_CLK_SHIFT, SPEAR1310_GPT_CLK_MASK, 0,
516 &_lock); 515 &_lock);
517 clk_register_clkdev(clk, "gpt1_mux_clk", NULL); 516 clk_register_clkdev(clk, "gpt1_mclk", NULL);
518 clk = clk_register_gate(NULL, "gpt1_clk", "gpt1_mux_clk", 0, 517 clk = clk_register_gate(NULL, "gpt1_clk", "gpt1_mclk", 0,
519 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_GPT1_CLK_ENB, 0, 518 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_GPT1_CLK_ENB, 0,
520 &_lock); 519 &_lock);
521 clk_register_clkdev(clk, NULL, "gpt1"); 520 clk_register_clkdev(clk, NULL, "gpt1");
522 521
523 clk = clk_register_mux(NULL, "gpt2_mux_clk", gpt_parents, 522 clk = clk_register_mux(NULL, "gpt2_mclk", gpt_parents,
524 ARRAY_SIZE(gpt_parents), 0, SPEAR1310_PERIP_CLK_CFG, 523 ARRAY_SIZE(gpt_parents), 0, SPEAR1310_PERIP_CLK_CFG,
525 SPEAR1310_GPT2_CLK_SHIFT, SPEAR1310_GPT_CLK_MASK, 0, 524 SPEAR1310_GPT2_CLK_SHIFT, SPEAR1310_GPT_CLK_MASK, 0,
526 &_lock); 525 &_lock);
527 clk_register_clkdev(clk, "gpt2_mux_clk", NULL); 526 clk_register_clkdev(clk, "gpt2_mclk", NULL);
528 clk = clk_register_gate(NULL, "gpt2_clk", "gpt2_mux_clk", 0, 527 clk = clk_register_gate(NULL, "gpt2_clk", "gpt2_mclk", 0,
529 SPEAR1310_PERIP2_CLK_ENB, SPEAR1310_GPT2_CLK_ENB, 0, 528 SPEAR1310_PERIP2_CLK_ENB, SPEAR1310_GPT2_CLK_ENB, 0,
530 &_lock); 529 &_lock);
531 clk_register_clkdev(clk, NULL, "gpt2"); 530 clk_register_clkdev(clk, NULL, "gpt2");
532 531
533 clk = clk_register_mux(NULL, "gpt3_mux_clk", gpt_parents, 532 clk = clk_register_mux(NULL, "gpt3_mclk", gpt_parents,
534 ARRAY_SIZE(gpt_parents), 0, SPEAR1310_PERIP_CLK_CFG, 533 ARRAY_SIZE(gpt_parents), 0, SPEAR1310_PERIP_CLK_CFG,
535 SPEAR1310_GPT3_CLK_SHIFT, SPEAR1310_GPT_CLK_MASK, 0, 534 SPEAR1310_GPT3_CLK_SHIFT, SPEAR1310_GPT_CLK_MASK, 0,
536 &_lock); 535 &_lock);
537 clk_register_clkdev(clk, "gpt3_mux_clk", NULL); 536 clk_register_clkdev(clk, "gpt3_mclk", NULL);
538 clk = clk_register_gate(NULL, "gpt3_clk", "gpt3_mux_clk", 0, 537 clk = clk_register_gate(NULL, "gpt3_clk", "gpt3_mclk", 0,
539 SPEAR1310_PERIP2_CLK_ENB, SPEAR1310_GPT3_CLK_ENB, 0, 538 SPEAR1310_PERIP2_CLK_ENB, SPEAR1310_GPT3_CLK_ENB, 0,
540 &_lock); 539 &_lock);
541 clk_register_clkdev(clk, NULL, "gpt3"); 540 clk_register_clkdev(clk, NULL, "gpt3");
542 541
543 /* others */ 542 /* others */
544 clk = clk_register_aux("uart_synth_clk", "uart_synth_gate_clk", 543 clk = clk_register_aux("uart_syn_clk", "uart_syn_gclk", "vco1div2_clk",
545 "vco1div2_clk", 0, SPEAR1310_UART_CLK_SYNT, NULL, 544 0, SPEAR1310_UART_CLK_SYNT, NULL, aux_rtbl,
546 aux_rtbl, ARRAY_SIZE(aux_rtbl), &_lock, &clk1); 545 ARRAY_SIZE(aux_rtbl), &_lock, &clk1);
547 clk_register_clkdev(clk, "uart_synth_clk", NULL); 546 clk_register_clkdev(clk, "uart_syn_clk", NULL);
548 clk_register_clkdev(clk1, "uart_synth_gate_clk", NULL); 547 clk_register_clkdev(clk1, "uart_syn_gclk", NULL);
549 548
550 clk = clk_register_mux(NULL, "uart0_mux_clk", uart0_parents, 549 clk = clk_register_mux(NULL, "uart0_mclk", uart0_parents,
551 ARRAY_SIZE(uart0_parents), 0, SPEAR1310_PERIP_CLK_CFG, 550 ARRAY_SIZE(uart0_parents), 0, SPEAR1310_PERIP_CLK_CFG,
552 SPEAR1310_UART_CLK_SHIFT, SPEAR1310_UART_CLK_MASK, 0, 551 SPEAR1310_UART_CLK_SHIFT, SPEAR1310_UART_CLK_MASK, 0,
553 &_lock); 552 &_lock);
554 clk_register_clkdev(clk, "uart0_mux_clk", NULL); 553 clk_register_clkdev(clk, "uart0_mclk", NULL);
555 554
556 clk = clk_register_gate(NULL, "uart0_clk", "uart0_mux_clk", 0, 555 clk = clk_register_gate(NULL, "uart0_clk", "uart0_mclk", 0,
557 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_UART_CLK_ENB, 0, 556 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_UART_CLK_ENB, 0,
558 &_lock); 557 &_lock);
559 clk_register_clkdev(clk, NULL, "e0000000.serial"); 558 clk_register_clkdev(clk, NULL, "e0000000.serial");
560 559
561 clk = clk_register_aux("sdhci_synth_clk", "sdhci_synth_gate_clk", 560 clk = clk_register_aux("sdhci_syn_clk", "sdhci_syn_gclk",
562 "vco1div2_clk", 0, SPEAR1310_SDHCI_CLK_SYNT, NULL, 561 "vco1div2_clk", 0, SPEAR1310_SDHCI_CLK_SYNT, NULL,
563 aux_rtbl, ARRAY_SIZE(aux_rtbl), &_lock, &clk1); 562 aux_rtbl, ARRAY_SIZE(aux_rtbl), &_lock, &clk1);
564 clk_register_clkdev(clk, "sdhci_synth_clk", NULL); 563 clk_register_clkdev(clk, "sdhci_syn_clk", NULL);
565 clk_register_clkdev(clk1, "sdhci_synth_gate_clk", NULL); 564 clk_register_clkdev(clk1, "sdhci_syn_gclk", NULL);
566 565
567 clk = clk_register_gate(NULL, "sdhci_clk", "sdhci_synth_gate_clk", 0, 566 clk = clk_register_gate(NULL, "sdhci_clk", "sdhci_syn_gclk", 0,
568 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_SDHCI_CLK_ENB, 0, 567 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_SDHCI_CLK_ENB, 0,
569 &_lock); 568 &_lock);
570 clk_register_clkdev(clk, NULL, "b3000000.sdhci"); 569 clk_register_clkdev(clk, NULL, "b3000000.sdhci");
571 570
572 clk = clk_register_aux("cfxd_synth_clk", "cfxd_synth_gate_clk", 571 clk = clk_register_aux("cfxd_syn_clk", "cfxd_syn_gclk", "vco1div2_clk",
573 "vco1div2_clk", 0, SPEAR1310_CFXD_CLK_SYNT, NULL, 572 0, SPEAR1310_CFXD_CLK_SYNT, NULL, aux_rtbl,
574 aux_rtbl, ARRAY_SIZE(aux_rtbl), &_lock, &clk1); 573 ARRAY_SIZE(aux_rtbl), &_lock, &clk1);
575 clk_register_clkdev(clk, "cfxd_synth_clk", NULL); 574 clk_register_clkdev(clk, "cfxd_syn_clk", NULL);
576 clk_register_clkdev(clk1, "cfxd_synth_gate_clk", NULL); 575 clk_register_clkdev(clk1, "cfxd_syn_gclk", NULL);
577 576
578 clk = clk_register_gate(NULL, "cfxd_clk", "cfxd_synth_gate_clk", 0, 577 clk = clk_register_gate(NULL, "cfxd_clk", "cfxd_syn_gclk", 0,
579 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_CFXD_CLK_ENB, 0, 578 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_CFXD_CLK_ENB, 0,
580 &_lock); 579 &_lock);
581 clk_register_clkdev(clk, NULL, "b2800000.cf"); 580 clk_register_clkdev(clk, NULL, "b2800000.cf");
582 clk_register_clkdev(clk, NULL, "arasan_xd"); 581 clk_register_clkdev(clk, NULL, "arasan_xd");
583 582
584 clk = clk_register_aux("c3_synth_clk", "c3_synth_gate_clk", 583 clk = clk_register_aux("c3_syn_clk", "c3_syn_gclk", "vco1div2_clk",
585 "vco1div2_clk", 0, SPEAR1310_C3_CLK_SYNT, NULL, 584 0, SPEAR1310_C3_CLK_SYNT, NULL, aux_rtbl,
586 aux_rtbl, ARRAY_SIZE(aux_rtbl), &_lock, &clk1); 585 ARRAY_SIZE(aux_rtbl), &_lock, &clk1);
587 clk_register_clkdev(clk, "c3_synth_clk", NULL); 586 clk_register_clkdev(clk, "c3_syn_clk", NULL);
588 clk_register_clkdev(clk1, "c3_synth_gate_clk", NULL); 587 clk_register_clkdev(clk1, "c3_syn_gclk", NULL);
589 588
590 clk = clk_register_mux(NULL, "c3_mux_clk", c3_parents, 589 clk = clk_register_mux(NULL, "c3_mclk", c3_parents,
591 ARRAY_SIZE(c3_parents), 0, SPEAR1310_PERIP_CLK_CFG, 590 ARRAY_SIZE(c3_parents), 0, SPEAR1310_PERIP_CLK_CFG,
592 SPEAR1310_C3_CLK_SHIFT, SPEAR1310_C3_CLK_MASK, 0, 591 SPEAR1310_C3_CLK_SHIFT, SPEAR1310_C3_CLK_MASK, 0,
593 &_lock); 592 &_lock);
594 clk_register_clkdev(clk, "c3_mux_clk", NULL); 593 clk_register_clkdev(clk, "c3_mclk", NULL);
595 594
596 clk = clk_register_gate(NULL, "c3_clk", "c3_mux_clk", 0, 595 clk = clk_register_gate(NULL, "c3_clk", "c3_mclk", 0,
597 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_C3_CLK_ENB, 0, 596 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_C3_CLK_ENB, 0,
598 &_lock); 597 &_lock);
599 clk_register_clkdev(clk, NULL, "c3"); 598 clk_register_clkdev(clk, NULL, "c3");
600 599
601 /* gmac */ 600 /* gmac */
602 clk = clk_register_mux(NULL, "gmac_phy_input_mux_clk", 601 clk = clk_register_mux(NULL, "phy_input_mclk", gmac_phy_input_parents,
603 gmac_phy_input_parents,
604 ARRAY_SIZE(gmac_phy_input_parents), 0, 602 ARRAY_SIZE(gmac_phy_input_parents), 0,
605 SPEAR1310_GMAC_CLK_CFG, 603 SPEAR1310_GMAC_CLK_CFG,
606 SPEAR1310_GMAC_PHY_INPUT_CLK_SHIFT, 604 SPEAR1310_GMAC_PHY_INPUT_CLK_SHIFT,
607 SPEAR1310_GMAC_PHY_INPUT_CLK_MASK, 0, &_lock); 605 SPEAR1310_GMAC_PHY_INPUT_CLK_MASK, 0, &_lock);
608 clk_register_clkdev(clk, "gmac_phy_input_mux_clk", NULL); 606 clk_register_clkdev(clk, "phy_input_mclk", NULL);
609 607
610 clk = clk_register_aux("gmac_phy_synth_clk", "gmac_phy_synth_gate_clk", 608 clk = clk_register_aux("phy_syn_clk", "phy_syn_gclk", "phy_input_mclk",
611 "gmac_phy_input_mux_clk", 0, SPEAR1310_GMAC_CLK_SYNT, 609 0, SPEAR1310_GMAC_CLK_SYNT, NULL, gmac_rtbl,
612 NULL, gmac_rtbl, ARRAY_SIZE(gmac_rtbl), &_lock, &clk1); 610 ARRAY_SIZE(gmac_rtbl), &_lock, &clk1);
613 clk_register_clkdev(clk, "gmac_phy_synth_clk", NULL); 611 clk_register_clkdev(clk, "phy_syn_clk", NULL);
614 clk_register_clkdev(clk1, "gmac_phy_synth_gate_clk", NULL); 612 clk_register_clkdev(clk1, "phy_syn_gclk", NULL);
615 613
616 clk = clk_register_mux(NULL, "gmac_phy_mux_clk", gmac_phy_parents, 614 clk = clk_register_mux(NULL, "phy_mclk", gmac_phy_parents,
617 ARRAY_SIZE(gmac_phy_parents), 0, 615 ARRAY_SIZE(gmac_phy_parents), 0,
618 SPEAR1310_PERIP_CLK_CFG, SPEAR1310_GMAC_PHY_CLK_SHIFT, 616 SPEAR1310_PERIP_CLK_CFG, SPEAR1310_GMAC_PHY_CLK_SHIFT,
619 SPEAR1310_GMAC_PHY_CLK_MASK, 0, &_lock); 617 SPEAR1310_GMAC_PHY_CLK_MASK, 0, &_lock);
620 clk_register_clkdev(clk, NULL, "stmmacphy.0"); 618 clk_register_clkdev(clk, NULL, "stmmacphy.0");
621 619
622 /* clcd */ 620 /* clcd */
623 clk = clk_register_mux(NULL, "clcd_synth_mux_clk", clcd_synth_parents, 621 clk = clk_register_mux(NULL, "clcd_syn_mclk", clcd_synth_parents,
624 ARRAY_SIZE(clcd_synth_parents), 0, 622 ARRAY_SIZE(clcd_synth_parents), 0,
625 SPEAR1310_CLCD_CLK_SYNT, SPEAR1310_CLCD_SYNT_CLK_SHIFT, 623 SPEAR1310_CLCD_CLK_SYNT, SPEAR1310_CLCD_SYNT_CLK_SHIFT,
626 SPEAR1310_CLCD_SYNT_CLK_MASK, 0, &_lock); 624 SPEAR1310_CLCD_SYNT_CLK_MASK, 0, &_lock);
627 clk_register_clkdev(clk, "clcd_synth_mux_clk", NULL); 625 clk_register_clkdev(clk, "clcd_syn_mclk", NULL);
628 626
629 clk = clk_register_frac("clcd_synth_clk", "clcd_synth_mux_clk", 0, 627 clk = clk_register_frac("clcd_syn_clk", "clcd_syn_mclk", 0,
630 SPEAR1310_CLCD_CLK_SYNT, clcd_rtbl, 628 SPEAR1310_CLCD_CLK_SYNT, clcd_rtbl,
631 ARRAY_SIZE(clcd_rtbl), &_lock); 629 ARRAY_SIZE(clcd_rtbl), &_lock);
632 clk_register_clkdev(clk, "clcd_synth_clk", NULL); 630 clk_register_clkdev(clk, "clcd_syn_clk", NULL);
633 631
634 clk = clk_register_mux(NULL, "clcd_pixel_mux_clk", clcd_pixel_parents, 632 clk = clk_register_mux(NULL, "clcd_pixel_mclk", clcd_pixel_parents,
635 ARRAY_SIZE(clcd_pixel_parents), 0, 633 ARRAY_SIZE(clcd_pixel_parents), 0,
636 SPEAR1310_PERIP_CLK_CFG, SPEAR1310_CLCD_CLK_SHIFT, 634 SPEAR1310_PERIP_CLK_CFG, SPEAR1310_CLCD_CLK_SHIFT,
637 SPEAR1310_CLCD_CLK_MASK, 0, &_lock); 635 SPEAR1310_CLCD_CLK_MASK, 0, &_lock);
638 clk_register_clkdev(clk, "clcd_pixel_clk", NULL); 636 clk_register_clkdev(clk, "clcd_pixel_clk", NULL);
639 637
640 clk = clk_register_gate(NULL, "clcd_clk", "clcd_pixel_mux_clk", 0, 638 clk = clk_register_gate(NULL, "clcd_clk", "clcd_pixel_mclk", 0,
641 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_CLCD_CLK_ENB, 0, 639 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_CLCD_CLK_ENB, 0,
642 &_lock); 640 &_lock);
643 clk_register_clkdev(clk, "clcd_clk", NULL); 641 clk_register_clkdev(clk, "clcd_clk", NULL);
644 642
645 /* i2s */ 643 /* i2s */
646 clk = clk_register_mux(NULL, "i2s_src_mux_clk", i2s_src_parents, 644 clk = clk_register_mux(NULL, "i2s_src_mclk", i2s_src_parents,
647 ARRAY_SIZE(i2s_src_parents), 0, SPEAR1310_I2S_CLK_CFG, 645 ARRAY_SIZE(i2s_src_parents), 0, SPEAR1310_I2S_CLK_CFG,
648 SPEAR1310_I2S_SRC_CLK_SHIFT, SPEAR1310_I2S_SRC_CLK_MASK, 646 SPEAR1310_I2S_SRC_CLK_SHIFT, SPEAR1310_I2S_SRC_CLK_MASK,
649 0, &_lock); 647 0, &_lock);
650 clk_register_clkdev(clk, "i2s_src_clk", NULL); 648 clk_register_clkdev(clk, "i2s_src_clk", NULL);
651 649
652 clk = clk_register_aux("i2s_prs1_clk", NULL, "i2s_src_mux_clk", 0, 650 clk = clk_register_aux("i2s_prs1_clk", NULL, "i2s_src_mclk", 0,
653 SPEAR1310_I2S_CLK_CFG, &i2s_prs1_masks, i2s_prs1_rtbl, 651 SPEAR1310_I2S_CLK_CFG, &i2s_prs1_masks, i2s_prs1_rtbl,
654 ARRAY_SIZE(i2s_prs1_rtbl), &_lock, NULL); 652 ARRAY_SIZE(i2s_prs1_rtbl), &_lock, NULL);
655 clk_register_clkdev(clk, "i2s_prs1_clk", NULL); 653 clk_register_clkdev(clk, "i2s_prs1_clk", NULL);
656 654
657 clk = clk_register_mux(NULL, "i2s_ref_mux_clk", i2s_ref_parents, 655 clk = clk_register_mux(NULL, "i2s_ref_mclk", i2s_ref_parents,
658 ARRAY_SIZE(i2s_ref_parents), 0, SPEAR1310_I2S_CLK_CFG, 656 ARRAY_SIZE(i2s_ref_parents), 0, SPEAR1310_I2S_CLK_CFG,
659 SPEAR1310_I2S_REF_SHIFT, SPEAR1310_I2S_REF_SEL_MASK, 0, 657 SPEAR1310_I2S_REF_SHIFT, SPEAR1310_I2S_REF_SEL_MASK, 0,
660 &_lock); 658 &_lock);
661 clk_register_clkdev(clk, "i2s_ref_clk", NULL); 659 clk_register_clkdev(clk, "i2s_ref_clk", NULL);
662 660
663 clk = clk_register_gate(NULL, "i2s_ref_pad_clk", "i2s_ref_mux_clk", 0, 661 clk = clk_register_gate(NULL, "i2s_ref_pad_clk", "i2s_ref_mclk", 0,
664 SPEAR1310_PERIP2_CLK_ENB, SPEAR1310_I2S_REF_PAD_CLK_ENB, 662 SPEAR1310_PERIP2_CLK_ENB, SPEAR1310_I2S_REF_PAD_CLK_ENB,
665 0, &_lock); 663 0, &_lock);
666 clk_register_clkdev(clk, "i2s_ref_pad_clk", NULL); 664 clk_register_clkdev(clk, "i2s_ref_pad_clk", NULL);
667 665
668 clk = clk_register_aux("i2s_sclk_clk", "i2s_sclk_gate_clk", 666 clk = clk_register_aux("i2s_sclk_clk", "i2s_sclk_gclk",
669 "i2s_ref_pad_clk", 0, SPEAR1310_I2S_CLK_CFG, 667 "i2s_ref_pad_clk", 0, SPEAR1310_I2S_CLK_CFG,
670 &i2s_sclk_masks, i2s_sclk_rtbl, 668 &i2s_sclk_masks, i2s_sclk_rtbl,
671 ARRAY_SIZE(i2s_sclk_rtbl), &_lock, &clk1); 669 ARRAY_SIZE(i2s_sclk_rtbl), &_lock, &clk1);
672 clk_register_clkdev(clk, "i2s_sclk_clk", NULL); 670 clk_register_clkdev(clk, "i2s_sclk_clk", NULL);
673 clk_register_clkdev(clk1, "i2s_sclk_gate_clk", NULL); 671 clk_register_clkdev(clk1, "i2s_sclk_gclk", NULL);
674 672
675 /* clock derived from ahb clk */ 673 /* clock derived from ahb clk */
676 clk = clk_register_gate(NULL, "i2c0_clk", "ahb_clk", 0, 674 clk = clk_register_gate(NULL, "i2c0_clk", "ahb_clk", 0,
@@ -747,13 +745,13 @@ void __init spear1310_clk_init(void)
747 &_lock); 745 &_lock);
748 clk_register_clkdev(clk, "sysram1_clk", NULL); 746 clk_register_clkdev(clk, "sysram1_clk", NULL);
749 747
750 clk = clk_register_aux("adc_synth_clk", "adc_synth_gate_clk", "ahb_clk", 748 clk = clk_register_aux("adc_syn_clk", "adc_syn_gclk", "ahb_clk",
751 0, SPEAR1310_ADC_CLK_SYNT, NULL, adc_rtbl, 749 0, SPEAR1310_ADC_CLK_SYNT, NULL, adc_rtbl,
752 ARRAY_SIZE(adc_rtbl), &_lock, &clk1); 750 ARRAY_SIZE(adc_rtbl), &_lock, &clk1);
753 clk_register_clkdev(clk, "adc_synth_clk", NULL); 751 clk_register_clkdev(clk, "adc_syn_clk", NULL);
754 clk_register_clkdev(clk1, "adc_synth_gate_clk", NULL); 752 clk_register_clkdev(clk1, "adc_syn_gclk", NULL);
755 753
756 clk = clk_register_gate(NULL, "adc_clk", "adc_synth_gate_clk", 0, 754 clk = clk_register_gate(NULL, "adc_clk", "adc_syn_gclk", 0,
757 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_ADC_CLK_ENB, 0, 755 SPEAR1310_PERIP1_CLK_ENB, SPEAR1310_ADC_CLK_ENB, 0,
758 &_lock); 756 &_lock);
759 clk_register_clkdev(clk, NULL, "adc_clk"); 757 clk_register_clkdev(clk, NULL, "adc_clk");
@@ -790,37 +788,37 @@ void __init spear1310_clk_init(void)
790 clk_register_clkdev(clk, NULL, "e0300000.kbd"); 788 clk_register_clkdev(clk, NULL, "e0300000.kbd");
791 789
792 /* RAS clks */ 790 /* RAS clks */
793 clk = clk_register_mux(NULL, "gen_synth0_1_mux_clk", 791 clk = clk_register_mux(NULL, "gen_syn0_1_mclk", gen_synth0_1_parents,
794 gen_synth0_1_parents, ARRAY_SIZE(gen_synth0_1_parents), 792 ARRAY_SIZE(gen_synth0_1_parents), 0, SPEAR1310_PLL_CFG,
795 0, SPEAR1310_PLL_CFG, SPEAR1310_RAS_SYNT0_1_CLK_SHIFT, 793 SPEAR1310_RAS_SYNT0_1_CLK_SHIFT,
796 SPEAR1310_RAS_SYNT_CLK_MASK, 0, &_lock); 794 SPEAR1310_RAS_SYNT_CLK_MASK, 0, &_lock);
797 clk_register_clkdev(clk, "gen_synth0_1_clk", NULL); 795 clk_register_clkdev(clk, "gen_syn0_1_clk", NULL);
798 796
799 clk = clk_register_mux(NULL, "gen_synth2_3_mux_clk", 797 clk = clk_register_mux(NULL, "gen_syn2_3_mclk", gen_synth2_3_parents,
800 gen_synth2_3_parents, ARRAY_SIZE(gen_synth2_3_parents), 798 ARRAY_SIZE(gen_synth2_3_parents), 0, SPEAR1310_PLL_CFG,
801 0, SPEAR1310_PLL_CFG, SPEAR1310_RAS_SYNT2_3_CLK_SHIFT, 799 SPEAR1310_RAS_SYNT2_3_CLK_SHIFT,
802 SPEAR1310_RAS_SYNT_CLK_MASK, 0, &_lock); 800 SPEAR1310_RAS_SYNT_CLK_MASK, 0, &_lock);
803 clk_register_clkdev(clk, "gen_synth2_3_clk", NULL); 801 clk_register_clkdev(clk, "gen_syn2_3_clk", NULL);
804 802
805 clk = clk_register_frac("gen_synth0_clk", "gen_synth0_1_clk", 0, 803 clk = clk_register_frac("gen_syn0_clk", "gen_syn0_1_clk", 0,
806 SPEAR1310_RAS_CLK_SYNT0, gen_rtbl, ARRAY_SIZE(gen_rtbl), 804 SPEAR1310_RAS_CLK_SYNT0, gen_rtbl, ARRAY_SIZE(gen_rtbl),
807 &_lock); 805 &_lock);
808 clk_register_clkdev(clk, "gen_synth0_clk", NULL); 806 clk_register_clkdev(clk, "gen_syn0_clk", NULL);
809 807
810 clk = clk_register_frac("gen_synth1_clk", "gen_synth0_1_clk", 0, 808 clk = clk_register_frac("gen_syn1_clk", "gen_syn0_1_clk", 0,
811 SPEAR1310_RAS_CLK_SYNT1, gen_rtbl, ARRAY_SIZE(gen_rtbl), 809 SPEAR1310_RAS_CLK_SYNT1, gen_rtbl, ARRAY_SIZE(gen_rtbl),
812 &_lock); 810 &_lock);
813 clk_register_clkdev(clk, "gen_synth1_clk", NULL); 811 clk_register_clkdev(clk, "gen_syn1_clk", NULL);
814 812
815 clk = clk_register_frac("gen_synth2_clk", "gen_synth2_3_clk", 0, 813 clk = clk_register_frac("gen_syn2_clk", "gen_syn2_3_clk", 0,
816 SPEAR1310_RAS_CLK_SYNT2, gen_rtbl, ARRAY_SIZE(gen_rtbl), 814 SPEAR1310_RAS_CLK_SYNT2, gen_rtbl, ARRAY_SIZE(gen_rtbl),
817 &_lock); 815 &_lock);
818 clk_register_clkdev(clk, "gen_synth2_clk", NULL); 816 clk_register_clkdev(clk, "gen_syn2_clk", NULL);
819 817
820 clk = clk_register_frac("gen_synth3_clk", "gen_synth2_3_clk", 0, 818 clk = clk_register_frac("gen_syn3_clk", "gen_syn2_3_clk", 0,
821 SPEAR1310_RAS_CLK_SYNT3, gen_rtbl, ARRAY_SIZE(gen_rtbl), 819 SPEAR1310_RAS_CLK_SYNT3, gen_rtbl, ARRAY_SIZE(gen_rtbl),
822 &_lock); 820 &_lock);
823 clk_register_clkdev(clk, "gen_synth3_clk", NULL); 821 clk_register_clkdev(clk, "gen_syn3_clk", NULL);
824 822
825 clk = clk_register_gate(NULL, "ras_osc_24m_clk", "osc_24m_clk", 0, 823 clk = clk_register_gate(NULL, "ras_osc_24m_clk", "osc_24m_clk", 0,
826 SPEAR1310_RAS_CLK_ENB, SPEAR1310_OSC_24M_CLK_ENB, 0, 824 SPEAR1310_RAS_CLK_ENB, SPEAR1310_OSC_24M_CLK_ENB, 0,
@@ -847,7 +845,7 @@ void __init spear1310_clk_init(void)
847 &_lock); 845 &_lock);
848 clk_register_clkdev(clk, "ras_pll3_clk", NULL); 846 clk_register_clkdev(clk, "ras_pll3_clk", NULL);
849 847
850 clk = clk_register_gate(NULL, "ras_tx125_clk", "gmii_125m_pad_clk", 0, 848 clk = clk_register_gate(NULL, "ras_tx125_clk", "gmii_pad_clk", 0,
851 SPEAR1310_RAS_CLK_ENB, SPEAR1310_C125M_PAD_CLK_ENB, 0, 849 SPEAR1310_RAS_CLK_ENB, SPEAR1310_C125M_PAD_CLK_ENB, 0,
852 &_lock); 850 &_lock);
853 clk_register_clkdev(clk, "ras_tx125_clk", NULL); 851 clk_register_clkdev(clk, "ras_tx125_clk", NULL);
@@ -912,7 +910,7 @@ void __init spear1310_clk_init(void)
912 &_lock); 910 &_lock);
913 clk_register_clkdev(clk, NULL, "5c700000.eth"); 911 clk_register_clkdev(clk, NULL, "5c700000.eth");
914 912
915 clk = clk_register_mux(NULL, "smii_rgmii_phy_mux_clk", 913 clk = clk_register_mux(NULL, "smii_rgmii_phy_mclk",
916 smii_rgmii_phy_parents, 914 smii_rgmii_phy_parents,
917 ARRAY_SIZE(smii_rgmii_phy_parents), 0, 915 ARRAY_SIZE(smii_rgmii_phy_parents), 0,
918 SPEAR1310_RAS_CTRL_REG1, 916 SPEAR1310_RAS_CTRL_REG1,
@@ -922,184 +920,184 @@ void __init spear1310_clk_init(void)
922 clk_register_clkdev(clk, NULL, "stmmacphy.2"); 920 clk_register_clkdev(clk, NULL, "stmmacphy.2");
923 clk_register_clkdev(clk, NULL, "stmmacphy.4"); 921 clk_register_clkdev(clk, NULL, "stmmacphy.4");
924 922
925 clk = clk_register_mux(NULL, "rmii_phy_mux_clk", rmii_phy_parents, 923 clk = clk_register_mux(NULL, "rmii_phy_mclk", rmii_phy_parents,
926 ARRAY_SIZE(rmii_phy_parents), 0, 924 ARRAY_SIZE(rmii_phy_parents), 0,
927 SPEAR1310_RAS_CTRL_REG1, SPEAR1310_RMII_PHY_CLK_SHIFT, 925 SPEAR1310_RAS_CTRL_REG1, SPEAR1310_RMII_PHY_CLK_SHIFT,
928 SPEAR1310_PHY_CLK_MASK, 0, &_lock); 926 SPEAR1310_PHY_CLK_MASK, 0, &_lock);
929 clk_register_clkdev(clk, NULL, "stmmacphy.3"); 927 clk_register_clkdev(clk, NULL, "stmmacphy.3");
930 928
931 clk = clk_register_mux(NULL, "uart1_mux_clk", uart_parents, 929 clk = clk_register_mux(NULL, "uart1_mclk", uart_parents,
932 ARRAY_SIZE(uart_parents), 0, SPEAR1310_RAS_CTRL_REG0, 930 ARRAY_SIZE(uart_parents), 0, SPEAR1310_RAS_CTRL_REG0,
933 SPEAR1310_UART1_CLK_SHIFT, SPEAR1310_RAS_UART_CLK_MASK, 931 SPEAR1310_UART1_CLK_SHIFT, SPEAR1310_RAS_UART_CLK_MASK,
934 0, &_lock); 932 0, &_lock);
935 clk_register_clkdev(clk, "uart1_mux_clk", NULL); 933 clk_register_clkdev(clk, "uart1_mclk", NULL);
936 934
937 clk = clk_register_gate(NULL, "uart1_clk", "uart1_mux_clk", 0, 935 clk = clk_register_gate(NULL, "uart1_clk", "uart1_mclk", 0,
938 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_UART1_CLK_ENB, 0, 936 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_UART1_CLK_ENB, 0,
939 &_lock); 937 &_lock);
940 clk_register_clkdev(clk, NULL, "5c800000.serial"); 938 clk_register_clkdev(clk, NULL, "5c800000.serial");
941 939
942 clk = clk_register_mux(NULL, "uart2_mux_clk", uart_parents, 940 clk = clk_register_mux(NULL, "uart2_mclk", uart_parents,
943 ARRAY_SIZE(uart_parents), 0, SPEAR1310_RAS_CTRL_REG0, 941 ARRAY_SIZE(uart_parents), 0, SPEAR1310_RAS_CTRL_REG0,
944 SPEAR1310_UART2_CLK_SHIFT, SPEAR1310_RAS_UART_CLK_MASK, 942 SPEAR1310_UART2_CLK_SHIFT, SPEAR1310_RAS_UART_CLK_MASK,
945 0, &_lock); 943 0, &_lock);
946 clk_register_clkdev(clk, "uart2_mux_clk", NULL); 944 clk_register_clkdev(clk, "uart2_mclk", NULL);
947 945
948 clk = clk_register_gate(NULL, "uart2_clk", "uart2_mux_clk", 0, 946 clk = clk_register_gate(NULL, "uart2_clk", "uart2_mclk", 0,
949 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_UART2_CLK_ENB, 0, 947 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_UART2_CLK_ENB, 0,
950 &_lock); 948 &_lock);
951 clk_register_clkdev(clk, NULL, "5c900000.serial"); 949 clk_register_clkdev(clk, NULL, "5c900000.serial");
952 950
953 clk = clk_register_mux(NULL, "uart3_mux_clk", uart_parents, 951 clk = clk_register_mux(NULL, "uart3_mclk", uart_parents,
954 ARRAY_SIZE(uart_parents), 0, SPEAR1310_RAS_CTRL_REG0, 952 ARRAY_SIZE(uart_parents), 0, SPEAR1310_RAS_CTRL_REG0,
955 SPEAR1310_UART3_CLK_SHIFT, SPEAR1310_RAS_UART_CLK_MASK, 953 SPEAR1310_UART3_CLK_SHIFT, SPEAR1310_RAS_UART_CLK_MASK,
956 0, &_lock); 954 0, &_lock);
957 clk_register_clkdev(clk, "uart3_mux_clk", NULL); 955 clk_register_clkdev(clk, "uart3_mclk", NULL);
958 956
959 clk = clk_register_gate(NULL, "uart3_clk", "uart3_mux_clk", 0, 957 clk = clk_register_gate(NULL, "uart3_clk", "uart3_mclk", 0,
960 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_UART3_CLK_ENB, 0, 958 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_UART3_CLK_ENB, 0,
961 &_lock); 959 &_lock);
962 clk_register_clkdev(clk, NULL, "5ca00000.serial"); 960 clk_register_clkdev(clk, NULL, "5ca00000.serial");
963 961
964 clk = clk_register_mux(NULL, "uart4_mux_clk", uart_parents, 962 clk = clk_register_mux(NULL, "uart4_mclk", uart_parents,
965 ARRAY_SIZE(uart_parents), 0, SPEAR1310_RAS_CTRL_REG0, 963 ARRAY_SIZE(uart_parents), 0, SPEAR1310_RAS_CTRL_REG0,
966 SPEAR1310_UART4_CLK_SHIFT, SPEAR1310_RAS_UART_CLK_MASK, 964 SPEAR1310_UART4_CLK_SHIFT, SPEAR1310_RAS_UART_CLK_MASK,
967 0, &_lock); 965 0, &_lock);
968 clk_register_clkdev(clk, "uart4_mux_clk", NULL); 966 clk_register_clkdev(clk, "uart4_mclk", NULL);
969 967
970 clk = clk_register_gate(NULL, "uart4_clk", "uart4_mux_clk", 0, 968 clk = clk_register_gate(NULL, "uart4_clk", "uart4_mclk", 0,
971 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_UART4_CLK_ENB, 0, 969 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_UART4_CLK_ENB, 0,
972 &_lock); 970 &_lock);
973 clk_register_clkdev(clk, NULL, "5cb00000.serial"); 971 clk_register_clkdev(clk, NULL, "5cb00000.serial");
974 972
975 clk = clk_register_mux(NULL, "uart5_mux_clk", uart_parents, 973 clk = clk_register_mux(NULL, "uart5_mclk", uart_parents,
976 ARRAY_SIZE(uart_parents), 0, SPEAR1310_RAS_CTRL_REG0, 974 ARRAY_SIZE(uart_parents), 0, SPEAR1310_RAS_CTRL_REG0,
977 SPEAR1310_UART5_CLK_SHIFT, SPEAR1310_RAS_UART_CLK_MASK, 975 SPEAR1310_UART5_CLK_SHIFT, SPEAR1310_RAS_UART_CLK_MASK,
978 0, &_lock); 976 0, &_lock);
979 clk_register_clkdev(clk, "uart5_mux_clk", NULL); 977 clk_register_clkdev(clk, "uart5_mclk", NULL);
980 978
981 clk = clk_register_gate(NULL, "uart5_clk", "uart5_mux_clk", 0, 979 clk = clk_register_gate(NULL, "uart5_clk", "uart5_mclk", 0,
982 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_UART5_CLK_ENB, 0, 980 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_UART5_CLK_ENB, 0,
983 &_lock); 981 &_lock);
984 clk_register_clkdev(clk, NULL, "5cc00000.serial"); 982 clk_register_clkdev(clk, NULL, "5cc00000.serial");
985 983
986 clk = clk_register_mux(NULL, "i2c1_mux_clk", i2c_parents, 984 clk = clk_register_mux(NULL, "i2c1_mclk", i2c_parents,
987 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0, 985 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0,
988 SPEAR1310_I2C1_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0, 986 SPEAR1310_I2C1_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0,
989 &_lock); 987 &_lock);
990 clk_register_clkdev(clk, "i2c1_mux_clk", NULL); 988 clk_register_clkdev(clk, "i2c1_mclk", NULL);
991 989
992 clk = clk_register_gate(NULL, "i2c1_clk", "i2c1_mux_clk", 0, 990 clk = clk_register_gate(NULL, "i2c1_clk", "i2c1_mclk", 0,
993 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C1_CLK_ENB, 0, 991 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C1_CLK_ENB, 0,
994 &_lock); 992 &_lock);
995 clk_register_clkdev(clk, NULL, "5cd00000.i2c"); 993 clk_register_clkdev(clk, NULL, "5cd00000.i2c");
996 994
997 clk = clk_register_mux(NULL, "i2c2_mux_clk", i2c_parents, 995 clk = clk_register_mux(NULL, "i2c2_mclk", i2c_parents,
998 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0, 996 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0,
999 SPEAR1310_I2C2_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0, 997 SPEAR1310_I2C2_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0,
1000 &_lock); 998 &_lock);
1001 clk_register_clkdev(clk, "i2c2_mux_clk", NULL); 999 clk_register_clkdev(clk, "i2c2_mclk", NULL);
1002 1000
1003 clk = clk_register_gate(NULL, "i2c2_clk", "i2c2_mux_clk", 0, 1001 clk = clk_register_gate(NULL, "i2c2_clk", "i2c2_mclk", 0,
1004 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C2_CLK_ENB, 0, 1002 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C2_CLK_ENB, 0,
1005 &_lock); 1003 &_lock);
1006 clk_register_clkdev(clk, NULL, "5ce00000.i2c"); 1004 clk_register_clkdev(clk, NULL, "5ce00000.i2c");
1007 1005
1008 clk = clk_register_mux(NULL, "i2c3_mux_clk", i2c_parents, 1006 clk = clk_register_mux(NULL, "i2c3_mclk", i2c_parents,
1009 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0, 1007 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0,
1010 SPEAR1310_I2C3_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0, 1008 SPEAR1310_I2C3_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0,
1011 &_lock); 1009 &_lock);
1012 clk_register_clkdev(clk, "i2c3_mux_clk", NULL); 1010 clk_register_clkdev(clk, "i2c3_mclk", NULL);
1013 1011
1014 clk = clk_register_gate(NULL, "i2c3_clk", "i2c3_mux_clk", 0, 1012 clk = clk_register_gate(NULL, "i2c3_clk", "i2c3_mclk", 0,
1015 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C3_CLK_ENB, 0, 1013 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C3_CLK_ENB, 0,
1016 &_lock); 1014 &_lock);
1017 clk_register_clkdev(clk, NULL, "5cf00000.i2c"); 1015 clk_register_clkdev(clk, NULL, "5cf00000.i2c");
1018 1016
1019 clk = clk_register_mux(NULL, "i2c4_mux_clk", i2c_parents, 1017 clk = clk_register_mux(NULL, "i2c4_mclk", i2c_parents,
1020 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0, 1018 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0,
1021 SPEAR1310_I2C4_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0, 1019 SPEAR1310_I2C4_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0,
1022 &_lock); 1020 &_lock);
1023 clk_register_clkdev(clk, "i2c4_mux_clk", NULL); 1021 clk_register_clkdev(clk, "i2c4_mclk", NULL);
1024 1022
1025 clk = clk_register_gate(NULL, "i2c4_clk", "i2c4_mux_clk", 0, 1023 clk = clk_register_gate(NULL, "i2c4_clk", "i2c4_mclk", 0,
1026 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C4_CLK_ENB, 0, 1024 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C4_CLK_ENB, 0,
1027 &_lock); 1025 &_lock);
1028 clk_register_clkdev(clk, NULL, "5d000000.i2c"); 1026 clk_register_clkdev(clk, NULL, "5d000000.i2c");
1029 1027
1030 clk = clk_register_mux(NULL, "i2c5_mux_clk", i2c_parents, 1028 clk = clk_register_mux(NULL, "i2c5_mclk", i2c_parents,
1031 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0, 1029 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0,
1032 SPEAR1310_I2C5_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0, 1030 SPEAR1310_I2C5_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0,
1033 &_lock); 1031 &_lock);
1034 clk_register_clkdev(clk, "i2c5_mux_clk", NULL); 1032 clk_register_clkdev(clk, "i2c5_mclk", NULL);
1035 1033
1036 clk = clk_register_gate(NULL, "i2c5_clk", "i2c5_mux_clk", 0, 1034 clk = clk_register_gate(NULL, "i2c5_clk", "i2c5_mclk", 0,
1037 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C5_CLK_ENB, 0, 1035 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C5_CLK_ENB, 0,
1038 &_lock); 1036 &_lock);
1039 clk_register_clkdev(clk, NULL, "5d100000.i2c"); 1037 clk_register_clkdev(clk, NULL, "5d100000.i2c");
1040 1038
1041 clk = clk_register_mux(NULL, "i2c6_mux_clk", i2c_parents, 1039 clk = clk_register_mux(NULL, "i2c6_mclk", i2c_parents,
1042 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0, 1040 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0,
1043 SPEAR1310_I2C6_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0, 1041 SPEAR1310_I2C6_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0,
1044 &_lock); 1042 &_lock);
1045 clk_register_clkdev(clk, "i2c6_mux_clk", NULL); 1043 clk_register_clkdev(clk, "i2c6_mclk", NULL);
1046 1044
1047 clk = clk_register_gate(NULL, "i2c6_clk", "i2c6_mux_clk", 0, 1045 clk = clk_register_gate(NULL, "i2c6_clk", "i2c6_mclk", 0,
1048 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C6_CLK_ENB, 0, 1046 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C6_CLK_ENB, 0,
1049 &_lock); 1047 &_lock);
1050 clk_register_clkdev(clk, NULL, "5d200000.i2c"); 1048 clk_register_clkdev(clk, NULL, "5d200000.i2c");
1051 1049
1052 clk = clk_register_mux(NULL, "i2c7_mux_clk", i2c_parents, 1050 clk = clk_register_mux(NULL, "i2c7_mclk", i2c_parents,
1053 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0, 1051 ARRAY_SIZE(i2c_parents), 0, SPEAR1310_RAS_CTRL_REG0,
1054 SPEAR1310_I2C7_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0, 1052 SPEAR1310_I2C7_CLK_SHIFT, SPEAR1310_I2C_CLK_MASK, 0,
1055 &_lock); 1053 &_lock);
1056 clk_register_clkdev(clk, "i2c7_mux_clk", NULL); 1054 clk_register_clkdev(clk, "i2c7_mclk", NULL);
1057 1055
1058 clk = clk_register_gate(NULL, "i2c7_clk", "i2c7_mux_clk", 0, 1056 clk = clk_register_gate(NULL, "i2c7_clk", "i2c7_mclk", 0,
1059 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C7_CLK_ENB, 0, 1057 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_I2C7_CLK_ENB, 0,
1060 &_lock); 1058 &_lock);
1061 clk_register_clkdev(clk, NULL, "5d300000.i2c"); 1059 clk_register_clkdev(clk, NULL, "5d300000.i2c");
1062 1060
1063 clk = clk_register_mux(NULL, "ssp1_mux_clk", ssp1_parents, 1061 clk = clk_register_mux(NULL, "ssp1_mclk", ssp1_parents,
1064 ARRAY_SIZE(ssp1_parents), 0, SPEAR1310_RAS_CTRL_REG0, 1062 ARRAY_SIZE(ssp1_parents), 0, SPEAR1310_RAS_CTRL_REG0,
1065 SPEAR1310_SSP1_CLK_SHIFT, SPEAR1310_SSP1_CLK_MASK, 0, 1063 SPEAR1310_SSP1_CLK_SHIFT, SPEAR1310_SSP1_CLK_MASK, 0,
1066 &_lock); 1064 &_lock);
1067 clk_register_clkdev(clk, "ssp1_mux_clk", NULL); 1065 clk_register_clkdev(clk, "ssp1_mclk", NULL);
1068 1066
1069 clk = clk_register_gate(NULL, "ssp1_clk", "ssp1_mux_clk", 0, 1067 clk = clk_register_gate(NULL, "ssp1_clk", "ssp1_mclk", 0,
1070 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_SSP1_CLK_ENB, 0, 1068 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_SSP1_CLK_ENB, 0,
1071 &_lock); 1069 &_lock);
1072 clk_register_clkdev(clk, NULL, "5d400000.spi"); 1070 clk_register_clkdev(clk, NULL, "5d400000.spi");
1073 1071
1074 clk = clk_register_mux(NULL, "pci_mux_clk", pci_parents, 1072 clk = clk_register_mux(NULL, "pci_mclk", pci_parents,
1075 ARRAY_SIZE(pci_parents), 0, SPEAR1310_RAS_CTRL_REG0, 1073 ARRAY_SIZE(pci_parents), 0, SPEAR1310_RAS_CTRL_REG0,
1076 SPEAR1310_PCI_CLK_SHIFT, SPEAR1310_PCI_CLK_MASK, 0, 1074 SPEAR1310_PCI_CLK_SHIFT, SPEAR1310_PCI_CLK_MASK, 0,
1077 &_lock); 1075 &_lock);
1078 clk_register_clkdev(clk, "pci_mux_clk", NULL); 1076 clk_register_clkdev(clk, "pci_mclk", NULL);
1079 1077
1080 clk = clk_register_gate(NULL, "pci_clk", "pci_mux_clk", 0, 1078 clk = clk_register_gate(NULL, "pci_clk", "pci_mclk", 0,
1081 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_PCI_CLK_ENB, 0, 1079 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_PCI_CLK_ENB, 0,
1082 &_lock); 1080 &_lock);
1083 clk_register_clkdev(clk, NULL, "pci"); 1081 clk_register_clkdev(clk, NULL, "pci");
1084 1082
1085 clk = clk_register_mux(NULL, "tdm1_mux_clk", tdm_parents, 1083 clk = clk_register_mux(NULL, "tdm1_mclk", tdm_parents,
1086 ARRAY_SIZE(tdm_parents), 0, SPEAR1310_RAS_CTRL_REG0, 1084 ARRAY_SIZE(tdm_parents), 0, SPEAR1310_RAS_CTRL_REG0,
1087 SPEAR1310_TDM1_CLK_SHIFT, SPEAR1310_TDM_CLK_MASK, 0, 1085 SPEAR1310_TDM1_CLK_SHIFT, SPEAR1310_TDM_CLK_MASK, 0,
1088 &_lock); 1086 &_lock);
1089 clk_register_clkdev(clk, "tdm1_mux_clk", NULL); 1087 clk_register_clkdev(clk, "tdm1_mclk", NULL);
1090 1088
1091 clk = clk_register_gate(NULL, "tdm1_clk", "tdm1_mux_clk", 0, 1089 clk = clk_register_gate(NULL, "tdm1_clk", "tdm1_mclk", 0,
1092 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_TDM1_CLK_ENB, 0, 1090 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_TDM1_CLK_ENB, 0,
1093 &_lock); 1091 &_lock);
1094 clk_register_clkdev(clk, NULL, "tdm_hdlc.0"); 1092 clk_register_clkdev(clk, NULL, "tdm_hdlc.0");
1095 1093
1096 clk = clk_register_mux(NULL, "tdm2_mux_clk", tdm_parents, 1094 clk = clk_register_mux(NULL, "tdm2_mclk", tdm_parents,
1097 ARRAY_SIZE(tdm_parents), 0, SPEAR1310_RAS_CTRL_REG0, 1095 ARRAY_SIZE(tdm_parents), 0, SPEAR1310_RAS_CTRL_REG0,
1098 SPEAR1310_TDM2_CLK_SHIFT, SPEAR1310_TDM_CLK_MASK, 0, 1096 SPEAR1310_TDM2_CLK_SHIFT, SPEAR1310_TDM_CLK_MASK, 0,
1099 &_lock); 1097 &_lock);
1100 clk_register_clkdev(clk, "tdm2_mux_clk", NULL); 1098 clk_register_clkdev(clk, "tdm2_mclk", NULL);
1101 1099
1102 clk = clk_register_gate(NULL, "tdm2_clk", "tdm2_mux_clk", 0, 1100 clk = clk_register_gate(NULL, "tdm2_clk", "tdm2_mclk", 0,
1103 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_TDM2_CLK_ENB, 0, 1101 SPEAR1310_RAS_SW_CLK_CTRL, SPEAR1310_TDM2_CLK_ENB, 0,
1104 &_lock); 1102 &_lock);
1105 clk_register_clkdev(clk, NULL, "tdm_hdlc.1"); 1103 clk_register_clkdev(clk, NULL, "tdm_hdlc.1");