Continuing the topic of slave DMA functionality on SuperH, using the shdma.c dmaengine driver, patches have been developed and
submitted, adding DMA functionality to the SuperH sh-sci.c serial driver. I started by implementing the transmit direction, and even if that proved to be not very simple, there at least you know in advance the amount of data you're going to send. In the receive case, however, it becomes even more interesting, because we don't know the amount of data that's arriving, and the DMA controller on SH will only trigger an interrupt, when it has filled the receive buffer. So, unless you use a one-byte large buffer, you will not be informed of smaller than your buffer size transactions. So, eventually, I had to use an interrupt on the serial controller to detect the beginning of incoming data, and then use a timer to see, if fewer than buffer size bytes have arrived. In the latter case those bytes have to be collected from the DMA driver forcibly, for which there is currently no support in the dmaengine API. Therefore I had to extend and use the .device_terminate_all() method to retrieve the number of transferred bytes in the incomplete transaction. Review in process...