Hello all. This is my first post to this list so let me say first
thank you for such rich linux support. I am very happy using the L137
and L138 with davinci-linux at present and I'm excited to go further
with this platform. I am interested in the idea of HW access to the
SoC components on the DA8xx processors from the DSP side. I would
greatly appreciate any insight the experts on this list have to offer.

This email to the list was spurred by the post "davinci: da8xx/omapl
EVM: Specify reserved channels/slots" by Sudhakar Rajashekhara.
Previous to this post my colleagues and I were under the impression
that any and all HW access should be done on the Linux side. Linux
provides a nice interface which makes our programs portable, access
control which makes our programs stable, and a plethora of facilities
for debugging and experiment which makes our programmers happy. But
there are sometimes applications (of which ours is an example, so we
believe) where the framework of the Linux kernel impedes our
development and threatens our portability.

We noticed in the recent post by Sudhakar that it is somehow
'supported' to handle DMA events on the DSP side. This makes a lot of
sense in retrospect and it spurs us to reconsider whether we can or
cannot access HW in general from the DSP side.

For the sake of discussion let's say that we would like to use the SPI
controller from the DSP. I think this is a good example since there
are clearly Linux drivers for this device and also ready userspace
access. If we wanted to read data from the SPI controller on some
interrupt we could register an interrupt handler in DSP/BIOS and have
rock-solid interrupt latencies without patching the kernel with
real-time support or doing any fancy driver writing for linux. Our
interrupt handler could do some heavy filtering and then pass the
bytes on to userspace via dsplink. It doesn't seem safe to just
blindly access the SPI controller while it is registered with linux
since the /dev/spi devices could cause hardware access which at the
whim of anyone logged in to the host with access to the /dev/ entry --
so we would need to prevent that SPI controller from getting a linux
driver. We had reasoned that although it might be possible to create
our own board setup routine that simply does not register the SPI
controller platform resources it might result in an unmaintainable
position in the future when we update kernel sources. We thought that
the davinci-linux kernel was geared for hardware access exclusively
from the Linux side and that we couldn't predict the effects of that
assumption on future versions of the kernel.

So the recent post piqued our interest once again in the subject of HW
access from the DSP side. It appears that registering interrupt
handlers -- as I understand, codecs -- on the DSP side is a supported
use-case. Is accessing hardware from these handlers also supported?
How could we protect from having the clock of a controller suppressed
if it were accessed only from the DSP side? We would greatly
appreciate your expert opinions on this matter.

Best Regards,

Ben Gardiner
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to