From 6b9b540922433e710e1d488281ccb2b787413f4f Mon Sep 17 00:00:00 2001 From: Liu Ying Date: Tue, 13 Nov 2012 14:42:27 +0800 Subject: [PATCH] ENGR00233380 IPUv3:Warn on sub-CPMEM EBA0 unalignment case IPUv3 CPMEM EBA sets buffer start address. EBA should be 8-byte aligned according to IPUv3 spec. This patch contains code change only to warn on alternative CPMEM entry's EBA0 unalignment case. Signed-off-by: Liu Ying (cherry picked from commit 1a2f3dc6340d5cf93f2e4bcd5a9d4395fcc18cf1) --- drivers/mxc/ipu3/ipu_param_mem.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/mxc/ipu3/ipu_param_mem.h b/drivers/mxc/ipu3/ipu_param_mem.h index 68c6654b25ed..1387c4948446 100644 --- a/drivers/mxc/ipu3/ipu_param_mem.h +++ b/drivers/mxc/ipu3/ipu_param_mem.h @@ -477,13 +477,17 @@ static inline void _ipu_ch_param_init(struct ipu_soc *ipu, int ch, dev_dbg(ipu->dev, "initializing idma ch %d @ %p\n", ch, ipu_ch_param_addr(ipu, ch)); fill_cpmem(ipu, ch, ¶ms); if (addr2) { - ipu_ch_param_set_field(¶ms, 1, 0, 29, addr2 >> 3); - ipu_ch_param_set_field(¶ms, 1, 29, 29, 0); - sub_ch = __ipu_ch_get_third_buf_cpmem_num(ch); if (sub_ch <= 0) return; + ipu_ch_param_set_field(¶ms, 1, 0, 29, addr2 >> 3); + ipu_ch_param_set_field(¶ms, 1, 29, 29, 0); + if (addr2%8) + dev_warn(ipu->dev, + "IDMAC%d's sub-CPMEM entry%d EBA0 is not " + "8-byte aligned\n", ch, sub_ch); + dev_dbg(ipu->dev, "initializing idma ch %d @ %p sub cpmem\n", ch, ipu_ch_param_addr(ipu, sub_ch)); fill_cpmem(ipu, sub_ch, ¶ms); -- 2.39.5