drm: omapdrm: hdmi: Pass HDMI core version as integer to HDMI audio
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 11 Aug 2017 13:49:04 +0000 (16:49 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 16 Aug 2017 09:52:41 +0000 (12:52 +0300)
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: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/dss/hdmi4.c
drivers/gpu/drm/omapdrm/dss/hdmi5.c
drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c
drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c
include/sound/omap-hdmi-audio.h
sound/soc/omap/omap-hdmi-audio.c

index 438f47d8ab69e66158a7b7fcf5dfa8432ec95e48..4c131d7102829dc8e76e8c70e33f0807a17b3d8a 100644 (file)
@@ -667,7 +667,7 @@ static int hdmi_audio_register(struct device *dev)
 {
        struct omap_hdmi_audio_pdata pdata = {
                .dev = dev,
-               .dss_version = omapdss_get_version(),
+               .version = 4,
                .audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp),
                .ops = &hdmi_audio_ops,
        };
index 8ab76b50662aa37ee13994c6892f5266a21e55fa..a6adddeee5bbc360033fc58ae597e61b4e297799 100644 (file)
@@ -694,7 +694,7 @@ static int hdmi_audio_register(struct device *dev)
 {
        struct omap_hdmi_audio_pdata pdata = {
                .dev = dev,
-               .dss_version = omapdss_get_version(),
+               .version = 5,
                .audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp),
                .ops = &hdmi_audio_ops,
        };
index 156a254705ea5e090bbd1e3c1915adb96264e238..ec78d61bc55122e3fca807a55f612ba740f077ce 100644 (file)
@@ -664,7 +664,7 @@ static int hdmi_audio_register(struct device *dev)
 {
        struct omap_hdmi_audio_pdata pdata = {
                .dev = dev,
-               .dss_version = omapdss_get_version(),
+               .version = 4,
                .audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp),
                .ops = &hdmi_audio_ops,
        };
index 4da36bcab97798c370971731c0541772b357378c..2e2fcc3d6d4f7b7ade7edcea0bb24463f062f799 100644 (file)
@@ -695,7 +695,7 @@ static int hdmi_audio_register(struct device *dev)
 {
        struct omap_hdmi_audio_pdata pdata = {
                .dev = dev,
-               .dss_version = omapdss_get_version(),
+               .version = 5,
                .audio_dma_addr = hdmi_wp_get_audio_dma_addr(&hdmi.wp),
                .ops = &hdmi_audio_ops,
        };
index 1df2ff61a4dd95dda25c5962a6335cc6fb9ca44f..0e495ed8872ee14750c6647edf169ccc2946144b 100644 (file)
@@ -39,7 +39,7 @@ struct omap_hdmi_audio_ops {
 /* HDMI audio initalization data */
 struct omap_hdmi_audio_pdata {
        struct device *dev;
-       enum omapdss_version dss_version;
+       unsigned int version;
        phys_addr_t audio_dma_addr;
 
        const struct omap_hdmi_audio_ops *ops;
index 888133f9e65d0188def0b7cb374621d940a0b1b8..3e9cc4842a1db14c2e8b0dc0a60dd462305f07aa 100644 (file)
@@ -337,14 +337,11 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev)
        ad->dma_data.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
        mutex_init(&ad->current_stream_lock);
 
-       switch (ha->dss_version) {
-       case OMAPDSS_VER_OMAP4430_ES1:
-       case OMAPDSS_VER_OMAP4430_ES2:
-       case OMAPDSS_VER_OMAP4:
+       switch (ha->version) {
+       case 4:
                dai_drv = &omap4_hdmi_dai;
                break;
-       case OMAPDSS_VER_OMAP5:
-       case OMAPDSS_VER_DRA7xx:
+       case 5:
                dai_drv = &omap5_hdmi_dai;
                break;
        default: