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>
master
Eric Benard 11 years ago committed by Stefano Babic
parent 3cbeb0f004
commit e688a99c07
  1. 10
      arch/arm/imx-common/video.c
  2. 4
      arch/arm/include/asm/imx-common/video.h

@ -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…
Cancel
Save