]> git.karo-electronics.de Git - linux-beck.git/commitdiff
OMAPDSS: hdmi_wp: Protect reserved bits in hdmi_wp_audio_config_format()
authorJyri Sarha <jsarha@ti.com>
Tue, 4 Nov 2014 16:58:27 +0000 (18:58 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 26 Nov 2014 08:41:07 +0000 (10:41 +0200)
Only OMAP4 DSS has non reserved bits above 6th bit in HDMI_WP_AUDIO_CFG.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/omap2/dss/hdmi_wp.c

index 496327e2b21b877b4448e90fe47478f772d41871..71b499ec33f65bf86ed6d15bf4e2c8f418919b07 100644 (file)
@@ -194,8 +194,12 @@ void hdmi_wp_audio_config_format(struct hdmi_wp_data *wp,
        DSSDBG("Enter hdmi_wp_audio_config_format\n");
 
        r = hdmi_read_reg(wp->base, HDMI_WP_AUDIO_CFG);
-       r = FLD_MOD(r, aud_fmt->stereo_channels, 26, 24);
-       r = FLD_MOD(r, aud_fmt->active_chnnls_msk, 23, 16);
+       if (omapdss_get_version() == OMAPDSS_VER_OMAP4430_ES1 ||
+           omapdss_get_version() == OMAPDSS_VER_OMAP4430_ES2 ||
+           omapdss_get_version() == OMAPDSS_VER_OMAP4) {
+               r = FLD_MOD(r, aud_fmt->stereo_channels, 26, 24);
+               r = FLD_MOD(r, aud_fmt->active_chnnls_msk, 23, 16);
+       }
        r = FLD_MOD(r, aud_fmt->en_sig_blk_strt_end, 5, 5);
        r = FLD_MOD(r, aud_fmt->type, 4, 4);
        r = FLD_MOD(r, aud_fmt->justification, 3, 3);