Hi,<br><br>I've been playing with spi on mpc8313e and have some things on spi-fsl-spi.c:<br><br>Is QE useful on 8313? <br>I've tried it (using cpu-qe in my dts file) and see in the boot log that it is used, but I do not really see any effect when it comes to performance or cpu usage.<br>
<br>Furthermore:<br>In the fsl_spi_cpu_irq there is a line:<br> /* Clear the events */<br> mpc8xxx_spi_write_reg(®_base->event, events);<br><br>Is this really useful? The 8313 book says NE is cleared upon reading and NF is cleared upon writing.<br>
(this might apply to fsl_spi_cpm_irq too, I do not have info on cpm.<br><br>Next, I noticed some spacing between two spi words being sent. It seems the transmit buffer is not filled when possible, but only when a word is received (and the previous word is transmitted). By modifying the code somewhat I was able to roughly double the effective transfer rate in my test setup (8 Mhz spi clock, 32 bit transfers). Attached is my changed code. Feedback on it is appreciated.<br>
<br>This patch also eliminated the spinning until TX is done. (actually I am not sure if this will happen, I would expect NE and NF to be raised roughly at the same time.<br><br>Thanks for any feedback!<br><br>Frans Meulenbroeks<br>
<br>PS:it would probably be nice if in board setup one could also set the (default) value of bits-per-word.<br>