summaryrefslogtreecommitdiff
path: root/src/drivers/spi/Kconfig
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2014-03-21 19:13:34 -0700
committerMarc Jones <marc.jones@se-eng.com>2014-12-17 04:51:21 +0100
commitf101bbe4f07b154cb58212a2913112e6ffbce4d0 (patch)
tree3f928672d62fcd96c323e36253a0f25bc92f71a2 /src/drivers/spi/Kconfig
parent4213b970ce3d8451e7bac19433c2109cc4aac04e (diff)
spi_flash: Differentiate between atomic/manual sequencing
This adds a wrapper function and a Kconfig variable to differentiate between SPI controllers which use atomic cycle sequencing versus those where the transaction sequence is controlled manually. Currently this boils down to x86 vs. non-x86. Yes, it's hideous. The current API only worked because, for better or worse, x86 platforms have been homogeneous in this regard since they started using SPI as an alternative to FWH for boot flash. Now that we have non-x86 platforms which use general purpose SPI controllers, we should overhaul the entire SPI infrastructure to be more adaptable. BUG=none BRANCH=none TEST=tested on nyan and link Signed-off-by: David Hendricks <dhendrix@chromium.org> Original-Change-Id: If8ccc9400a9d04772a195941a42bc82d5ecc1958 Original-Reviewed-on: https://chromium-review.googlesource.com/195283 Original-Reviewed-by: David Hendricks <dhendrix@chromium.org> Original-Commit-Queue: David Hendricks <dhendrix@chromium.org> Original-Tested-by: David Hendricks <dhendrix@chromium.org> (cherry picked from commit 4170c59d06206667755402712083452da9fcd941) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: I54e2d3d9f9a0153a56f7a51b80f6ee6d997ad358 Reviewed-on: http://review.coreboot.org/7828 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/drivers/spi/Kconfig')
-rw-r--r--src/drivers/spi/Kconfig10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/drivers/spi/Kconfig b/src/drivers/spi/Kconfig
index f96bf9f88b..cc8703f3fb 100644
--- a/src/drivers/spi/Kconfig
+++ b/src/drivers/spi/Kconfig
@@ -26,6 +26,16 @@ config SPI_FLASH
if SPI_FLASH
+config SPI_ATOMIC_SEQUENCING
+ bool
+ default y if ARCH_X86
+ default n if !ARCH_X86
+ help
+ Select this option if the SPI controller uses "atomic sequencing."
+ Atomic sequencing is when the sequence of commands is pre-programmed
+ in the SPI controller. Hardware manages the transaction instead of
+ software. This is common on x86 platforms.
+
config SPI_FLASH_MEMORY_MAPPED
bool
default y if ARCH_X86