Skip to content

Commit

Permalink
OMAP2PLUS: DSS2: Add clock sources to dss device clock configuration
Browse files Browse the repository at this point in the history
Add enum dss_clock_source in dssdev.clocks struct so that the clock sources can
be specified in the board file.
Replace hard coded clock sources in dsi.c, dpi.c and replace them with the new
clock source members in dssdev.clocks. Modify the sdp4430_lcd_device struct in
board-4430sdp.c to specify clock sources for DISPC_FCLK, LCD1_CLK and DSI1_FCLK.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Archit Taneja authored and Tomi Valkeinen committed May 11, 2011
1 parent 89a35e5 commit e888166
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion drivers/video/omap2/dss/dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static int dpi_set_dsi_clk(struct omap_dss_device *dssdev, bool is_tft,
if (r)
return r;

dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC);
dss_select_dispc_clk_source(dssdev->clocks.dispc.dispc_fclk_src);

r = dispc_set_clock_div(dssdev->manager->id, &dispc_cinfo);
if (r)
Expand Down
10 changes: 5 additions & 5 deletions drivers/video/omap2/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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->clocks.dispc.lck_div;
dispc_cinfo.pck_div = dssdev->clocks.dispc.pck_div;
dispc_cinfo.lck_div = dssdev->clocks.dispc.channel.lck_div;
dispc_cinfo.pck_div = dssdev->clocks.dispc.channel.pck_div;

r = dispc_calc_clock_rates(fck, &dispc_cinfo);
if (r) {
Expand Down Expand Up @@ -3455,10 +3455,10 @@ static int dsi_display_init_dsi(struct omap_dss_device *dssdev)
if (r)
goto err1;

dss_select_dispc_clk_source(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC);
dss_select_dsi_clk_source(OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI);
dss_select_dispc_clk_source(dssdev->clocks.dispc.dispc_fclk_src);
dss_select_dsi_clk_source(dssdev->clocks.dsi.dsi_fclk_src);
dss_select_lcd_clk_source(dssdev->manager->id,
OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC);
dssdev->clocks.dispc.channel.lcd_clk_src);

DSSDBG("PLL OK\n");

Expand Down
10 changes: 8 additions & 2 deletions include/video/omapdss.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,13 @@ struct omap_dss_device {

struct {
struct {
u16 lck_div;
u16 pck_div;
struct {
u16 lck_div;
u16 pck_div;
enum omap_dss_clk_source lcd_clk_src;
} channel;

enum omap_dss_clk_source dispc_fclk_src;
} dispc;

struct {
Expand All @@ -431,6 +436,7 @@ struct omap_dss_device {
u16 regm_dsi;

u16 lp_clk_div;
enum omap_dss_clk_source dsi_fclk_src;
} dsi;
} clocks;

Expand Down

0 comments on commit e888166

Please sign in to comment.