On Tue, Oct 15, 2013 at 1:52 PM, Mark Brown <[email protected]> wrote: > On Tue, Oct 15, 2013 at 06:33:23PM +0000, Gupta, Pekon wrote: > >> Therefore early suggestions were to make 'MM_MODE' as default >> (if device enables it via DT). This means: >> (1) switch to 'SPI_MODE' _only_ when required for commands like >> mtd_erase, etc. and switch back to 'MM_MODE' when done. >> (2) And keep your controller clocks on. > > This sounds like a policy decision, I don't see any reason for it to be > in DT. What works well with one application stack may not be the best > choice for another and future developments may change what's most > sensible for a given system, it shouldn't be fixed in the DT.
I could see the driver using the transfer size to decide, memory mapped or SPI with DMA. Small transfers via memory mapped access and larger would use DMA. The spi-mxs driver does this to decide PIO or DMA. The threshold size is hard coded in the driver. If you wanted to be able to change it, I would think a sysfs attribute would be the way to do that. It does get tricky when you're dealing with flash roms, as people often want to boot from those really fast, so you want the kernel to know how to use them in the fastest way before it boots as opposed to after booting when it's obviously too late to configure the kernel to boot faster. ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk _______________________________________________ spi-devel-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spi-devel-general
