Commit 8d88767a authored by Tomi Valkeinen's avatar Tomi Valkeinen

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: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 9eaaf207
...@@ -652,15 +652,6 @@ static struct omap_dss_device sdp4430_hdmi_device = { ...@@ -652,15 +652,6 @@ static struct omap_dss_device sdp4430_hdmi_device = {
.name = "hdmi", .name = "hdmi",
.driver_name = "hdmi_panel", .driver_name = "hdmi_panel",
.type = OMAP_DISPLAY_TYPE_HDMI, .type = OMAP_DISPLAY_TYPE_HDMI,
.clocks = {
.dispc = {
.dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK,
},
.hdmi = {
.regn = 15,
.regm2 = 1,
},
},
.platform_enable = sdp4430_panel_enable_hdmi, .platform_enable = sdp4430_panel_enable_hdmi,
.platform_disable = sdp4430_panel_disable_hdmi, .platform_disable = sdp4430_panel_disable_hdmi,
.channel = OMAP_DSS_CHANNEL_DIGIT, .channel = OMAP_DSS_CHANNEL_DIGIT,
......
...@@ -60,6 +60,9 @@ ...@@ -60,6 +60,9 @@
#define OMAP_HDMI_TIMINGS_NB 34 #define OMAP_HDMI_TIMINGS_NB 34
#define HDMI_DEFAULT_REGN 15
#define HDMI_DEFAULT_REGM2 1
static struct { static struct {
struct mutex lock; struct mutex lock;
struct omap_display_platform_data *pdata; struct omap_display_platform_data *pdata;
...@@ -418,7 +421,11 @@ static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy, ...@@ -418,7 +421,11 @@ static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy,
* Input clock is predivided by N + 1 * Input clock is predivided by N + 1
* out put of which is reference clk * out put of which is reference clk
*/ */
if (dssdev->clocks.hdmi.regn == 0)
pi->regn = HDMI_DEFAULT_REGN;
else
pi->regn = dssdev->clocks.hdmi.regn; pi->regn = dssdev->clocks.hdmi.regn;
refclk = clkin / (pi->regn + 1); refclk = clkin / (pi->regn + 1);
/* /*
...@@ -426,6 +433,10 @@ static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy, ...@@ -426,6 +433,10 @@ static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy,
* Multiplying by 100 to avoid fractional part removal * Multiplying by 100 to avoid fractional part removal
*/ */
pi->regm = (phy * 100 / (refclk)) / 100; pi->regm = (phy * 100 / (refclk)) / 100;
if (dssdev->clocks.hdmi.regm2 == 0)
pi->regm2 = HDMI_DEFAULT_REGM2;
else
pi->regm2 = dssdev->clocks.hdmi.regm2; pi->regm2 = dssdev->clocks.hdmi.regm2;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment