SPI: Fix and enable Fast Read support
- Fix handling of 5-byte Fast Read command in the ICH SPI driver. This fix is ported from the U-boot driver. - Allow CONFIG_SPI_FLASH_NO_FAST_READ to be overridden by defining a name for the bool in Kconfig and removing the forced select in southbridge config - Fix use of CONFIG_SPI_FLASH_NO_FAST_READ in SPI drivers to use #if instead of #ifdef - Relocate flash functions in SMM so they are usable. This really only needs to happen for read function pointer since it uses a global function rather than a static one from the chip, but it is good to ensure the rest are set up correctly as well. Change-Id: Ic1bb0764cb111f96dd8a389d83b39fe8f5e72fbd Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: http://review.coreboot.org/1775 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
committed by
Ronald G. Minnich
parent
a571c70c14
commit
23b0053586
@@ -154,7 +154,7 @@ static int gigadevice_write(struct spi_flash *flash, u32 offset,
|
||||
cmd[3] = offset & 0xff;
|
||||
#if CONFIG_DEBUG_SPI_FLASH
|
||||
printk(BIOS_SPEW,
|
||||
"PP gigadevice.c: %#p => cmd = { %#02x %#02x%02x%02x }"
|
||||
"PP gigadevice.c: 0x%p => cmd = { 0x%02x 0x%02x%02x%02x }"
|
||||
" chunk_len = %zu\n", buf + actual,
|
||||
cmd[0], cmd[1], cmd[2], cmd[3], chunk_len);
|
||||
#endif
|
||||
@@ -226,7 +226,7 @@ struct spi_flash *spi_flash_probe_gigadevice(struct spi_slave *spi, u8 *idcode)
|
||||
|
||||
stm->flash.write = gigadevice_write;
|
||||
stm->flash.erase = gigadevice_erase;
|
||||
#ifdef CONFIG_SPI_FLASH_NO_FAST_READ
|
||||
#if CONFIG_SPI_FLASH_NO_FAST_READ
|
||||
stm->flash.read = spi_flash_cmd_read_slow;
|
||||
#else
|
||||
stm->flash.read = spi_flash_cmd_read_fast;
|
||||
|
Reference in New Issue
Block a user