Skip to content

Commit

Permalink
OMAP: DSS2: move dss device clock configuration
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomi Valkeinen committed May 11, 2011
1 parent cf398fb commit c6940a3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
14 changes: 7 additions & 7 deletions drivers/video/omap2/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ static int dsi_set_lp_clk_divisor(struct omap_dss_device *dssdev)
unsigned lp_clk_div;
unsigned long lp_clk;

lp_clk_div = dssdev->phy.dsi.div.lp_clk_div;
lp_clk_div = dssdev->clocks.dsi.lp_clk_div;

if (lp_clk_div == 0 || lp_clk_div > dsi.lpdiv_max)
return -EINVAL;
Expand Down Expand Up @@ -3392,10 +3392,10 @@ static int dsi_configure_dsi_clocks(struct omap_dss_device *dssdev)

/* we always use DSS_CLK_SYSCK as input clock */
cinfo.use_sys_clk = true;
cinfo.regn = dssdev->phy.dsi.div.regn;
cinfo.regm = dssdev->phy.dsi.div.regm;
cinfo.regm_dispc = dssdev->phy.dsi.div.regm_dispc;
cinfo.regm_dsi = dssdev->phy.dsi.div.regm_dsi;
cinfo.regn = dssdev->clocks.dsi.regn;
cinfo.regm = dssdev->clocks.dsi.regm;
cinfo.regm_dispc = dssdev->clocks.dsi.regm_dispc;
cinfo.regm_dsi = dssdev->clocks.dsi.regm_dsi;
r = dsi_calc_clock_rates(dssdev, &cinfo);
if (r) {
DSSERR("Failed to calc dsi clocks\n");
Expand All @@ -3419,8 +3419,8 @@ static int dsi_configure_dispc_clocks(struct omap_dss_device *dssdev)

fck = dsi_get_pll_hsdiv_dispc_rate();

dispc_cinfo.lck_div = dssdev->phy.dsi.div.lck_div;
dispc_cinfo.pck_div = dssdev->phy.dsi.div.pck_div;
dispc_cinfo.lck_div = dssdev->clocks.dispc.lck_div;
dispc_cinfo.pck_div = dssdev->clocks.dispc.pck_div;

r = dispc_calc_clock_rates(fck, &dispc_cinfo);
if (r) {
Expand Down
28 changes: 16 additions & 12 deletions include/video/omapdss.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,18 +399,6 @@ struct omap_dss_device {
u8 data2_lane;
u8 data2_pol;

struct {
u16 regn;
u16 regm;
u16 regm_dispc;
u16 regm_dsi;

u16 lp_clk_div;

u16 lck_div;
u16 pck_div;
} div;

bool ext_te;
u8 ext_te_gpio;
} dsi;
Expand All @@ -421,6 +409,22 @@ struct omap_dss_device {
} venc;
} phy;

struct {
struct {
u16 lck_div;
u16 pck_div;
} dispc;

struct {
u16 regn;
u16 regm;
u16 regm_dispc;
u16 regm_dsi;

u16 lp_clk_div;
} dsi;
} clocks;

struct {
struct omap_video_timings timings;

Expand Down

0 comments on commit c6940a3

Please sign in to comment.