For debugging purpose, we are trying to read the CSI RXFIFO 'manually', from code placed in mx6c_capture.c. We know the DMA is no longer running and there is data in the RXFIFO as DDRY is set.
The problem is the calls to csi_read() at address CSI_RFIFO return the same two 32bit values (which are valid), and the DDRY flag is never reset, even though the camera is no longer sending any data. So we are not emptying the FIFO.
CSI_RFIFO = Address: 32E2_0000h base + 10h offset = 32E2_0010h.
So it looks as if CSI_RFIFO is cached, or somehow we cannot empty the FIFO from the CPU. None of which make sense, nor match the Ref Manual, page 3992.
Questions:
* Why can't we read CSI_RFIFO from CPU?
* How can we read the content of the RXFIFO from CPU?
* Is there an undocumented register to know what the FIFO level is?
We have placed the code to read in function mx6s_csi_irq_handler() at a point where we know the DMA is no longer reading from the FIFO.
static inline int csi_read(struct mx6s_csi_dev *csi, unsigned int offset)
{
return __raw_readl(csi->regbase + offset);
}