rockchip: video: Correct HDMI data source selection
authorSimon Glass <sjg@chromium.org>
Sun, 13 Nov 2016 21:21:55 +0000 (14:21 -0700)
committerSimon Glass <sjg@chromium.org>
Sat, 26 Nov 2016 00:59:30 +0000 (17:59 -0700)
This code currently always selects the second source. It only worked
because both sources are set up.

With the change to only init video devices that are present in the stdout
environment variable, this fails. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/video/rockchip/rk_hdmi.c

index 7976c5e26376985633dca22ece6f7f47df5ae47b..72142dc0f6a9ec6178e714af2b82e2a5a363043e 100644 (file)
@@ -899,7 +899,8 @@ static int rk_hdmi_probe(struct udevice *dev)
        rk_setreg(&priv->grf->soc_con6, 1 << 15);
 
        /* hdmi data from vop id */
-       rk_setreg(&priv->grf->soc_con6, (vop_id == 1) ? (1 << 4) : (1 << 4));
+       rk_clrsetreg(&priv->grf->soc_con6, 1 << 4,
+                    (vop_id == 1) ? (1 << 4) : 0);
 
        ret = hdmi_wait_for_hpd(priv->regs);
        if (ret < 0) {