]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
adjust config for LVDS output
authorLothar Waßmann <LW@KARO-electronics.de>
Fri, 17 Aug 2012 09:06:09 +0000 (11:06 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 17 Aug 2012 09:06:09 +0000 (11:06 +0200)
drivers/video/ipu_disp.c

index 16c547e7a030c6a6363945736d5759abd31ea23f..52f82e6e229865554e7379db75b0f9dbb69b97a7 100644 (file)
@@ -948,13 +948,24 @@ int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk,
                        clk_set_parent(g_pixel_clk[disp], g_ipu_clk);
        }
        rounded_pixel_clk = clk_round_rate(g_pixel_clk[disp], pixel_clk);
-       clk_set_rate(g_pixel_clk[disp], rounded_pixel_clk);
-       udelay(5000);
-       /* Get integer portion of divider */
-       div = clk_get_rate(clk_get_parent(g_pixel_clk[disp])) /
-               rounded_pixel_clk;
 
-       ipu_di_data_wave_config(disp, SYNC_WAVE, div - 1, div - 1);
+       di_gen = 0;
+
+       if (pixel_fmt != IPU_PIX_FMT_LVDS666 &&
+                       pixel_fmt != IPU_PIX_FMT_LVDS888) {
+               clk_set_rate(g_pixel_clk[disp], rounded_pixel_clk);
+               udelay(5000);
+               /* Get integer portion of divider */
+               div = clk_get_rate(clk_get_parent(g_pixel_clk[disp])) /
+                       rounded_pixel_clk;
+               ipu_di_data_wave_config(disp, SYNC_WAVE, div - 1, div - 1);
+       } else {
+               clk_set_rate(g_pixel_clk[disp], clk_get_rate(g_ipu_clk));
+               div = 1;
+               ipu_di_data_wave_config(disp, SYNC_WAVE, 0, 0);
+               di_gen |= (6 << 24);
+               di_gen |= DI_GEN_DI_CLK_EXT;
+       }
        ipu_di_data_pin_config(disp, SYNC_WAVE, DI_PIN15, 3, 0, div * 2);
 
        map = ipu_pixfmt_to_map(pixel_fmt);
@@ -963,8 +974,6 @@ int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk,
                return -EINVAL;
        }
 
-       di_gen = __raw_readl(DI_GENERAL(disp));
-
        if (sig.interlaced) {
                /* Setup internal HSYNC waveform */
                ipu_di_sync_config(