Commit d20fa5a0 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Tomi Valkeinen

drm: omapdrm: hdmi: Pass HDMI core version as integer to HDMI audio

The HDMI audio driver only needs to know which generation of HDMI
transmitter it deals with, not the detailed SoC model. Pass the version
number as an integer to prepare for removal of the OMAP SoC version from
the omapdrm driver.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Acked-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent fe16bc51
...@@ -667,7 +667,7 @@ static int hdmi_audio_register(struct device *dev) ...@@ -667,7 +667,7 @@ static int hdmi_audio_register(struct device *dev)
{ {
struct omap_hdmi_audio_pdata pdata = { struct omap_hdmi_audio_pdata pdata = {
.dev = dev, .dev = dev,
.dss_version = omapdss_get_version(), .version = 4,
.audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp), .audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp),
.ops = &hdmi_audio_ops, .ops = &hdmi_audio_ops,
}; };
......
...@@ -694,7 +694,7 @@ static int hdmi_audio_register(struct device *dev) ...@@ -694,7 +694,7 @@ static int hdmi_audio_register(struct device *dev)
{ {
struct omap_hdmi_audio_pdata pdata = { struct omap_hdmi_audio_pdata pdata = {
.dev = dev, .dev = dev,
.dss_version = omapdss_get_version(), .version = 5,
.audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp), .audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp),
.ops = &hdmi_audio_ops, .ops = &hdmi_audio_ops,
}; };
......
...@@ -664,7 +664,7 @@ static int hdmi_audio_register(struct device *dev) ...@@ -664,7 +664,7 @@ static int hdmi_audio_register(struct device *dev)
{ {
struct omap_hdmi_audio_pdata pdata = { struct omap_hdmi_audio_pdata pdata = {
.dev = dev, .dev = dev,
.dss_version = omapdss_get_version(), .version = 4,
.audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp), .audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp),
.ops = &hdmi_audio_ops, .ops = &hdmi_audio_ops,
}; };
......
...@@ -695,7 +695,7 @@ static int hdmi_audio_register(struct device *dev) ...@@ -695,7 +695,7 @@ static int hdmi_audio_register(struct device *dev)
{ {
struct omap_hdmi_audio_pdata pdata = { struct omap_hdmi_audio_pdata pdata = {
.dev = dev, .dev = dev,
.dss_version = omapdss_get_version(), .version = 5,
.audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp), .audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp),
.ops = &hdmi_audio_ops, .ops = &hdmi_audio_ops,
}; };
......
...@@ -39,7 +39,7 @@ struct omap_hdmi_audio_ops { ...@@ -39,7 +39,7 @@ struct omap_hdmi_audio_ops {
/* HDMI audio initalization data */ /* HDMI audio initalization data */
struct omap_hdmi_audio_pdata { struct omap_hdmi_audio_pdata {
struct device *dev; struct device *dev;
enum omapdss_version dss_version; unsigned int version;
phys_addr_t audio_dma_addr; phys_addr_t audio_dma_addr;
const struct omap_hdmi_audio_ops *ops; const struct omap_hdmi_audio_ops *ops;
......
...@@ -337,14 +337,11 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev) ...@@ -337,14 +337,11 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev)
ad->dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; ad->dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
mutex_init(&ad->current_stream_lock); mutex_init(&ad->current_stream_lock);
switch (ha->dss_version) { switch (ha->version) {
case OMAPDSS_VER_OMAP4430_ES1: case 4:
case OMAPDSS_VER_OMAP4430_ES2:
case OMAPDSS_VER_OMAP4:
dai_drv = &omap4_hdmi_dai; dai_drv = &omap4_hdmi_dai;
break; break;
case OMAPDSS_VER_OMAP5: case 5:
case OMAPDSS_VER_DRA7xx:
dai_drv = &omap5_hdmi_dai; dai_drv = &omap5_hdmi_dai;
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment