From: David Brownell Date: Thu, 24 May 2007 03:46:12 +0000 (-0700) Subject: omap2_mcspi fixes + cleanups X-Git-Tag: v2.6.22-omap1~112 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fc39f1f2f1f9998dd6d237e1de911020ba819fc;p=pandora-kernel.git omap2_mcspi fixes + cleanups McSPI functional updates: - Implement the spi_transfer.delay_usecs mechanism (previously omitted). - Remove strange per-device 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 --- Reading git-diff-tree failed