-
David Brownell authored
McSPI functional updates: - Implement the spi_transfer.delay_usecs mechanism (previously omitted). - Remove strange per-device <asm/arch/mcspi.h> hookery ... it's not even correct as a per-device config. We *always* want "single channel" mode (in "keep chipselect active" mode); and if we used "turbo", it would be a per-transfer option (as an rx-only double buffering tweak). - When enabling/disabling a channel, old value is irrelevant; don't read. - Sanity check spi->mode bits, and reject ones we don't support. - Streamline DMA channel selection: do it once during probe(), using static tables; smaller, faster. OMAP 2430 still needs changes here, minimally for the third SPI controller. (Board init should change too, to not assume all SPI controllers are used on every board...) - Remove #ifdefs around doing reset on driver startup ... enable clocks so we can do that (!), and turn on auto-idle. - Waste less time enabling/disabling the clocks while working the queue. - Flag DMA channels as freed when we do so ... so they can't get reused later (when another driver may own them). - Minor PIO fix: don't need to verify TX side completed except for TX_ONLY mode, since RX completed implies TX completed. - Remove bogus code which always dropped chipselect after the last RX_ONLY word (rather than leaving it enabled). - Move error checks out of work loop into setup() and transfer(), so that they're reported ASAP rather than as mysterious transfer errors). Plus a handful of cleanups: whitespace fixes, comments. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
7fc39f1f