summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/ti_hdmi.h
diff options
context:
space:
mode:
authorMythri P K <mythripk@ti.com>2011-09-08 19:06:26 +0530
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-09-30 16:16:34 +0300
commit60634a28bc5467ade316574c4aa728c5bff7947e (patch)
tree61f6c6f5b3ebf78bd69316d462d618d39b50697d /drivers/video/omap2/dss/ti_hdmi.h
parent176b578b1a0e1b7ccdc746c3962f2a56aaf45456 (diff)
OMAP4: DSS2: HDMI: Function pointer approach to call
HDMI IP fundamentally has replaceable core PHY and PLL blocks. These blocks might vary across OMAP's but the end functionality such as to enable or disable PLL, PHY, function to read EDID would remain the same. Thus to make the current hdmi DSS driver compatible with different OMAP's having different IP blocks( A combination of different core, PHY, PLL blocks), function pointer approach is introduced. With function pointer, relevant IP dependent functions are mapped to the generic functions used by DSS during the initialization based on the OMAP compiled. Thus making hdmi DSS driver IP agnostic. Signed-off-by: Mythri P K <mythripk@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/ti_hdmi.h')
-rw-r--r--drivers/video/omap2/dss/ti_hdmi.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/ti_hdmi.h b/drivers/video/omap2/dss/ti_hdmi.h
index 823fbe655b8..acf10226770 100644
--- a/drivers/video/omap2/dss/ti_hdmi.h
+++ b/drivers/video/omap2/dss/ti_hdmi.h
@@ -21,6 +21,8 @@
#ifndef _TI_HDMI_H
#define _TI_HDMI_H
+struct hdmi_ip_data;
+
enum hdmi_pll_pwr {
HDMI_PLLPWRCMD_ALLOFF = 0,
HDMI_PLLPWRCMD_PLLONLY = 1,
@@ -82,12 +84,31 @@ struct hdmi_pll_info {
enum hdmi_clk_refsel refsel;
};
+struct ti_hdmi_ip_ops {
+
+ void (*video_configure)(struct hdmi_ip_data *ip_data);
+
+ int (*phy_enable)(struct hdmi_ip_data *ip_data);
+
+ void (*phy_disable)(struct hdmi_ip_data *ip_data);
+
+ int (*read_edid)(struct hdmi_ip_data *ip_data,
+ u8 *pedid, u16 max_length);
+
+ int (*pll_enable)(struct hdmi_ip_data *ip_data);
+
+ void (*pll_disable)(struct hdmi_ip_data *ip_data);
+
+ void (*video_enable)(struct hdmi_ip_data *ip_data, bool start);
+};
+
struct hdmi_ip_data {
void __iomem *base_wp; /* HDMI wrapper */
unsigned long core_sys_offset;
unsigned long core_av_offset;
unsigned long pll_offset;
unsigned long phy_offset;
+ const struct ti_hdmi_ip_ops *ops;
struct hdmi_config cfg;
struct hdmi_pll_info pll_data;
};