From: Sandor Yu Date: Wed, 10 Jul 2013 07:45:50 +0000 (+0800) Subject: ENGR00261419 MX6Q HDMI CEC: Unit test failed put TV to powerdown. X-Git-Tag: v3.0.35-fsl_4.1.0~27 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=882b93ba1c5da624199b3ed2fba298679a92fc34;p=karo-tx-linux.git ENGR00261419 MX6Q HDMI CEC: Unit test failed put TV to powerdown. 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 --- diff --git a/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c b/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c index 011fc33ab17e..1764623816f2 100644 --- a/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c +++ b/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c @@ -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);