On Fri, Mar 08, 2019 at 08:22:26PM +0000, Trent Piepho wrote: > On Fri, 2019-03-08 at 12:16 +0000, Mark Brown wrote: > > though, can't we handle this by adjusting the decision function? Though > > there's an unfortunate system load/performance tradeoff... If we can't > > do that then I think a runtime control with a device property in sysfs > > would be a good idea as well. > The module parameter is writable, so it is a runtime control in sysfs, > /sys/module/spi_imx/parameters/use_dma. It's also settable on boot via > command line "spi_imx.use_dma=0". Very handy if you have a kernel > driver that will use spi on init, which a custom sysfs device attr > wouldn't address, since it couldn't be set. A device tree attribute > could be used, but this is Linux configuration, not hardware layout, > and shouldn't go into the device tree. Oh, cool - I hadn't realized that those sysfs files were writeable. Nice! > I also found another reason to not use DMA: qemu can't emulate imx SPI > when it uses DMA. It works for PIO. So being able to add > spi_imx.use_dma=0 to the kernel command line when booting the kernel in > qemu is very handy! Right, and qemu won't tell the guest it's qemu either :(
Attachment:
signature.asc
Description: PGP signature