rk3036 hdmi: fix HPD status reg change

This commit is contained in:
hjc
2014-07-09 08:59:23 +08:00
parent b1db3f3b00
commit 8913efd702
2 changed files with 13 additions and 6 deletions

View File

@@ -217,8 +217,12 @@ int rk616_hdmi_read_edid(struct hdmi *hdmi_drv, int block, u8 *buf)
disable_irq(hdmi_drv->irq);
/* Enable edid interrupt */
#ifdef SOC_CONFIG_RK3036
hdmi_writel(hdmi_dev, INTERRUPT_MASK1, m_INT_EDID_READY);
#else
hdmi_writel(hdmi_dev, INTERRUPT_MASK1,
m_INT_HOTPLUG | m_INT_EDID_READY);
#endif
for (trytime = 0; trytime < 10; trytime++) {
hdmi_writel(hdmi_dev, INTERRUPT_STATUS1, 0x04);
@@ -588,20 +592,22 @@ void rk616_hdmi_work(struct hdmi *hdmi_drv)
if(interrupt){
hdmi_writel(hdmi_dev, HDMI_STATUS, interrupt);
}
if (interrupt & m_INT_HOTPLUG)
#else
hdmi_readl(hdmi_dev, INTERRUPT_STATUS1,&interrupt);
if(interrupt){
hdmi_writel(hdmi_dev, INTERRUPT_STATUS1, interrupt);
}
if (interrupt & m_HOTPLUG)
#endif
if (interrupt & m_HOTPLUG) {
{
if (hdmi_drv->state == HDMI_SLEEP)
hdmi_drv->state = WAIT_HOTPLUG;
queue_delayed_work(hdmi_drv->workqueue, &hdmi_drv->delay_work,
msecs_to_jiffies(40));
}
}//plug out?
if (hdmi_drv->hdcp_irq_cb)
hdmi_drv->hdcp_irq_cb(0);
@@ -654,6 +660,7 @@ int rk616_hdmi_initial(struct hdmi *hdmi_drv)
rk3028_hdmi_reset_pclk();
rk616_hdmi_reset(hdmi_drv);
#elif defined(SOC_CONFIG_RK3036)
rk3028_hdmi_reset_pclk();
rk616_hdmi_reset(hdmi_drv);
#else
hdmi_drv->set_vif = rk616_hdmi_set_vif;

View File

@@ -2,7 +2,7 @@
#define _RK616_HDMI_HW_H
#define SOC_CONFIG_RK3036
#include <linux/rockchip/iomap.h>
#define RK616_HDMI_BASE 0x400
enum PWR_MODE {
NORMAL,
@@ -356,12 +356,12 @@ static inline int hdmi_msk_reg(struct rk_hdmi_device *hdmi_dev, u16 offset,
writel_relaxed(temp | ((val) & (msk)), hdmi_dev->regbase + (offset) * 0x04);
return ret;
}
#if defined(CONFIG_ARCH_RK3026)
#if defined(CONFIG_ARCH_RK3026) || defined(SOC_CONFIG_RK3036)
static inline void rk3028_hdmi_reset_pclk(void)
{
writel_relaxed(0x00010001, RK2928_CRU_BASE + 0x128);
writel_relaxed(0x00010001, RK_CRU_VIRT+ 0x128);
msleep(100);
writel_relaxed(0x00010000, RK2928_CRU_BASE + 0x128);
writel_relaxed(0x00010000, RK_CRU_VIRT + 0x128);
}
#endif
#endif