AnsweredAssumed Answered

mxc_spi, dma and m25p80

Question asked by Wouter Vanhauwaert on Oct 11, 2013
Latest reply on Mar 3, 2014 by Yixing Kong



First of all, I'm using kernel 2.6.35 from the maintain branch of freescale.


I have a custom board based on IMX53 (industrial graded, 800Mhz). On this, I added an SPI nor flash (m25p32).

In the config I added all necessary drivers for it. It gets detected okay and I thought everything was ok. Until I wanted to use it.

Seems like everything coming from it is garbage (in linux).

I checked everything with a scope and seems like incoming and outgoing data is ok. (verifyed by writing something and reading it back). However, it gets lost somewhere else.

This is where I start digging into the code and stumbled upon a check "master_drv_data->usedma"; which checked if a IORESOURCE_DMA is defined. As it is, it continues assuming it has DMA.


To check if it had some influence,  in arch/arm/mach_mx5/devices.c, I commented out everything of DMA in mxcspi1_resources and mxcspi1_device and recompiled, so that it wouldnt be used by mxc_spi.

Now it works flawlessly!


I'm a bit worried though. How does it come that it doesn't work with DMA? Do I have to configure something somewhere else? Do I need extra files/drivers?