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>
This commit is contained in:
parent
3cbeb0f004
commit
e688a99c07
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user