blob: e9fd9553cfe7dbbe02ae7f436875ed42f0513650 [file] [log] [blame]
Eric Nelson99e2dc52013-03-09 07:06:09 +00001/*
2 * Copyright (C) 2012 Boundary Devices Inc.
3 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02004 * SPDX-License-Identifier: GPL-2.0+
Eric Nelson99e2dc52013-03-09 07:06:09 +00005 */
6#include <common.h>
7#include <asm/arch/imx-regs.h>
8#include <asm/arch/mxc_hdmi.h>
9#include <asm/io.h>
10
11static int do_hdmidet(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
12{
13 struct hdmi_regs *hdmi = (struct hdmi_regs *)HDMI_ARB_BASE_ADDR;
Robert Winkler10f779d2013-07-23 15:07:56 -070014 return (readb(&hdmi->phy_stat0) & HDMI_DVI_STAT) ? 0 : 1;
Eric Nelson99e2dc52013-03-09 07:06:09 +000015}
16
17U_BOOT_CMD(hdmidet, 1, 1, do_hdmidet,
18 "detect HDMI monitor",
19 ""
20);