[spi] Add address-length autodetection to the SPI bit-bashing code master
authorMichael Brown <mcb30@etherboot.org>
Thu, 28 May 2009 13:45:32 +0000 (14:45 +0100)
committerMichael Brown <mcb30@etherboot.org>
Thu, 28 May 2009 18:32:03 +0000 (19:32 +0100)
commit92a9978b4403628345ca03ba4edc7641352460fa
tree02626e7d3a3970b7b14cb4dd6f76211c447057cf
parent8afafb65322a3fec01206720a1d8be4083e9c0d6
[spi] Add address-length autodetection to the SPI bit-bashing code

Several SPI chips will respond to an SPI read command with a dummy
zero bit immediately prior to the first real data bit.  This can be
used to autodetect the address length, provided that the command
length and data length are already known, and that the MISO data line
is tied high.

Tested-by: Thomas Miletich <thomas.miletich@gmail.com>
Debugged-by: Thomas Miletich <thomas.miletich@gmail.com>
src/drivers/bitbash/spi_bit.c
src/drivers/nvs/threewire.c
src/include/gpxe/spi.h
src/include/gpxe/threewire.h