<lvrp16>
well that was a lot of head banging over 3 days. stuck on the 0 data on the DMA RX buffer.
<lvrp16>
seems randomly RX DMA just fails and returns empty data.
<lvrp16>
1 success for every 4 failures.
<f_>
how unreliable 🙃
<lvrp16>
maybe lack of skills :D
<f_>
or documentation :D
<lvrp16>
fracking hell, it was because of this line from the DMA patch... "spicc->tx_dma += len;"
<lvrp16>
3 damn days :D
<lvrp16>
why would he increment the DMA???
<lvrp16>
*sigh* fml
<f_[x]>
Must've been a week until I figured out I was writing to the wrong register at some point :D
<f_[x]>
You are not alone
<xdarklight>
lvrp16: good catch! it took me a days to realize I accidentally used ffs(BIT(30)) (whose result is 31) instead of __ffs(BIT(30)) (whose result is 30) - the worst thing: I wrote that code myself ;-)
<xdarklight>
lvrp16: also there's "spicc->rx_dma += len;" in case you haven't seen that yet (not sure if it's a problem or not)
jacobk has quit [Ping timeout: 248 seconds]
jacobk has joined #linux-amlogic
<lvrp16>
It is a problem. I spent days looking over registers and fifos and interrupts.
<lvrp16>
Otherwise would have been done 3 days ago.
<lvrp16>
But now PIO works for every power of 2 + every byte aligned. DMA works for every byte aligned.