From: "Eric Bénard" <eric@eukrea.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/8] imx-common/video: add detect_hdmi
Date: Wed, 2 Apr 2014 21:57:47 +0200 [thread overview]
Message-ID: <1396468670-29774-5-git-send-email-eric@eukrea.com> (raw)
In-Reply-To: <1396468670-29774-1-git-send-email-eric@eukrea.com>
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>
---
arch/arm/imx-common/video.c | 10 ++++++++++
arch/arm/include/asm/imx-common/video.h | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/arch/arm/imx-common/video.c b/arch/arm/imx-common/video.c
index 8db5a84..a65da5e 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
diff --git a/arch/arm/include/asm/imx-common/video.h b/arch/arm/include/asm/imx-common/video.h
index e0c4ef4..2d94850 100644
--- a/arch/arm/include/asm/imx-common/video.h
+++ b/arch/arm/include/asm/imx-common/video.h
@@ -17,4 +17,8 @@ struct display_info_t {
struct fb_videomode mode;
};
+#ifdef CONFIG_IMX_HDMI
+extern int detect_hdmi(struct display_info_t const *dev);
+#endif
+
#endif
--
1.9.0
next prev parent reply other threads:[~2014-04-02 19:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 19:57 [U-Boot] [PATCH 1/8] imx-common: add board_video_skip Eric Bénard
2014-04-02 19:57 ` [U-Boot] [PATCH 2/8] nitrogen6x: use common board_video_skip Eric Bénard
2014-04-04 0:57 ` Eric Nelson
2014-04-02 19:57 ` [U-Boot] [PATCH 3/8] mx6sabresd: " Eric Bénard
2014-04-02 19:57 ` [U-Boot] [PATCH 4/8] RiOTboard and MarSBoard: add new boards support Eric Bénard
2014-04-04 10:12 ` Stefano Babic
2014-04-04 14:51 ` selsinork at gmail.com
2014-04-04 17:08 ` Eric Bénard
2014-04-02 19:57 ` Eric Bénard [this message]
2014-04-02 19:57 ` [U-Boot] [PATCH 6/8] nitrogen6x: use common detect_hdmi Eric Bénard
2014-04-04 0:47 ` Eric Nelson
2014-04-02 19:57 ` [U-Boot] [PATCH 7/8] mx6sabresd: " Eric Bénard
2014-04-02 19:57 ` [U-Boot] [PATCH 8/8] embest/mx6boards: " Eric Bénard
2014-04-04 10:05 ` [U-Boot] [PATCH 1/8] imx-common: add board_video_skip Stefano Babic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1396468670-29774-5-git-send-email-eric@eukrea.com \
--to=eric@eukrea.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.