Nico Huber has uploaded a new change for review. ( https://review.coreboot.org/19420 )
Change subject: spi25: Fix layering violation in probe_spi_rdid4() ......................................................................
spi25: Fix layering violation in probe_spi_rdid4()
Change-Id: Idd21d20465cb214f3ff5bf3267b9014f8beee3f3 Signed-off-by: Nico Huber nico.h@gmx.de --- M it87spi.c M spi25.c M wbsio_spi.c 3 files changed, 4 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/20/19420/1
diff --git a/it87spi.c b/it87spi.c index c9e35dd..09793de 100644 --- a/it87spi.c +++ b/it87spi.c @@ -113,7 +113,7 @@
static const struct spi_master spi_master_it87xx = { .type = SPI_CONTROLLER_IT87XX, - .max_data_read = MAX_DATA_UNSPECIFIED, + .max_data_read = 3, .max_data_write = MAX_DATA_UNSPECIFIED, .command = it8716f_spi_send_command, .multicommand = default_spi_send_multicommand, diff --git a/spi25.c b/spi25.c index 717e57d..ad32c7e 100644 --- a/spi25.c +++ b/spi25.c @@ -172,21 +172,12 @@ /* Some SPI controllers do not support commands with writecnt=1 and * readcnt=4. */ - switch (flash->mst->spi.type) { -#if CONFIG_INTERNAL == 1 -#if defined(__i386__) || defined(__x86_64__) - case SPI_CONTROLLER_IT87XX: - case SPI_CONTROLLER_WBSIO: + if (flash->mst->spi.max_data_read < 4) { msg_cinfo("4 byte RDID not supported on this SPI controller\n"); return 0; - break; -#endif -#endif - default: + } else { return probe_spi_rdid_generic(flash, 4); } - - return 0; }
int probe_spi_rems(struct flashctx *flash) diff --git a/wbsio_spi.c b/wbsio_spi.c index d103152..577a7d1 100644 --- a/wbsio_spi.c +++ b/wbsio_spi.c @@ -70,7 +70,7 @@
static const struct spi_master spi_master_wbsio = { .type = SPI_CONTROLLER_WBSIO, - .max_data_read = MAX_DATA_UNSPECIFIED, + .max_data_read = 3, .max_data_write = MAX_DATA_UNSPECIFIED, .command = wbsio_spi_send_command, .multicommand = default_spi_send_multicommand,