aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-08-06 09:16:32 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-11-12 06:40:21 -0500
commit3640d9fa7afa02940873d7d4c6c22915320d2a77 (patch)
tree1d39513d20247d69af4d5522815113fba1ae432e /drivers/video
parent7b71c410b2417acba49648ceaa6de38b00b05c88 (diff)
OMAPDSS: DSI: remove clkin from dsi_clock_info
struct dsi_clock_info contains clkin field, which is the rate of the PLL's input clock. This field is not needed, as it can be easily retrieved by using the clk_get_rate(). This patch removes the clkin field. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/omap2/dss/dpi.c1
-rw-r--r--drivers/video/fbdev/omap2/dss/dsi.c13
-rw-r--r--drivers/video/fbdev/omap2/dss/dss.h1
3 files changed, 4 insertions, 11 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dpi.c b/drivers/video/fbdev/omap2/dss/dpi.c
index aa095c4927ec..91f18ab72007 100644
--- a/drivers/video/fbdev/omap2/dss/dpi.c
+++ b/drivers/video/fbdev/omap2/dss/dpi.c
@@ -223,7 +223,6 @@ static bool dpi_dsi_clk_calc(struct dpi_data *dpi, unsigned long pck,
223 ctx->dsidev = dpi->dsidev; 223 ctx->dsidev = dpi->dsidev;
224 ctx->pck_min = pck - 1000; 224 ctx->pck_min = pck - 1000;
225 ctx->pck_max = pck + 1000; 225 ctx->pck_max = pck + 1000;
226 ctx->dsi_cinfo.clkin = clkin;
227 226
228 pll_min = 0; 227 pll_min = 0;
229 pll_max = 0; 228 pll_max = 0;
diff --git a/drivers/video/fbdev/omap2/dss/dsi.c b/drivers/video/fbdev/omap2/dss/dsi.c
index 1c5a15581669..deab4135ddc0 100644
--- a/drivers/video/fbdev/omap2/dss/dsi.c
+++ b/drivers/video/fbdev/omap2/dss/dsi.c
@@ -1486,8 +1486,7 @@ static int dsi_calc_clock_rates(struct platform_device *dsidev,
1486 if (cinfo->regm_dsi > dsi->regm_dsi_max) 1486 if (cinfo->regm_dsi > dsi->regm_dsi_max)
1487 return -EINVAL; 1487 return -EINVAL;
1488 1488
1489 cinfo->clkin = clk_get_rate(dsi->sys_clk); 1489 cinfo->fint = clk_get_rate(dsi->sys_clk) / cinfo->regn;
1490 cinfo->fint = cinfo->clkin / cinfo->regn;
1491 1490
1492 if (cinfo->fint > dsi->fint_max || cinfo->fint < dsi->fint_min) 1491 if (cinfo->fint > dsi->fint_max || cinfo->fint < dsi->fint_min)
1493 return -EINVAL; 1492 return -EINVAL;
@@ -1548,7 +1547,6 @@ int dsi_pll_set_clock_div(struct platform_device *dsidev,
1548 1547
1549 DSSDBG("DSI PLL clock config starts"); 1548 DSSDBG("DSI PLL clock config starts");
1550 1549
1551 dsi->current_cinfo.clkin = cinfo->clkin;
1552 dsi->current_cinfo.fint = cinfo->fint; 1550 dsi->current_cinfo.fint = cinfo->fint;
1553 dsi->current_cinfo.clkin4ddr = cinfo->clkin4ddr; 1551 dsi->current_cinfo.clkin4ddr = cinfo->clkin4ddr;
1554 dsi->current_cinfo.dsi_pll_hsdiv_dispc_clk = 1552 dsi->current_cinfo.dsi_pll_hsdiv_dispc_clk =
@@ -1563,13 +1561,13 @@ int dsi_pll_set_clock_div(struct platform_device *dsidev,
1563 1561
1564 DSSDBG("DSI Fint %ld\n", cinfo->fint); 1562 DSSDBG("DSI Fint %ld\n", cinfo->fint);
1565 1563
1566 DSSDBG("clkin rate %ld\n", cinfo->clkin); 1564 DSSDBG("clkin rate %ld\n", clk_get_rate(dsi->sys_clk));
1567 1565
1568 /* DSIPHY == CLKIN4DDR */ 1566 /* DSIPHY == CLKIN4DDR */
1569 DSSDBG("CLKIN4DDR = 2 * %d / %d * %lu = %lu\n", 1567 DSSDBG("CLKIN4DDR = 2 * %d / %d * %lu = %lu\n",
1570 cinfo->regm, 1568 cinfo->regm,
1571 cinfo->regn, 1569 cinfo->regn,
1572 cinfo->clkin, 1570 clk_get_rate(dsi->sys_clk),
1573 cinfo->clkin4ddr); 1571 cinfo->clkin4ddr);
1574 1572
1575 DSSDBG("Data rate on 1 DSI lane %ld Mbps\n", 1573 DSSDBG("Data rate on 1 DSI lane %ld Mbps\n",
@@ -1771,7 +1769,7 @@ static void dsi_dump_dsidev_clocks(struct platform_device *dsidev,
1771 1769
1772 seq_printf(s, "- DSI%d PLL -\n", dsi_module + 1); 1770 seq_printf(s, "- DSI%d PLL -\n", dsi_module + 1);
1773 1771
1774 seq_printf(s, "dsi pll clkin\t%lu\n", cinfo->clkin); 1772 seq_printf(s, "dsi pll clkin\t%lu\n", clk_get_rate(dsi->sys_clk));
1775 1773
1776 seq_printf(s, "Fint\t\t%-16luregn %u\n", cinfo->fint, cinfo->regn); 1774 seq_printf(s, "Fint\t\t%-16luregn %u\n", cinfo->fint, cinfo->regn);
1777 1775
@@ -4780,7 +4778,6 @@ static bool dsi_cm_calc(struct dsi_data *dsi,
4780 ctx->req_pck_min = pck; 4778 ctx->req_pck_min = pck;
4781 ctx->req_pck_nom = pck; 4779 ctx->req_pck_nom = pck;
4782 ctx->req_pck_max = pck * 3 / 2; 4780 ctx->req_pck_max = pck * 3 / 2;
4783 ctx->dsi_cinfo.clkin = clkin;
4784 4781
4785 pll_min = max(cfg->hs_clk_min * 4, txbyteclk * 4 * 4); 4782 pll_min = max(cfg->hs_clk_min * 4, txbyteclk * 4 * 4);
4786 pll_max = cfg->hs_clk_max * 4; 4783 pll_max = cfg->hs_clk_max * 4;
@@ -5066,8 +5063,6 @@ static bool dsi_vm_calc(struct dsi_data *dsi,
5066 ctx->dsidev = dsi->pdev; 5063 ctx->dsidev = dsi->pdev;
5067 ctx->config = cfg; 5064 ctx->config = cfg;
5068 5065
5069 ctx->dsi_cinfo.clkin = clkin;
5070
5071 /* these limits should come from the panel driver */ 5066 /* these limits should come from the panel driver */
5072 ctx->req_pck_min = t->pixelclock - 1000; 5067 ctx->req_pck_min = t->pixelclock - 1000;
5073 ctx->req_pck_nom = t->pixelclock; 5068 ctx->req_pck_nom = t->pixelclock;
diff --git a/drivers/video/fbdev/omap2/dss/dss.h b/drivers/video/fbdev/omap2/dss/dss.h
index 712592d2e5f7..45e255ecff29 100644
--- a/drivers/video/fbdev/omap2/dss/dss.h
+++ b/drivers/video/fbdev/omap2/dss/dss.h
@@ -114,7 +114,6 @@ struct dsi_clock_info {
114 /* rates that we get with dividers below */ 114 /* rates that we get with dividers below */
115 unsigned long fint; 115 unsigned long fint;
116 unsigned long clkin4ddr; 116 unsigned long clkin4ddr;
117 unsigned long clkin;
118 unsigned long dsi_pll_hsdiv_dispc_clk; /* OMAP3: DSI1_PLL_CLK 117 unsigned long dsi_pll_hsdiv_dispc_clk; /* OMAP3: DSI1_PLL_CLK
119 * OMAP4: PLLx_CLK1 */ 118 * OMAP4: PLLx_CLK1 */
120 unsigned long dsi_pll_hsdiv_dsi_clk; /* OMAP3: DSI2_PLL_CLK 119 unsigned long dsi_pll_hsdiv_dsi_clk; /* OMAP3: DSI2_PLL_CLK