diff options
author | Alan Tull <r80115@freescale.com> | 2012-03-23 16:06:35 -0500 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2012-07-03 16:57:55 -0400 |
commit | 8ee898e5f3c5fceadeaa445e8737f9b51843a89b (patch) | |
tree | 05571efb85c4585204e98b61c9326248b402fbb6 /drivers | |
parent | d9b68fb9631da0accbe41533ba2d42ed605dc561 (diff) |
ENGR00177851 HDMI fix hotpug race condition
hotplug_worker can't assume that the iahb_clk is enabled if the
irq_enabled flag is set.
Signed-off-by: Alan Tull <r80115@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/mxc_hdmi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/video/mxc_hdmi.c b/drivers/video/mxc_hdmi.c index 9e83df0066fb..ad6d7139eaa8 100644 --- a/drivers/video/mxc_hdmi.c +++ b/drivers/video/mxc_hdmi.c @@ -1739,13 +1739,13 @@ static void hotplug_worker(struct work_struct *work) bool hdmi_disable = false; int irq = platform_get_irq(hdmi->pdev, 0); unsigned long flags; - char event_string[16]; - char *envp[] = { event_string, NULL }; + char event_string[16]; + char *envp[] = { event_string, NULL }; - if (!hdmi->irq_enabled) { - /* Enable clock long enough to do a few register accesses */ - clk_enable(hdmi->hdmi_iahb_clk); + /* Enable clock long enough to do a few register accesses */ + clk_enable(hdmi->hdmi_iahb_clk); + if (!hdmi->irq_enabled) { /* Capture status - used in hotplug_worker ISR */ phy_int_stat = hdmi_readb(HDMI_IH_PHY_STAT0); if ((phy_int_stat & HDMI_IH_PHY_STAT0_HPD) == 0) { @@ -1764,14 +1764,14 @@ static void hotplug_worker(struct work_struct *work) hdmi_writeb(HDMI_IH_PHY_STAT0_HPD, HDMI_IH_PHY_STAT0); phy_int_pol = hdmi_readb(HDMI_PHY_POL0); - - clk_disable(hdmi->hdmi_iahb_clk); } else { /* Use saved interrupt status, since it was cleared in IST */ phy_int_stat = hdmi->latest_intr_stat; phy_int_pol = hdmi_readb(HDMI_PHY_POL0); } + clk_disable(hdmi->hdmi_iahb_clk); + /* Re-enable HDMI irq now that our interrupts have been masked off */ hdmi_irq_enable(irq); |