diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-28 06:00:33 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-10-16 06:44:00 -0400 |
commit | 6fa44907eef4aed168413b6883ddc1fa2efff201 (patch) | |
tree | 1ccb802688a6430f6420a154b87ba1a6d816549f | |
parent | bd81ed0818875e233a3d400cc3c70454a0a53c08 (diff) |
OMAPDSS: HDMI: use omapdss_version
Use omapdss_version in hdmi.c to select the proper hdmi features.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/omap2/dss/dss_features.c | 14 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.h | 3 | ||||
-rw-r--r-- | drivers/video/omap2/dss/hdmi.c | 3 |
3 files changed, 16 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index 5936ba78c14a..e2c2e2b8218a 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c | |||
@@ -825,10 +825,20 @@ static const struct ti_hdmi_ip_ops omap4_hdmi_functions = { | |||
825 | 825 | ||
826 | }; | 826 | }; |
827 | 827 | ||
828 | void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data) | 828 | void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data, |
829 | enum omapdss_version version) | ||
829 | { | 830 | { |
830 | if (cpu_is_omap44xx()) | 831 | switch (version) { |
832 | case OMAPDSS_VER_OMAP4430_ES1: | ||
833 | case OMAPDSS_VER_OMAP4430_ES2: | ||
834 | case OMAPDSS_VER_OMAP4: | ||
831 | ip_data->ops = &omap4_hdmi_functions; | 835 | ip_data->ops = &omap4_hdmi_functions; |
836 | break; | ||
837 | default: | ||
838 | ip_data->ops = NULL; | ||
839 | } | ||
840 | |||
841 | WARN_ON(ip_data->ops == NULL); | ||
832 | } | 842 | } |
833 | #endif | 843 | #endif |
834 | 844 | ||
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h index 14a412ea8dc6..fc492ef72a51 100644 --- a/drivers/video/omap2/dss/dss_features.h +++ b/drivers/video/omap2/dss/dss_features.h | |||
@@ -125,6 +125,7 @@ bool dss_has_feature(enum dss_feat_id id); | |||
125 | void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end); | 125 | void dss_feat_get_reg_field(enum dss_feat_reg_field id, u8 *start, u8 *end); |
126 | void dss_features_init(enum omapdss_version version); | 126 | void dss_features_init(enum omapdss_version version); |
127 | #if defined(CONFIG_OMAP4_DSS_HDMI) | 127 | #if defined(CONFIG_OMAP4_DSS_HDMI) |
128 | void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data); | 128 | void dss_init_hdmi_ip_ops(struct hdmi_ip_data *ip_data, |
129 | enum omapdss_version version); | ||
129 | #endif | 130 | #endif |
130 | #endif | 131 | #endif |
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c index a48a7dd75b33..adcc906d12f8 100644 --- a/drivers/video/omap2/dss/hdmi.c +++ b/drivers/video/omap2/dss/hdmi.c | |||
@@ -323,6 +323,7 @@ static void hdmi_runtime_put(void) | |||
323 | 323 | ||
324 | static int __init hdmi_init_display(struct omap_dss_device *dssdev) | 324 | static int __init hdmi_init_display(struct omap_dss_device *dssdev) |
325 | { | 325 | { |
326 | struct omap_dss_board_info *pdata = hdmi.pdev->dev.platform_data; | ||
326 | int r; | 327 | int r; |
327 | 328 | ||
328 | struct gpio gpios[] = { | 329 | struct gpio gpios[] = { |
@@ -333,7 +334,7 @@ static int __init hdmi_init_display(struct omap_dss_device *dssdev) | |||
333 | 334 | ||
334 | DSSDBG("init_display\n"); | 335 | DSSDBG("init_display\n"); |
335 | 336 | ||
336 | dss_init_hdmi_ip_ops(&hdmi.ip_data); | 337 | dss_init_hdmi_ip_ops(&hdmi.ip_data, pdata->version); |
337 | 338 | ||
338 | if (hdmi.vdda_hdmi_dac_reg == NULL) { | 339 | if (hdmi.vdda_hdmi_dac_reg == NULL) { |
339 | struct regulator *reg; | 340 | struct regulator *reg; |