summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorSandor Yu <R01008@freescale.com>2012-05-29 16:54:13 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:38:15 +0800
commit25033dc50af0c6171dc5e71d694781520ddb771a (patch)
treef87c0b3995e540f57474dc1512a258f8e00e0616 /drivers/mfd
parentda8e618a6636365f60d7a062e3ae9100521f9fe7 (diff)
ENGR00178461-02 HDMI1080p: hotplug cause kernel panic. 10%
It is a warning cause by HDMI driver irq enable count mismatch. The purpose of maintain HDMI irq count is to disable hdmi_iahb_clk when HDMI cable plugout. But hdmi_iahb_clk parent ahb clock is always enabled when system run, so hdmi_iabh_clk power consumption is very low. The function clk_get_usecount introduce by irq count maintain is not safety in SMP. Remove HDMI irq count in HDMI driver, keep hdmi_iahb_clk always run. and disable hdmi_iahb_clk and hdmi_isfr_clk when FB Blank. Signed-off-by: Sandor Yu <R01008@freescale.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/mxc-hdmi-core.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/drivers/mfd/mxc-hdmi-core.c b/drivers/mfd/mxc-hdmi-core.c
index 896f53b4f6e8..6ccf5504a034 100644
--- a/drivers/mfd/mxc-hdmi-core.c
+++ b/drivers/mfd/mxc-hdmi-core.c
@@ -51,11 +51,8 @@ struct mxc_hdmi_data {
static unsigned long hdmi_base;
static struct clk *isfr_clk;
static struct clk *iahb_clk;
-static unsigned int irq_enable_cnt;
static spinlock_t irq_spinlock;
static spinlock_t edid_spinlock;
-static bool irq_initialized;
-static bool irq_enabled;
static unsigned int sample_rate;
static unsigned long pixel_clk_rate;
static struct clk *pixel_clk;
@@ -138,56 +135,6 @@ void hdmi_write4(unsigned int value, unsigned int reg)
hdmi_writeb((value >> 24) & 0xff, reg + 3);
}
-void hdmi_irq_init()
-{
- /* First time IRQ is initialized, set enable_cnt to 1,
- * since IRQ starts out enabled after request_irq */
- if (!irq_initialized) {
- irq_enable_cnt = 1;
- irq_initialized = true;
- irq_enabled = true;
- }
-}
-
-void hdmi_irq_enable(int irq)
-{
- unsigned long flags;
-
- spin_lock_irqsave(&irq_spinlock, flags);
-
- if (!irq_enabled) {
- enable_irq(irq);
- irq_enabled = true;
- }
-
- irq_enable_cnt++;
-
- spin_unlock_irqrestore(&irq_spinlock, flags);
-}
-
-unsigned int hdmi_irq_disable(int irq)
-{
- unsigned long flags;
-
- spin_lock_irqsave(&irq_spinlock, flags);
-
- WARN_ON (irq_enable_cnt == 0);
-
- irq_enable_cnt--;
-
- /* Only disable HDMI IRQ if IAHB clk is off */
- if ((irq_enable_cnt == 0) && (clk_get_usecount(iahb_clk) == 0)) {
- disable_irq_nosync(irq);
- irq_enabled = false;
- spin_unlock_irqrestore(&irq_spinlock, flags);
- return IRQ_DISABLE_SUCCEED;
- }
-
- spin_unlock_irqrestore(&irq_spinlock, flags);
-
- return IRQ_DISABLE_FAIL;
-}
-
static void initialize_hdmi_ih_mutes(void)
{
u8 ih_mute;
@@ -538,9 +485,6 @@ static int mxc_hdmi_core_probe(struct platform_device *pdev)
pixel_clk_rate = 0;
hdmi_ratio = 100;
- irq_enable_cnt = 0;
- irq_initialized = false;
- irq_enabled = true;
spin_lock_init(&irq_spinlock);
spin_lock_init(&edid_spinlock);