aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/fbdev/omap2/dss/hdmi.h1
-rw-r--r--drivers/video/fbdev/omap2/dss/hdmi4.c10
-rw-r--r--drivers/video/fbdev/omap2/dss/hdmi5.c10
-rw-r--r--drivers/video/fbdev/omap2/dss/hdmi_pll.c6
4 files changed, 18 insertions, 9 deletions
diff --git a/drivers/video/fbdev/omap2/dss/hdmi.h b/drivers/video/fbdev/omap2/dss/hdmi.h
index 03761ecb81a6..7595274a9bcf 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi.h
+++ b/drivers/video/fbdev/omap2/dss/hdmi.h
@@ -316,6 +316,7 @@ int hdmi_wp_init(struct platform_device *pdev, struct hdmi_wp_data *wp);
316/* HDMI PLL funcs */ 316/* HDMI PLL funcs */
317int hdmi_pll_enable(struct hdmi_pll_data *pll); 317int hdmi_pll_enable(struct hdmi_pll_data *pll);
318void hdmi_pll_disable(struct hdmi_pll_data *pll); 318void hdmi_pll_disable(struct hdmi_pll_data *pll);
319int hdmi_pll_set_config(struct hdmi_pll_data *pll);
319void hdmi_pll_dump(struct hdmi_pll_data *pll, struct seq_file *s); 320void hdmi_pll_dump(struct hdmi_pll_data *pll, struct seq_file *s);
320void hdmi_pll_compute(struct hdmi_pll_data *pll, unsigned long clkin, 321void hdmi_pll_compute(struct hdmi_pll_data *pll, unsigned long clkin,
321 unsigned long target_tmds); 322 unsigned long target_tmds);
diff --git a/drivers/video/fbdev/omap2/dss/hdmi4.c b/drivers/video/fbdev/omap2/dss/hdmi4.c
index 2094b6eae99e..98aa910241b8 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi4.c
+++ b/drivers/video/fbdev/omap2/dss/hdmi4.c
@@ -196,13 +196,18 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
196 196
197 hdmi_pll_compute(&hdmi.pll, clk_get_rate(hdmi.sys_clk), p->pixelclock); 197 hdmi_pll_compute(&hdmi.pll, clk_get_rate(hdmi.sys_clk), p->pixelclock);
198 198
199 /* config the PLL and PHY hdmi_set_pll_pwrfirst */
200 r = hdmi_pll_enable(&hdmi.pll); 199 r = hdmi_pll_enable(&hdmi.pll);
201 if (r) { 200 if (r) {
202 DSSDBG("Failed to lock PLL\n"); 201 DSSERR("Failed to enable PLL\n");
203 goto err_pll_enable; 202 goto err_pll_enable;
204 } 203 }
205 204
205 r = hdmi_pll_set_config(&hdmi.pll);
206 if (r) {
207 DSSERR("Failed to configure PLL\n");
208 goto err_pll_cfg;
209 }
210
206 r = hdmi_phy_configure(&hdmi.phy, hdmi.pll.info.clkdco, 211 r = hdmi_phy_configure(&hdmi.phy, hdmi.pll.info.clkdco,
207 hdmi.pll.info.clkout); 212 hdmi.pll.info.clkout);
208 if (r) { 213 if (r) {
@@ -241,6 +246,7 @@ err_vid_enable:
241err_phy_cfg: 246err_phy_cfg:
242 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); 247 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
243err_phy_pwr: 248err_phy_pwr:
249err_pll_cfg:
244 hdmi_pll_disable(&hdmi.pll); 250 hdmi_pll_disable(&hdmi.pll);
245err_pll_enable: 251err_pll_enable:
246 hdmi_power_off_core(dssdev); 252 hdmi_power_off_core(dssdev);
diff --git a/drivers/video/fbdev/omap2/dss/hdmi5.c b/drivers/video/fbdev/omap2/dss/hdmi5.c
index fb8c14507a4d..facc4e070520 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi5.c
+++ b/drivers/video/fbdev/omap2/dss/hdmi5.c
@@ -214,13 +214,18 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
214 hdmi_wp_set_irqstatus(&hdmi.wp, 214 hdmi_wp_set_irqstatus(&hdmi.wp,
215 hdmi_wp_get_irqstatus(&hdmi.wp)); 215 hdmi_wp_get_irqstatus(&hdmi.wp));
216 216
217 /* config the PLL and PHY hdmi_set_pll_pwrfirst */
218 r = hdmi_pll_enable(&hdmi.pll); 217 r = hdmi_pll_enable(&hdmi.pll);
219 if (r) { 218 if (r) {
220 DSSDBG("Failed to lock PLL\n"); 219 DSSERR("Failed to enable PLL\n");
221 goto err_pll_enable; 220 goto err_pll_enable;
222 } 221 }
223 222
223 r = hdmi_pll_set_config(&hdmi.pll);
224 if (r) {
225 DSSERR("Failed to configure PLL\n");
226 goto err_pll_cfg;
227 }
228
224 r = hdmi_phy_configure(&hdmi.phy, hdmi.pll.info.clkdco, 229 r = hdmi_phy_configure(&hdmi.phy, hdmi.pll.info.clkdco,
225 hdmi.pll.info.clkout); 230 hdmi.pll.info.clkout);
226 if (r) { 231 if (r) {
@@ -259,6 +264,7 @@ err_vid_enable:
259 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF); 264 hdmi_wp_set_phy_pwr(&hdmi.wp, HDMI_PHYPWRCMD_OFF);
260err_phy_pwr: 265err_phy_pwr:
261err_phy_cfg: 266err_phy_cfg:
267err_pll_cfg:
262 hdmi_pll_disable(&hdmi.pll); 268 hdmi_pll_disable(&hdmi.pll);
263err_pll_enable: 269err_pll_enable:
264 hdmi_power_off_core(dssdev); 270 hdmi_power_off_core(dssdev);
diff --git a/drivers/video/fbdev/omap2/dss/hdmi_pll.c b/drivers/video/fbdev/omap2/dss/hdmi_pll.c
index 190bede1dcb9..c14c3d132513 100644
--- a/drivers/video/fbdev/omap2/dss/hdmi_pll.c
+++ b/drivers/video/fbdev/omap2/dss/hdmi_pll.c
@@ -103,7 +103,7 @@ void hdmi_pll_compute(struct hdmi_pll_data *pll, unsigned long clkin,
103 pi->clkout = clkout; 103 pi->clkout = clkout;
104} 104}
105 105
106static int hdmi_pll_config(struct hdmi_pll_data *pll) 106int hdmi_pll_set_config(struct hdmi_pll_data *pll)
107{ 107{
108 u32 r; 108 u32 r;
109 struct hdmi_pll_info *fmt = &pll->info; 109 struct hdmi_pll_info *fmt = &pll->info;
@@ -179,10 +179,6 @@ int hdmi_pll_enable(struct hdmi_pll_data *pll)
179 if (r) 179 if (r)
180 return r; 180 return r;
181 181
182 r = hdmi_pll_config(pll);
183 if (r)
184 return r;
185
186 return 0; 182 return 0;
187} 183}
188 184