aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-02-22 06:36:10 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-05-11 07:19:16 -0400
commitc6940a3dc59d9628c8d407b98b6f57df69e3ef52 (patch)
treed041fc4a602b76cff311796d8300e9d77ea41e3b
parentcf398fb3e6aed8e7a9b3bcf77f6de2d34ccd2078 (diff)
OMAP: DSS2: move dss device clock configuration
Clock configuration was defined inside dssdev.phy.dsi struct. The clock config doesn't really belong there, and so it's moved to dssdev.clock struct. Now the explicit clock configuration could also be used for other interfaces than DSI, although there's no support for it currently. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap2/dss/dsi.c14
-rw-r--r--include/video/omapdss.h28
2 files changed, 23 insertions, 19 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 39d942607362..e89144f719c3 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -1026,7 +1026,7 @@ static int dsi_set_lp_clk_divisor(struct omap_dss_device *dssdev)
1026 unsigned lp_clk_div; 1026 unsigned lp_clk_div;
1027 unsigned long lp_clk; 1027 unsigned long lp_clk;
1028 1028
1029 lp_clk_div = dssdev->phy.dsi.div.lp_clk_div; 1029 lp_clk_div = dssdev->clocks.dsi.lp_clk_div;
1030 1030
1031 if (lp_clk_div == 0 || lp_clk_div > dsi.lpdiv_max) 1031 if (lp_clk_div == 0 || lp_clk_div > dsi.lpdiv_max)
1032 return -EINVAL; 1032 return -EINVAL;
@@ -3392,10 +3392,10 @@ static int dsi_configure_dsi_clocks(struct omap_dss_device *dssdev)
3392 3392
3393 /* we always use DSS_CLK_SYSCK as input clock */ 3393 /* we always use DSS_CLK_SYSCK as input clock */
3394 cinfo.use_sys_clk = true; 3394 cinfo.use_sys_clk = true;
3395 cinfo.regn = dssdev->phy.dsi.div.regn; 3395 cinfo.regn = dssdev->clocks.dsi.regn;
3396 cinfo.regm = dssdev->phy.dsi.div.regm; 3396 cinfo.regm = dssdev->clocks.dsi.regm;
3397 cinfo.regm_dispc = dssdev->phy.dsi.div.regm_dispc; 3397 cinfo.regm_dispc = dssdev->clocks.dsi.regm_dispc;
3398 cinfo.regm_dsi = dssdev->phy.dsi.div.regm_dsi; 3398 cinfo.regm_dsi = dssdev->clocks.dsi.regm_dsi;
3399 r = dsi_calc_clock_rates(dssdev, &cinfo); 3399 r = dsi_calc_clock_rates(dssdev, &cinfo);
3400 if (r) { 3400 if (r) {
3401 DSSERR("Failed to calc dsi clocks\n"); 3401 DSSERR("Failed to calc dsi clocks\n");
@@ -3419,8 +3419,8 @@ static int dsi_configure_dispc_clocks(struct omap_dss_device *dssdev)
3419 3419
3420 fck = dsi_get_pll_hsdiv_dispc_rate(); 3420 fck = dsi_get_pll_hsdiv_dispc_rate();
3421 3421
3422 dispc_cinfo.lck_div = dssdev->phy.dsi.div.lck_div; 3422 dispc_cinfo.lck_div = dssdev->clocks.dispc.lck_div;
3423 dispc_cinfo.pck_div = dssdev->phy.dsi.div.pck_div; 3423 dispc_cinfo.pck_div = dssdev->clocks.dispc.pck_div;
3424 3424
3425 r = dispc_calc_clock_rates(fck, &dispc_cinfo); 3425 r = dispc_calc_clock_rates(fck, &dispc_cinfo);
3426 if (r) { 3426 if (r) {
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 39738688c7ce..53ca97c9793c 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -399,18 +399,6 @@ struct omap_dss_device {
399 u8 data2_lane; 399 u8 data2_lane;
400 u8 data2_pol; 400 u8 data2_pol;
401 401
402 struct {
403 u16 regn;
404 u16 regm;
405 u16 regm_dispc;
406 u16 regm_dsi;
407
408 u16 lp_clk_div;
409
410 u16 lck_div;
411 u16 pck_div;
412 } div;
413
414 bool ext_te; 402 bool ext_te;
415 u8 ext_te_gpio; 403 u8 ext_te_gpio;
416 } dsi; 404 } dsi;
@@ -422,6 +410,22 @@ struct omap_dss_device {
422 } phy; 410 } phy;
423 411
424 struct { 412 struct {
413 struct {
414 u16 lck_div;
415 u16 pck_div;
416 } dispc;
417
418 struct {
419 u16 regn;
420 u16 regm;
421 u16 regm_dispc;
422 u16 regm_dsi;
423
424 u16 lp_clk_div;
425 } dsi;
426 } clocks;
427
428 struct {
425 struct omap_video_timings timings; 429 struct omap_video_timings timings;
426 430
427 int acbi; /* ac-bias pin transitions per interrupt */ 431 int acbi; /* ac-bias pin transitions per interrupt */