aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-11-01 05:38:04 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-11-18 07:32:27 -0500
commit64ad846ffd9fe2d29ac9d2f68a4866f67ad9e3f1 (patch)
tree85227d85e753741e7724f03b9abae828deca6fc2 /drivers/video
parent9c15d76200dbd9c0ae5b1c6bfa17cbfdfaa2e2ae (diff)
OMAPDSS: rename parent clk variables
Rename the variables related to DSS fclk's parent: "clk_name" and "dpll4_m4_ck", to "parent_clk_name" and "parent_clk", which much better tell what they mean. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/dss.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 3dea532daf4c..d510ba333e7d 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -67,7 +67,7 @@ static void dss_runtime_put(void);
67struct dss_features { 67struct dss_features {
68 u8 fck_div_max; 68 u8 fck_div_max;
69 u8 dss_fck_multiplier; 69 u8 dss_fck_multiplier;
70 const char *clk_name; 70 const char *parent_clk_name;
71 int (*dpi_select_source)(enum omap_channel channel); 71 int (*dpi_select_source)(enum omap_channel channel);
72}; 72};
73 73
@@ -75,7 +75,7 @@ static struct {
75 struct platform_device *pdev; 75 struct platform_device *pdev;
76 void __iomem *base; 76 void __iomem *base;
77 77
78 struct clk *dpll4_m4_ck; 78 struct clk *parent_clk;
79 struct clk *dss_clk; 79 struct clk *dss_clk;
80 unsigned long dss_clk_rate; 80 unsigned long dss_clk_rate;
81 81
@@ -445,7 +445,7 @@ bool dss_div_calc(unsigned long fck_min, dss_div_calc_func func, void *data)
445 unsigned long prate; 445 unsigned long prate;
446 unsigned m; 446 unsigned m;
447 447
448 if (dss.dpll4_m4_ck == NULL) { 448 if (dss.parent_clk == NULL) {
449 fck = clk_get_rate(dss.dss_clk); 449 fck = clk_get_rate(dss.dss_clk);
450 return func(fck, data); 450 return func(fck, data);
451 } 451 }
@@ -475,15 +475,15 @@ int dss_set_fck_rate(unsigned long rate)
475{ 475{
476 DSSDBG("set fck to %lu\n", rate); 476 DSSDBG("set fck to %lu\n", rate);
477 477
478 if (dss.dpll4_m4_ck) { 478 if (dss.parent_clk) {
479 unsigned long prate; 479 unsigned long prate;
480 unsigned m; 480 unsigned m;
481 int r; 481 int r;
482 482
483 prate = clk_get_rate(clk_get_parent(dss.dpll4_m4_ck)); 483 prate = clk_get_rate(clk_get_parent(dss.parent_clk));
484 m = dss.feat->dss_fck_multiplier; 484 m = dss.feat->dss_fck_multiplier;
485 485
486 r = clk_set_rate(dss.dpll4_m4_ck, rate * m); 486 r = clk_set_rate(dss.parent_clk, rate * m);
487 if (r) 487 if (r)
488 return r; 488 return r;
489 } 489 }
@@ -499,8 +499,8 @@ int dss_set_fck_rate(unsigned long rate)
499 499
500unsigned long dss_get_dpll4_rate(void) 500unsigned long dss_get_dpll4_rate(void)
501{ 501{
502 if (dss.dpll4_m4_ck) 502 if (dss.parent_clk)
503 return clk_get_rate(clk_get_parent(dss.dpll4_m4_ck)); 503 return clk_get_rate(clk_get_parent(dss.parent_clk));
504 else 504 else
505 return 0; 505 return 0;
506} 506}
@@ -517,7 +517,7 @@ static int dss_setup_default_clock(void)
517 unsigned fck_div; 517 unsigned fck_div;
518 int r; 518 int r;
519 519
520 if (dss.dpll4_m4_ck == NULL) 520 if (dss.parent_clk == NULL)
521 return 0; 521 return 0;
522 522
523 max_dss_fck = dss_feat_get_param_max(FEAT_PARAM_DSS_FCK); 523 max_dss_fck = dss_feat_get_param_max(FEAT_PARAM_DSS_FCK);
@@ -654,25 +654,25 @@ static int dss_get_clocks(void)
654 654
655 dss.dss_clk = clk; 655 dss.dss_clk = clk;
656 656
657 if (dss.feat->clk_name) { 657 if (dss.feat->parent_clk_name) {
658 clk = clk_get(NULL, dss.feat->clk_name); 658 clk = clk_get(NULL, dss.feat->parent_clk_name);
659 if (IS_ERR(clk)) { 659 if (IS_ERR(clk)) {
660 DSSERR("Failed to get %s\n", dss.feat->clk_name); 660 DSSERR("Failed to get %s\n", dss.feat->parent_clk_name);
661 return PTR_ERR(clk); 661 return PTR_ERR(clk);
662 } 662 }
663 } else { 663 } else {
664 clk = NULL; 664 clk = NULL;
665 } 665 }
666 666
667 dss.dpll4_m4_ck = clk; 667 dss.parent_clk = clk;
668 668
669 return 0; 669 return 0;
670} 670}
671 671
672static void dss_put_clocks(void) 672static void dss_put_clocks(void)
673{ 673{
674 if (dss.dpll4_m4_ck) 674 if (dss.parent_clk)
675 clk_put(dss.dpll4_m4_ck); 675 clk_put(dss.parent_clk);
676} 676}
677 677
678static int dss_runtime_get(void) 678static int dss_runtime_get(void)
@@ -715,35 +715,35 @@ static const struct dss_features omap24xx_dss_feats __initconst = {
715 */ 715 */
716 .fck_div_max = 6, 716 .fck_div_max = 6,
717 .dss_fck_multiplier = 2, 717 .dss_fck_multiplier = 2,
718 .clk_name = "dss1_fck", 718 .parent_clk_name = "dss1_fck",
719 .dpi_select_source = &dss_dpi_select_source_omap2_omap3, 719 .dpi_select_source = &dss_dpi_select_source_omap2_omap3,
720}; 720};
721 721
722static const struct dss_features omap34xx_dss_feats __initconst = { 722static const struct dss_features omap34xx_dss_feats __initconst = {
723 .fck_div_max = 16, 723 .fck_div_max = 16,
724 .dss_fck_multiplier = 2, 724 .dss_fck_multiplier = 2,
725 .clk_name = "dpll4_m4_ck", 725 .parent_clk_name = "dpll4_m4_ck",
726 .dpi_select_source = &dss_dpi_select_source_omap2_omap3, 726 .dpi_select_source = &dss_dpi_select_source_omap2_omap3,
727}; 727};
728 728
729static const struct dss_features omap3630_dss_feats __initconst = { 729static const struct dss_features omap3630_dss_feats __initconst = {
730 .fck_div_max = 32, 730 .fck_div_max = 32,
731 .dss_fck_multiplier = 1, 731 .dss_fck_multiplier = 1,
732 .clk_name = "dpll4_m4_ck", 732 .parent_clk_name = "dpll4_m4_ck",
733 .dpi_select_source = &dss_dpi_select_source_omap2_omap3, 733 .dpi_select_source = &dss_dpi_select_source_omap2_omap3,
734}; 734};
735 735
736static const struct dss_features omap44xx_dss_feats __initconst = { 736static const struct dss_features omap44xx_dss_feats __initconst = {
737 .fck_div_max = 32, 737 .fck_div_max = 32,
738 .dss_fck_multiplier = 1, 738 .dss_fck_multiplier = 1,
739 .clk_name = "dpll_per_m5x2_ck", 739 .parent_clk_name = "dpll_per_m5x2_ck",
740 .dpi_select_source = &dss_dpi_select_source_omap4, 740 .dpi_select_source = &dss_dpi_select_source_omap4,
741}; 741};
742 742
743static const struct dss_features omap54xx_dss_feats __initconst = { 743static const struct dss_features omap54xx_dss_feats __initconst = {
744 .fck_div_max = 64, 744 .fck_div_max = 64,
745 .dss_fck_multiplier = 1, 745 .dss_fck_multiplier = 1,
746 .clk_name = "dpll_per_h12x2_ck", 746 .parent_clk_name = "dpll_per_h12x2_ck",
747 .dpi_select_source = &dss_dpi_select_source_omap5, 747 .dpi_select_source = &dss_dpi_select_source_omap5,
748}; 748};
749 749