rk31xx lvds: fix lvds grf config error when disable lvds

This commit is contained in:
hjc
2015-02-11 16:24:34 +08:00
parent db15be891c
commit 927ee7b056

View File

@@ -139,13 +139,18 @@ static int rk31xx_lvds_pwr_off(void)
static int rk31xx_lvds_disable(void)
{
struct rk_lvds_device *lvds = rk31xx_lvds;
u32 val;
if (unlikely(!lvds) || !lvds->sys_state)
return 0;
if (lvds->data->soc_type == LVDS_SOC_RK3368) {
val = v_RK3368_LVDSMODE_EN(0) | v_RK3368_MIPIPHY_TTL_EN(0);
lvds_grf_writel(lvds, GRF_SOC_CON7_LVDS, val);
} else {
grf_writel(v_LVDSMODE_EN(0) | v_MIPIPHY_TTL_EN(0), RK312X_GRF_LVDS_CON0);
}
grf_writel(v_LVDSMODE_EN(0) | v_MIPIPHY_TTL_EN(0), RK312X_GRF_LVDS_CON0);
rk31xx_lvds_pwr_off();
rk31xx_lvds_pwr_off();
rk31xx_lvds_clk_disable(lvds);
#if !defined(CONFIG_RK_FPGA)