Initial Contribution
msm-2.6.38: tag AU_LINUX_ANDROID_GINGERBREAD.02.03.04.00.142
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
diff --git a/drivers/video/msm/hdmi_msm.h b/drivers/video/msm/hdmi_msm.h
new file mode 100644
index 0000000..41c756f
--- /dev/null
+++ b/drivers/video/msm/hdmi_msm.h
@@ -0,0 +1,84 @@
+/* Copyright (c) 2010-2011, Code Aurora Forum. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 and
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __HDMI_MSM_H__
+#define __HDMI_MSM_H__
+
+#include <mach/msm_iomap.h>
+#include "external_common.h"
+/* #define PORT_DEBUG */
+
+#ifdef PORT_DEBUG
+const char *hdmi_msm_name(uint32 offset);
+void hdmi_outp(uint32 offset, uint32 value);
+uint32 hdmi_inp(uint32 offset);
+
+#define HDMI_OUTP_ND(offset, value) outpdw(MSM_HDMI_BASE+(offset), (value))
+#define HDMI_OUTP(offset, value) hdmi_outp((offset), (value))
+#define HDMI_INP_ND(offset) inpdw(MSM_HDMI_BASE+(offset))
+#define HDMI_INP(offset) hdmi_inp((offset))
+#else
+#define HDMI_OUTP_ND(offset, value) outpdw(MSM_HDMI_BASE+(offset), (value))
+#define HDMI_OUTP(offset, value) outpdw(MSM_HDMI_BASE+(offset), (value))
+#define HDMI_INP_ND(offset) inpdw(MSM_HDMI_BASE+(offset))
+#define HDMI_INP(offset) inpdw(MSM_HDMI_BASE+(offset))
+#endif
+
+#define QFPROM_BASE ((uint32)hdmi_msm_state->qfprom_io)
+
+struct hdmi_msm_state_type {
+ boolean panel_power_on;
+ boolean hpd_initialized;
+#ifdef CONFIG_SUSPEND
+ boolean pm_suspended;
+#endif
+ int hpd_stable;
+ boolean hpd_prev_state;
+ boolean hpd_cable_chg_detected;
+ boolean full_auth_done;
+ boolean hpd_during_auth;
+ struct work_struct hpd_state_work, hpd_read_work;
+ struct timer_list hpd_state_timer;
+ struct completion ddc_sw_done;
+
+#ifdef CONFIG_FB_MSM_HDMI_MSM_PANEL_HDCP_SUPPORT
+ boolean hdcp_activating;
+ boolean reauth ;
+ struct work_struct hdcp_reauth_work, hdcp_work;
+ struct completion hdcp_success_done;
+ struct timer_list hdcp_timer;
+#endif /* CONFIG_FB_MSM_HDMI_MSM_PANEL_HDCP_SUPPORT */
+
+ int irq;
+ struct msm_hdmi_platform_data *pd;
+ struct clk *hdmi_app_clk;
+ struct clk *hdmi_m_pclk;
+ struct clk *hdmi_s_pclk;
+ void __iomem *qfprom_io;
+ void __iomem *hdmi_io;
+
+ struct external_common_state_type common;
+};
+
+extern struct hdmi_msm_state_type *hdmi_msm_state;
+
+uint32 hdmi_msm_get_io_base(void);
+
+#ifdef CONFIG_FB_MSM_HDMI_COMMON
+void hdmi_phy_reset(void);
+void hdmi_msm_init_phy(int video_format);
+void hdmi_msm_powerdown_phy(void);
+void hdmi_frame_ctrl_cfg(const struct hdmi_disp_mode_timing_type *timing);
+void hdmi_msm_phy_status_poll(void);
+#endif
+
+#endif /* __HDMI_MSM_H__ */