static inline void lvds_writel(struct rockchip_lvds *lvds, u32 offset, u32 val)
{
writel_relaxed(val, lvds->regs + offset);
- if ((lvds->output == DISPLAY_OUTPUT_DUAL_LVDS) &&
+ if ((lvds->output != DISPLAY_OUTPUT_LVDS) &&
(LVDS_CHIP(lvds) == RK3288_LVDS))
- writel_relaxed(val, lvds->regs + offset + 0x100);
+ writel_relaxed(val,
+ lvds->regs + offset + RK3288_LVDS_CH1_OFFSET);
}
static inline void lvds_msk_reg(struct rockchip_lvds *lvds, u32 offset,
#define RK3288_LVDS_CFG_REG21 0x84
#define RK3288_LVDS_CFG_REG21_TX_ENABLE 0x92
#define RK3288_LVDS_CFG_REG21_TX_DISABLE 0x00
+#define RK3288_LVDS_CH1_OFFSET 0x100
/* fbdiv value is split over 2 registers, with bit8 in reg2 */
#define RK3288_LVDS_PLL_FBDIV_REG2(_fbd) \