]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00261419 MX6Q HDMI CEC: Unit test failed put TV to powerdown.
authorSandor Yu <R01008@freescale.com>
Wed, 10 Jul 2013 07:45:50 +0000 (15:45 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:14:14 +0000 (14:14 +0200)
TV will been setting powerdown state when first run HDMI CEC unit
test on MX6Q, but failed in the secondly run and loop in print
message:
sleep for ready!
sleep for ready!
sleep for ready!
...

It is cause by cec interrupter been enabled before interrupter
polarity setting, controler will received fake interrupter,
and cec unit test will get wrong device state.

Fix the issue with move interrupter polarity setting code before
interrupter enabled.

Signed-off-by: Sandor Yu <R01008@freescale.com>
drivers/mxc/hdmi-cec/mxc_hdmi-cec.c

index 011fc33ab17e17112f95a0927a7a9221d03cd467..1764623816f20bddb176433266e49d0a9eb14905 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2012-2013 Freescale Semiconductor, Inc. All Rights Reserved.
  */
 
 /*
@@ -381,11 +381,11 @@ static long hdmi_cec_ioctl(struct file *filp, u_int cmd,
                val &= ~HDMI_MC_CLKDIS_CECCLK_DISABLE;
                hdmi_writeb(val, HDMI_MC_CLKDIS);
                hdmi_writeb(0x02, HDMI_CEC_CTRL);
+               val = HDMI_IH_CEC_STAT0_ERROR_INIT | HDMI_IH_CEC_STAT0_NACK | HDMI_IH_CEC_STAT0_EOM | HDMI_IH_CEC_STAT0_DONE;
+               hdmi_writeb(val, HDMI_CEC_POLARITY);
                val = HDMI_IH_CEC_STAT0_WAKEUP | HDMI_IH_CEC_STAT0_ERROR_FOLL | HDMI_IH_CEC_STAT0_ARB_LOST;
                hdmi_writeb(val, HDMI_CEC_MASK);
                hdmi_writeb(val, HDMI_IH_MUTE_CEC_STAT0);
-               val = HDMI_IH_CEC_STAT0_ERROR_INIT | HDMI_IH_CEC_STAT0_NACK | HDMI_IH_CEC_STAT0_EOM | HDMI_IH_CEC_STAT0_DONE;
-               hdmi_writeb(val, HDMI_CEC_POLARITY);
                mutex_lock(&hdmi_cec_data.lock);
                hdmi_cec_data.cec_state = true;
                mutex_unlock(&hdmi_cec_data.lock);