From 424bb4a9c4d95f39f84c355c34015f69c8c547c4 Mon Sep 17 00:00:00 2001 From: Sandor Yu Date: Wed, 10 Jul 2013 15:45:50 +0800 Subject: 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 --- drivers/mxc/hdmi-cec/mxc_hdmi-cec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- cgit v1.2.3