Hi all,
SD card writes data with EDMA mode, and privacy mask uses EDMA too, Around an hour kernel will crash , EDMA channel of sd is 26 and 27, my kernel is montavista 2.6.18 and cpu is DM368
Crash occurs at dma_irq_handler in dma.c, log is as below.
CPU: 0
PC is at 0x14
LR is at dma_irq_handler+0xbc/0x160
pc : [<00000014>] lr : [<c0044e60>] Not tainted
sp : c38b9f00 ip : 00000014 fp : c38b9f2c
r10: 00000001 r9 : 00000000 r8 : 00000000
r7 : 00000004 r6 : fbc02000 r5 : 0000004b r4 : 08000008
r3 : 00000000 r2 : 00000015 r1 : 00000001 r0 : 0000004a
So i add printk in dma_irq_handler as following
lch = 0;
while (status_l) {
status_l = dma_read(EDMA_SH_IPR(0)) & dma_read(EDMA_SH_IER(0));
i = ffs(status_l);
lch += i;
/*
* If the user has not given any callback function
* while requesting the TCC, its TCC specific bit
* in the IPR register will NOT be cleared.
*/
if (intr_data[lch - 1].callback) {
/* Clear the corresponding IPR bits */
SET_REG_VAL(1 << (lch - 1), EDMA_SH_ICR(0));
#if 1
printk("ch=%d, callback=%p, data=%p\n",
lch,
intr_data[lch - 1].callback,
intr_data[lch - 1].data);
#endif
/* Call the callback function now */
dma_handle_cb(lch - 1, DMA_COMPLETE);
}
status_l >>= i;
}
I am surprise to find lch is over 63 sometimes , log is as below
ch=75, callback=00000014, data=00000015