SPI, DMA and an i.MX31
Wolf, Rene, HRO-GP
rene.wolf at mbda-systems.de
Thu Sep 24 06:51:54 EDT 2009
Hi all.
Yesterday I was trying to reorganize the newly added sdma stuff. Up till
then it was just a dirty hack, now it got better structure. As I don't
know much on the organization of the kernel I cannot say if I did it the
right way. As a template I tried to match the structure of the dma driver
for the mx1/mx2 SoCs.
@Andy
The drivers/mmc/host/mxcmmc.c from 2.6.31 uses some different dma api: all
those fkt start with 'imx_', the sdma's from the ltib have a 'mxc' prefix.
I tried to match them and wrap those 'mxc' in defines, mapping them to the
'imx' ones. Unfortunately for some fkts I didn't find a matching 'mxc' one.
The driver compiles, but I guess it's pretty useless the way it is. May be
I should have looked to the driver version in ltib, instead.
After that I tried to register a SDMA channel with a device. As far as I
can see that works. The Registered channel shows under
'/proc/sdma/channels'. Freeing that also works.
Next: Will try to start a SDMA transfer with SPI.
ToDo: One with found knowledge about that should check if the new stuff
is placed correctly. Then there seams to be effort to define a global
DMA interface, for more than buffer allocation (at least for the i.MX
series). So the SDMA stuff should be made complaint with that (I guess
those 'imx' fkts are ones to go). Further there are structures that are
passed to some of the SDMA functions to set up a transfer for a device.
Those structures are incomplete. For my test I added one for CSPI3 TX in
8Bit mode. For all other cspi in all other modes, they are missing. There
should be some for 8/16/32 bit for cspi 1/2/3 in rx/tx direction.
@Bill and Magnus
Would it be ok if there was an assembler for the sdma, and the 'firmware'
could be in assembler? (I don't know how this would work, just curious :-)
Thanks again! Unfortunately by next Monday I'm out of time. Hopefully I
will be able to post the stuff I've done so far, on this list. Together
with an evaluation if the current port 'works' or not.
Cheers
Rene
Rene Wolf
LFK-Lenkflugkörpersysteme GmbH
Human Resources Operations & Policy, HRO
Landshuter Straße 26, 85716 Unterschleißheim, GERMANY
Phone: +49 89 3179 8337
Fax: +49 8252 99 8964
E-Mail: rene.wolf at mbda-systems.de
http://www.mbda.net
Chairman of the Supervisory Board: Antoine Bouvier
Managing Director: Werner Kaltenegger
Registered Office: Schrobenhausen
Commercial Register: Amtsgericht Ingolstadt, HRB 4365
More information about the linux-arm-kernel
mailing list