diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-08-22 06:02:52 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-09-30 09:16:36 -0400 |
commit | 8d88767a4377171752c22ac39bcb2b505eb751da (patch) | |
tree | 0de05a263e976824e7f4a6e1f1d8ffb3ca37753e /drivers/video/omap2 | |
parent | 9eaaf2076dac213c034c69051dd7a625cd41f56e (diff) |
OMAP: DSS2: HDMI: use default dividers
Use default regn and regm2 dividers in the hdmi driver if the board file
does not define them.
Cc: Mythri P K <mythripk@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index 8cef940b5010..52731b5e10f0 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c | |||
@@ -60,6 +60,9 @@ | |||
60 | 60 | ||
61 | #define OMAP_HDMI_TIMINGS_NB 34 | 61 | #define OMAP_HDMI_TIMINGS_NB 34 |
62 | 62 | ||
63 | #define HDMI_DEFAULT_REGN 15 | ||
64 | #define HDMI_DEFAULT_REGM2 1 | ||
65 | |||
63 | static struct { | 66 | static struct { |
64 | struct mutex lock; | 67 | struct mutex lock; |
65 | struct omap_display_platform_data *pdata; | 68 | struct omap_display_platform_data *pdata; |
@@ -418,7 +421,11 @@ static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy, | |||
418 | * Input clock is predivided by N + 1 | 421 | * Input clock is predivided by N + 1 |
419 | * out put of which is reference clk | 422 | * out put of which is reference clk |
420 | */ | 423 | */ |
421 | pi->regn = dssdev->clocks.hdmi.regn; | 424 | if (dssdev->clocks.hdmi.regn == 0) |
425 | pi->regn = HDMI_DEFAULT_REGN; | ||
426 | else | ||
427 | pi->regn = dssdev->clocks.hdmi.regn; | ||
428 | |||
422 | refclk = clkin / (pi->regn + 1); | 429 | refclk = clkin / (pi->regn + 1); |
423 | 430 | ||
424 | /* | 431 | /* |
@@ -426,7 +433,11 @@ static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy, | |||
426 | * Multiplying by 100 to avoid fractional part removal | 433 | * Multiplying by 100 to avoid fractional part removal |
427 | */ | 434 | */ |
428 | pi->regm = (phy * 100 / (refclk)) / 100; | 435 | pi->regm = (phy * 100 / (refclk)) / 100; |
429 | pi->regm2 = dssdev->clocks.hdmi.regm2; | 436 | |
437 | if (dssdev->clocks.hdmi.regm2 == 0) | ||
438 | pi->regm2 = HDMI_DEFAULT_REGM2; | ||
439 | else | ||
440 | pi->regm2 = dssdev->clocks.hdmi.regm2; | ||
430 | 441 | ||
431 | /* | 442 | /* |
432 | * fractional multiplier is remainder of the difference between | 443 | * fractional multiplier is remainder of the difference between |