coreboot/src
Vadim Bendebury c101ae306d ipq8064: modify SPI controller driver to work in coreboot
A typical SPI operation consists of two phases - command and data
transfers. Command transfer is always from the host to the chip (i.e.
is going in the 'write' direction), data transfer could be either read
or write.

We don't want the receive FIFO to be operating while the command phase
is in progress. A simple way to keep the receive FIFO shut down is to
not to enable it until the command phase is completed.

Selective control of the receive FIFO allows to consolidate the
receive and transmit functions in a single spi_xfer() function, as it
happens in other SPI controller drivers.

The FIFO FULL and FIFO NOT EMPTY conditions are used to decide if the
next byte can be written or received, respectively. While data is
being received the 0xFF bytes are transmitted per each received byte,
to keep the SPI bus clocking.

The data structure describing the three GSBI ports is moved from the
.h file into .c file. A version of the clrsetbits macro is added to
work with integer addresses instead of pointers.

BUG=chrome-os-partner:27784
TEST=not yet, but with the res of the changes the bootblock loads and
     starts the rombase section successfully.

Change-Id: I78cd0054f1a8f5e1d7213f38ef8de31486238aba
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/197779
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2014-05-06 05:54:31 +00:00
..
arch ipq8064: storm: re-arrange bootblock initialization 2014-05-02 00:42:07 +00:00
console ipq8064: make UART driver work in bootblock 2014-04-25 01:51:13 +00:00
cpu haswell: Update microcode revision 2014-04-30 10:00:25 +00:00
device pnp: Allow searching PNP device by port and device ID. 2014-04-29 03:11:19 +00:00
drivers elog: Use the RTC driver interface instead of reading CMOS directly. 2014-05-03 00:01:59 +00:00
ec i2c: Replace the i2c API. 2014-04-10 06:05:01 +00:00
include rtc: Add an RTC API, and implement it for x86. 2014-05-02 23:55:47 +00:00
lib ipq8064: SOC UART driver belongs in the SOC directory 2014-04-25 01:48:11 +00:00
mainboard Rambi: Set SOC_DISP_ON as GPIO to avoid LCD_VCC glitch 2014-05-05 22:25:28 +00:00
northbridge cmos: Rename the CMOS related functions. 2014-05-02 23:55:44 +00:00
soc ipq8064: modify SPI controller driver to work in coreboot 2014-05-06 05:54:31 +00:00
southbridge rtc: Add an RTC API, and implement it for x86. 2014-05-02 23:55:47 +00:00
superio pnp: Allow setting of misc register 0xf4 in device tree 2013-12-20 00:37:38 +00:00
vendorcode chromeos: Add empty functions when CONFIG_CHROMEOS is disabled 2014-04-23 02:47:40 +00:00
Kconfig armv8: add support for armv8 cpu 2014-01-07 02:48:47 +00:00