coreboot-kgpe-d16/src/soc/qualcomm/ipq806x
Furquan Shaikh c2973d196d spi: Get rid of SPI_ATOMIC_SEQUENCING
SPI_ATOMIC_SEQUENCING was added to accomodate spi flash controllers with
the ability to perform tx and rx of flash command and response at the
same time. Instead of introducing this notion at SPI flash driver layer,
clean up the interface to SPI used by flash.

Flash uses a command-response kind of communication. Thus, even though
SPI is duplex, flash command needs to be sent out on SPI bus and then
flash response should be received on the bus. Some specialized x86
flash controllers are capable of handling command and response in a
single transaction.

In order to support all the varied cases:
1. Add spi_xfer_vector that takes as input a vector of SPI operations
and calls back into SPI controller driver to process these operations.
2. In order to accomodate flash command-response model, use two vectors
while calling into spi_xfer_vector -- one with dout set to
non-NULL(command) and other with din set to non-NULL(response).
3. For specialized SPI flash controllers combine two successive vectors
if the transactions look like a command-response pair.
4. Provide helper functions for common cases like supporting only 2
vectors at a time, supporting n vectors at a time, default vector
operation to cycle through all SPI op vectors one by one.

BUG=chrome-os-partner:59832
BRANCH=None
TEST=Compiles successfully

Change-Id: I4c9e78c585ad95c40c0d5af078ff8251da286236
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17681
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-12-23 04:54:55 +01:00
..
include/soc spi: Pass pointer to spi_slave structure in spi_setup_slave 2016-12-05 03:28:06 +01:00
blobs_init.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
cbmem.c ipq806x/storm: Return NULL for cbmem_top if DRAM is not initialized 2016-03-29 22:37:01 +02:00
clock.c src/soc: Add required space before opening parenthesis '(' 2016-08-31 20:09:42 +02:00
gpio.c Remove empty lines at end of file 2015-06-08 00:55:07 +02:00
gsbi.c arm(64): Globally replace writel(v, a) with write32(a, v) 2015-04-21 08:22:28 +02:00
i2c.c ipq806x: i2c: stop transfer as soon as an error is reported 2015-04-21 08:16:12 +02:00
Kconfig spi: Get rid of SPI_ATOMIC_SEQUENCING 2016-12-23 04:54:55 +01:00
lcc.c arm(64): Globally replace writel(v, a) with write32(a, v) 2015-04-21 08:22:28 +02:00
Makefile.inc qualcomm/storm: Add required files to enable elog in ramstage 2016-07-28 00:38:25 +02:00
mbn_header.h tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
qup.c arm(64): Manually clean up the mess left by write32() transition 2015-04-21 08:22:40 +02:00
soc.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
spi.c spi: Define and use spi_ctrlr structure 2016-12-05 03:29:04 +01:00
timer.c ipq806x: Change all SoC headers to <soc/headername.h> system 2015-04-08 09:34:44 +02:00
tz_wrapper.S ipq806x: Load TZBSP blob from coreboot ramstage 2015-04-15 21:56:56 +02:00
uart.c Documentation: Fix doxygen errors 2016-07-12 22:41:02 +02:00
usb.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00