sunxi: Add clock support for DE2/HDMI/TCON on newer SoCs
[oweals/u-boot.git] / drivers / video / sunxi / lcdc.c
index 8c8fb2e4ee55e2ef624de52740f195390e3f2037..7d215b713efad892d26d2c8a3712d4a0b905d1a0 100644 (file)
@@ -74,9 +74,11 @@ void lcdc_tcon0_mode_set(struct sunxi_lcdc_reg * const lcdc,
 {
        int bp, clk_delay, total, val;
 
+#ifndef CONFIG_SUNXI_DE2
        /* Use tcon0 */
        clrsetbits_le32(&lcdc->ctrl, SUNXI_LCDC_CTRL_IO_MAP_MASK,
                        SUNXI_LCDC_CTRL_IO_MAP_TCON0);
+#endif
 
        clk_delay = lcdc_get_clk_delay(mode, 0);
        writel(SUNXI_LCDC_TCON0_CTRL_ENABLE |
@@ -149,9 +151,11 @@ void lcdc_tcon1_mode_set(struct sunxi_lcdc_reg * const lcdc,
 {
        int bp, clk_delay, total, val, yres;
 
+#ifndef CONFIG_SUNXI_DE2
        /* Use tcon1 */
        clrsetbits_le32(&lcdc->ctrl, SUNXI_LCDC_CTRL_IO_MAP_MASK,
                        SUNXI_LCDC_CTRL_IO_MAP_TCON1);
+#endif
 
        clk_delay = lcdc_get_clk_delay(mode, 1);
        writel(SUNXI_LCDC_TCON1_CTRL_ENABLE |