]> git.sur5r.net Git - u-boot/blobdiff - drivers/video/ipu_disp.c
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
[u-boot] / drivers / video / ipu_disp.c
index 4faeafb6351d4d3e75376e704b479ebad4a3c6b3..5c7722962d7b448e42f42fa52ad79535cc5ab14d 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Porting to u-boot:
  *
@@ -7,15 +8,13 @@
  * Linux IPU driver for MX51:
  *
  * (C) Copyright 2005-2010 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /* #define DEBUG */
 
 #include <common.h>
 #include <linux/types.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
@@ -611,11 +610,9 @@ void ipu_dp_dc_enable(ipu_channel_t channel)
        uint32_t reg;
        uint32_t dc_chan;
 
-       if (channel == MEM_FG_SYNC)
-               dc_chan = 5;
        if (channel == MEM_DC_SYNC)
                dc_chan = 1;
-       else if (channel == MEM_BG_SYNC)
+       else if ((channel == MEM_BG_SYNC) || (channel == MEM_FG_SYNC))
                dc_chan = 5;
        else
                return;
@@ -1119,7 +1116,7 @@ int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk,
                reg &= 0x0000FFFF;
                __raw_writel(reg, DI_STP_REP(disp, 6));
                __raw_writel(0, DI_STP_REP(disp, 7));
-               __raw_writel(0, DI_STP_REP(disp, 9));
+               __raw_writel(0, DI_STP_REP9(disp));
 
                /* Init template microcode */
                if (disp) {