On Saturday 22 November 2008, Daniel Ribeiro wrote: > > - You should make ezx_pcap_write() and ezx_pcap_read() switch > > over to spi_write_then_read(), to ensure it's never doing > > DMA to/from the stack. I see a byte-order dependency too... > > I tried spi_write_then_read before, but it didn't work. I supposed it > was because it was doing 2 transfers as the second transfer rx_buf > always came zeroed.
You may have been using it wrong. Also, verify against current kernels ... there have been bugfixes to pxa2xx_spi. > I see that commit > f9b90e39cbc5c4d6ef60022fd1f25d541df0aad1 changed it to do a single > transfer, so i will try it again. Unless it needs the full duplex capability of SPI, then you should be able to make write_then_read work ... on the other hand, if you do need full duplex, then you should address the DMA. (And byteswapping, either way.) > > - If you're going to mark the probe() as __devinit, then mark > > the remove() as __devexit and use __devexit_p() in the driver > > struct. > > Ok. Shouldn't i use __init instead? I wouldn't. There are ways that the probe() could be called more than once -- e.g. after rebinding either of the relevant SPI drivers through sysfs, or after rmmod/modprobe of the SPI master controller driver -- and using an __init annotation would make that point to memory that's unlikely to still hold that code. - Dave ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ spi-devel-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spi-devel-general
