]> git.karo-electronics.de Git - linux-beck.git/commitdiff
OMAPDSS: HDMI: use omapdss_version
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 28 Sep 2012 10:00:33 +0000 (13:00 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 16 Oct 2012 10:44:00 +0000 (13:44 +0300)
Use omapdss_version in hdmi.c to select the proper hdmi features.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/dss_features.c
drivers/video/omap2/dss/dss_features.h
drivers/video/omap2/dss/hdmi.c

index 5936ba78c14adbc1b90b7656995dcd0c25cef2a3..e2c2e2b8218a4a34dea6b83658bccec20e032fde 100644 (file)
@@ -825,10 +825,20 @@ static const struct ti_hdmi_ip_ops omap4_hdmi_functions = {
 
 };
 
-void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data)
+void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data,
+               enum omapdss_version version)
 {
-       if (cpu_is_omap44xx())
+       switch (version) {
+       case OMAPDSS_VER_OMAP4430_ES1:
+       case OMAPDSS_VER_OMAP4430_ES2:
+       case OMAPDSS_VER_OMAP4:
                ip_data->ops = &omap4_hdmi_functions;
+               break;
+       default:
+               ip_data->ops = NULL;
+       }
+
+       WARN_ON(ip_data->ops == NULL);
 }
 #endif
 
index 14a412ea8dc6cae56dd93a9c10dac78eb340dcf4..fc492ef72a51b35f523b09a7c8622cbd3103851c 100644 (file)
@@ -125,6 +125,7 @@ bool dss_has_feature(enum dss_feat_id id);
 void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end);
 void dss_features_init(enum omapdss_version version);
 #if defined(CONFIG_OMAP4_DSS_HDMI)
-void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data);
+void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data,
+               enum omapdss_version version);
 #endif
 #endif
index a48a7dd75b3303a3bba28e10b01e4c1f133c00d3..adcc906d12f860fee01fce8089d2cce253960a73 100644 (file)
@@ -323,6 +323,7 @@ static void hdmi_runtime_put(void)
 
 static int __init hdmi_init_display(struct omap_dss_device *dssdev)
 {
+       struct omap_dss_board_info *pdata = hdmi.pdev->dev.platform_data;
        int r;
 
        struct gpio gpios[] = {
@@ -333,7 +334,7 @@ static int __init hdmi_init_display(struct omap_dss_device *dssdev)
 
        DSSDBG("init_display\n");
 
-       dss_init_hdmi_ip_ops(&hdmi.ip_data);
+       dss_init_hdmi_ip_ops(&hdmi.ip_data, pdata->version);
 
        if (hdmi.vdda_hdmi_dac_reg == NULL) {
                struct regulator *reg;