Hello HAOUAS Elyes, David Hendricks, Stefan Reinauer,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/flashrom/+/33649
to review the following change.
Change subject: spi25: Fix layering violation in default_spi_write_aai() ......................................................................
spi25: Fix layering violation in default_spi_write_aai()
Change-Id: I8aa3e2992f64906edc669060936f9522d32637fb Signed-off-by: Nico Huber nico.h@gmx.de --- M it87spi.c M spi25.c M wbsio_spi.c 3 files changed, 2 insertions(+), 16 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/49/33649/1
diff --git a/it87spi.c b/it87spi.c index df9f664..13b3aae 100644 --- a/it87spi.c +++ b/it87spi.c @@ -115,7 +115,7 @@ .multicommand = default_spi_send_multicommand, .read = it8716f_spi_chip_read, .write_256 = it8716f_spi_chip_write_256, - .write_aai = default_spi_write_aai, + .write_aai = spi_chip_write_1, };
static uint16_t it87spi_probe(uint16_t port) diff --git a/spi25.c b/spi25.c index fd87dc9..06e451f 100644 --- a/spi25.c +++ b/spi25.c @@ -766,20 +766,6 @@ JEDEC_AAI_WORD_PROGRAM, };
- switch (flash->mst->spi.type) { -#if CONFIG_INTERNAL == 1 -#if defined(__i386__) || defined(__x86_64__) - case SPI_CONTROLLER_IT87XX: - case SPI_CONTROLLER_WBSIO: - msg_perr("%s: impossible with this SPI controller," - " degrading to byte program\n", __func__); - return spi_chip_write_1(flash, buf, start, len); -#endif -#endif - default: - break; - } - /* The even start address and even length requirements can be either * honored outside this function, or we can call spi_byte_program * for the first and/or last byte and use AAI for the rest. diff --git a/wbsio_spi.c b/wbsio_spi.c index ccd227b..d7651c0 100644 --- a/wbsio_spi.c +++ b/wbsio_spi.c @@ -72,7 +72,7 @@ .multicommand = default_spi_send_multicommand, .read = wbsio_spi_read, .write_256 = spi_chip_write_1, - .write_aai = default_spi_write_aai, + .write_aai = spi_chip_write_1, };
int wbsio_check_for_spi(void)
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/33649 )
Change subject: spi25: Fix layering violation in default_spi_write_aai() ......................................................................
Patch Set 1: Code-Review+2
Cherry-picked from https://review.coreboot.org/c/flashrom/+/19419
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/33649 )
Change subject: spi25: Fix layering violation in default_spi_write_aai() ......................................................................
Patch Set 1: Code-Review+2
Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/c/flashrom/+/33649 )
Change subject: spi25: Fix layering violation in default_spi_write_aai() ......................................................................
spi25: Fix layering violation in default_spi_write_aai()
Change-Id: I8aa3e2992f64906edc669060936f9522d32637fb Signed-off-by: Nico Huber nico.h@gmx.de Reviewed-on: https://review.coreboot.org/c/flashrom/+/33649 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Arthur Heymans arthur@aheymans.xyz --- M it87spi.c M spi25.c M wbsio_spi.c 3 files changed, 2 insertions(+), 16 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved Arthur Heymans: Looks good to me, approved
diff --git a/it87spi.c b/it87spi.c index df9f664..13b3aae 100644 --- a/it87spi.c +++ b/it87spi.c @@ -115,7 +115,7 @@ .multicommand = default_spi_send_multicommand, .read = it8716f_spi_chip_read, .write_256 = it8716f_spi_chip_write_256, - .write_aai = default_spi_write_aai, + .write_aai = spi_chip_write_1, };
static uint16_t it87spi_probe(uint16_t port) diff --git a/spi25.c b/spi25.c index cca2a04..611cd72 100644 --- a/spi25.c +++ b/spi25.c @@ -743,20 +743,6 @@ JEDEC_AAI_WORD_PROGRAM, };
- switch (flash->mst->spi.type) { -#if CONFIG_INTERNAL == 1 -#if defined(__i386__) || defined(__x86_64__) - case SPI_CONTROLLER_IT87XX: - case SPI_CONTROLLER_WBSIO: - msg_perr("%s: impossible with this SPI controller," - " degrading to byte program\n", __func__); - return spi_chip_write_1(flash, buf, start, len); -#endif -#endif - default: - break; - } - /* The even start address and even length requirements can be either * honored outside this function, or we can call spi_byte_program * for the first and/or last byte and use AAI for the rest. diff --git a/wbsio_spi.c b/wbsio_spi.c index ccd227b..d7651c0 100644 --- a/wbsio_spi.c +++ b/wbsio_spi.c @@ -72,7 +72,7 @@ .multicommand = default_spi_send_multicommand, .read = wbsio_spi_read, .write_256 = spi_chip_write_1, - .write_aai = default_spi_write_aai, + .write_aai = spi_chip_write_1, };
int wbsio_check_for_spi(void)