summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2013-04-01 16:52:27 +0800
committerLiu Ying <Ying.Liu@freescale.com>2013-04-03 15:22:21 +0800
commite71d3d328a886113c7edbd52573ea20a79ac613f (patch)
treed0117b714069d5443e9b9ddff37e0c63b10bdf03
parent31e5761b2e4094385627ea37c27a550b27310e30 (diff)
ENGR00256918 IPUv3 common:Correct CSI_PRP_MEM disable routine
For both CSI_MEMx and CSI_PRP_VF(ENC)_MEM capture channels, we disable them with the following sequence: 1) Wait for an idmac channel eof interrupt. 2) Disable CSI by clearing CSIx_EN in IPU_CONF register. 3) Disable idmac channel by clearing relevant bit in IPU_IDMAC_CH_EN_1 register and other settings. However, currently, we don't do 3) until CSI_PRP_VF(ENC)_MEM's idmac channel being not busy by a while loop check. In case, an external sensor is plugged out from the system or the sensor is somehow broken, we will be unable to get out of that infinite while loop. Since this check is unnecessary(we've already waited for an idmac eof interrupt), this patch simply removes it from the disable routine of CSI_PRP_VF(ENC)_MEM channel. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit 8136a50bd049d68f92604397f256e6067ef2b572)
-rw-r--r--drivers/mxc/ipu3/ipu_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mxc/ipu3/ipu_common.c b/drivers/mxc/ipu3/ipu_common.c
index 5afb60142b3f..9c47cd91ff3f 100644
--- a/drivers/mxc/ipu3/ipu_common.c
+++ b/drivers/mxc/ipu3/ipu_common.c
@@ -2191,7 +2191,8 @@ int32_t ipu_disable_channel(struct ipu_soc *ipu, ipu_channel_t channel, bool wai
}
}
}
- } else if (wait_for_stop && !_ipu_is_smfc_chan(out_dma)) {
+ } else if (wait_for_stop && !_ipu_is_smfc_chan(out_dma) &&
+ channel != CSI_PRP_VF_MEM && channel != CSI_PRP_ENC_MEM) {
while (idma_is_set(ipu, IDMAC_CHA_BUSY, in_dma) ||
idma_is_set(ipu, IDMAC_CHA_BUSY, out_dma) ||
(ipu->sec_chan_en[IPU_CHAN_ID(channel)] &&