summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2019-03-18 23:29:31 +0100
committerStefano Babic <sbabic@denx.de>2019-04-13 20:30:09 +0200
commit57f065fee2a421085621a34097ccbc45fc18aad5 (patch)
treea92b9a942cc122c187571435655cd622dec8a141 /arch/arm
parent01b7e8f6d4878c1b095627a70f1f10afb4db8078 (diff)
video: ipuv3: add DM_VIDEO support
Extend the driver to build with DM_VIDEO enabled. DTS files must additionally include 'u-boot,dm-pre-reloc' property in soc and ipu nodes to enable driver binding to ipu device. Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/include/asm/mach-imx/video.h1
-rw-r--r--arch/arm/mach-imx/video.c25
2 files changed, 19 insertions, 7 deletions
diff --git a/arch/arm/include/asm/mach-imx/video.h b/arch/arm/include/asm/mach-imx/video.h
index 812e6f85e4..d1a14ad7d3 100644
--- a/arch/arm/include/asm/mach-imx/video.h
+++ b/arch/arm/include/asm/mach-imx/video.h
@@ -26,4 +26,5 @@ extern size_t display_count;
#endif
int ipu_set_ldb_clock(int rate);
+int ipu_displays_init(void);
#endif
diff --git a/arch/arm/mach-imx/video.c b/arch/arm/mach-imx/video.c
index 953fe53cb4..22a371a212 100644
--- a/arch/arm/mach-imx/video.c
+++ b/arch/arm/mach-imx/video.c
@@ -4,6 +4,17 @@
#include <linux/errno.h>
#include <asm/mach-imx/video.h>
+#ifdef CONFIG_IMX_HDMI
+#include <asm/arch/mxc_hdmi.h>
+#include <asm/io.h>
+
+int detect_hdmi(struct display_info_t const *dev)
+{
+ struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
+ return readb(&hdmi->phy_stat0) & HDMI_DVI_STAT;
+}
+#endif
+
int board_video_skip(void)
{
int i;
@@ -42,6 +53,11 @@ int board_video_skip(void)
displays[i].mode.name,
displays[i].mode.xres,
displays[i].mode.yres);
+
+#ifdef CONFIG_IMX_HDMI
+ if (!strcmp(displays[i].mode.name, "HDMI"))
+ imx_enable_hdmi_phy();
+#endif
} else
printf("LCD %s cannot be configured: %d\n",
displays[i].mode.name, ret);
@@ -53,12 +69,7 @@ int board_video_skip(void)
return ret;
}
-#ifdef CONFIG_IMX_HDMI
-#include <asm/arch/mxc_hdmi.h>
-#include <asm/io.h>
-int detect_hdmi(struct display_info_t const *dev)
+int ipu_displays_init(void)
{
- struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
- return readb(&hdmi->phy_stat0) & HDMI_DVI_STAT;
+ return board_video_skip();
}
-#endif