summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/omap2/dss/dpi.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-11-07 13:13:24 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-11-12 13:40:22 +0200
commitacf604b709e6b933638bd72d52c5b2e0ff37ff16 (patch)
tree1eb0494e09815e9358924080b0625589c53aad22 /drivers/video/fbdev/omap2/dss/dpi.c
parent4a38aedec734144102e318e3e76eef410108e678 (diff)
downloadop-kernel-dev-acf604b709e6b933638bd72d52c5b2e0ff37ff16.zip
op-kernel-dev-acf604b709e6b933638bd72d52c5b2e0ff37ff16.tar.gz
OMAPDSS: DSI: turn hsdivs fields to arrays
We are creating a common DSS PLL code, so having fixed DSI specific hsdiv fields in the clock information is not ok. This patch changes the hsdiv fields to arrays, so that we can use all the 4 possible hsdiv outputs (DSI only usees 2), and we have generic way to access the hsdivs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/fbdev/omap2/dss/dpi.c')
-rw-r--r--drivers/video/fbdev/omap2/dss/dpi.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dpi.c b/drivers/video/fbdev/omap2/dss/dpi.c
index f6a14c8..0b9af5d 100644
--- a/drivers/video/fbdev/omap2/dss/dpi.c
+++ b/drivers/video/fbdev/omap2/dss/dpi.c
@@ -37,6 +37,8 @@
#include "dss.h"
#include "dss_features.h"
+#define HSDIV_DISPC 0
+
struct dpi_data {
struct platform_device *pdev;
@@ -178,8 +180,8 @@ static bool dpi_calc_hsdiv_cb(int regm_dispc, unsigned long dispc,
if (regm_dispc > 1 && regm_dispc % 2 != 0 && ctx->pck_min >= 100000000)
return false;
- ctx->dsi_cinfo.regm_dispc = regm_dispc;
- ctx->dsi_cinfo.dsi_pll_hsdiv_dispc_clk = dispc;
+ ctx->dsi_cinfo.regm_hsdiv[HSDIV_DISPC] = regm_dispc;
+ ctx->dsi_cinfo.clkout[HSDIV_DISPC] = dispc;
return dispc_div_calc(dispc, ctx->pck_min, ctx->pck_max,
dpi_calc_dispc_cb, ctx);
@@ -284,7 +286,7 @@ static int dpi_set_dsi_clk(struct dpi_data *dpi, enum omap_channel channel,
dpi->mgr_config.clock_info = ctx.dispc_cinfo;
- *fck = ctx.dsi_cinfo.dsi_pll_hsdiv_dispc_clk;
+ *fck = ctx.dsi_cinfo.clkout[HSDIV_DISPC];
*lck_div = ctx.dispc_cinfo.lck_div;
*pck_div = ctx.dispc_cinfo.pck_div;
@@ -516,7 +518,7 @@ static int dpi_check_timings(struct omap_dss_device *dssdev,
if (!ok)
return -EINVAL;
- fck = ctx.dsi_cinfo.dsi_pll_hsdiv_dispc_clk;
+ fck = ctx.dsi_cinfo.clkout[HSDIV_DISPC];
} else {
ok = dpi_dss_clk_calc(timings->pixelclock, &ctx);
if (!ok)
OpenPOWER on IntegriCloud