summaryrefslogtreecommitdiff
path: root/arch/arm/imx-common
diff options
context:
space:
mode:
authorEric Benard <eric@eukrea.com>2014-04-04 19:05:56 +0200
committerStefano Babic <sbabic@denx.de>2014-04-15 12:23:57 +0200
commite688a99c07337738dba9fb22a05b9d33eaac597c (patch)
tree049cf3d9ad3e8f404dd24e18fd56a387a64d9abc /arch/arm/imx-common
parent3cbeb0f004db555c58e81de24e23ff0b84d46ddc (diff)
imx-common/video: add detect_hdmi
this function is used by several board together with board_video_skip to detect if hdmi is plugged is order to select the display to use. So move it in imx-common to share it. Signed-off-by: Eric BĂ©nard <eric@eukrea.com>
Diffstat (limited to 'arch/arm/imx-common')
-rw-r--r--arch/arm/imx-common/video.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/imx-common/video.c b/arch/arm/imx-common/video.c
index 098239a716..0121cd78f2 100644
--- a/arch/arm/imx-common/video.c
+++ b/arch/arm/imx-common/video.c
@@ -53,3 +53,13 @@ int board_video_skip(void)
return 0;
}
+
+#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