hdmi_writel(hdmi_dev, PHY_DRIVER, 0x99);
hdmi_writel(hdmi_dev, PHY_PRE_EMPHASIS, 0x0f);
}
-#ifndef SOC_CONFIG_RK3036
+#ifdef SOC_CONFIG_RK3036
+ hdmi_writel(hdmi_dev, PHY_SYS_CTL,0x15);
+ hdmi_writel(hdmi_dev, PHY_SYS_CTL,0x14);
+ hdmi_writel(hdmi_dev, PHY_SYS_CTL,0x10);
+#else
hdmi_writel(hdmi_dev, PHY_SYS_CTL,0x2d);
hdmi_writel(hdmi_dev, PHY_SYS_CTL,0x2c);
hdmi_writel(hdmi_dev, PHY_SYS_CTL,0x28);
hdmi_writel(hdmi_dev, PHY_SYS_CTL,0x20);
-#else
- hdmi_writel(hdmi_dev, PHY_SYS_CTL,0x15);
- hdmi_writel(hdmi_dev, PHY_SYS_CTL,0x14);
- hdmi_writel(hdmi_dev, PHY_SYS_CTL,0x10);
#endif
hdmi_writel(hdmi_dev, PHY_CHG_PWR, 0x0f);
hdmi_writel(hdmi_dev, 0xce, 0x00);
hdmi_writel(hdmi_dev, PHY_DRIVER, 0x00);
hdmi_writel(hdmi_dev, PHY_PRE_EMPHASIS, 0x00);
hdmi_writel(hdmi_dev, PHY_CHG_PWR, 0x00);
-#ifndef SOC_CONFIG_RK3036
- hdmi_writel(hdmi_dev, PHY_SYS_CTL,0x2f);
-#else
+#ifdef SOC_CONFIG_RK3036
hdmi_writel(hdmi_dev, PHY_SYS_CTL,0x17);
+#else
+ hdmi_writel(hdmi_dev, PHY_SYS_CTL,0x2f);
#endif
break;
default:
}
}
//close edid irq
-#ifndef SOC_CONFIG_RK3036
- hdmi_writel(hdmi_dev, INTERRUPT_MASK1, m_INT_HOTPLUG);
-#else
+#ifdef SOC_CONFIG_RK3036
hdmi_writel(hdmi_dev, INTERRUPT_MASK1, 0);
+#else
+ hdmi_writel(hdmi_dev, INTERRUPT_MASK1, m_INT_HOTPLUG);
#endif
enable_irq(hdmi_drv->irq);
struct rk_hdmi_device *hdmi_dev = container_of(hdmi_drv,
struct rk_hdmi_device,
driver);
-
-#ifndef SOC_CONFIG_RK3036
- hdmi_readl(hdmi_dev, INTERRUPT_STATUS1,&interrupt);
- if(interrupt){
- hdmi_writel(hdmi_dev, INTERRUPT_STATUS1, interrupt);
- }
-#else
+#ifdef SOC_CONFIG_RK3036
hdmi_readl(hdmi_dev, HDMI_STATUS,&interrupt);
if(interrupt){
hdmi_writel(hdmi_dev, HDMI_STATUS, interrupt);
}
+#else
+ hdmi_readl(hdmi_dev, INTERRUPT_STATUS1,&interrupt);
+ if(interrupt){
+ hdmi_writel(hdmi_dev, INTERRUPT_STATUS1, interrupt);
+ }
#endif
if (interrupt & m_HOTPLUG) {
if (hdmi_drv->state == HDMI_SLEEP)
msk = m_REG_CLK_INV | m_REG_CLK_SOURCE | m_POWER | m_INT_POL;
val = v_REG_CLK_INV | v_REG_CLK_SOURCE_SYS | v_PWR_ON | v_INT_POL_HIGH;
hdmi_msk_reg(hdmi_dev, SYS_CTRL, msk, val);
-#ifndef SOC_CONFIG_RK3036
- hdmi_writel(hdmi_dev, INTERRUPT_MASK1, m_INT_HOTPLUG);
-#else
+#ifdef SOC_CONFIG_RK3036
hdmi_readl(hdmi_dev, HDMI_STATUS,&val);//enable hpg
val |= m_MASK_INT_HOTPLUG;
hdmi_writel(hdmi_dev, HDMI_STATUS,val);
+#else
+ hdmi_writel(hdmi_dev, INTERRUPT_MASK1, m_INT_HOTPLUG);
#endif
rk616_hdmi_set_pwr_mode(hdmi_drv, LOWER_PWR);
}