mail.coreboot.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
List overview
Download
flashrom-gerrit
October 2017
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
flashrom-gerrit@flashrom.org
1 participants
392 discussions
Start a n
N
ew thread
Change in flashrom[staging]: spi25: Introduce spi_simple_write_cmd()
by Nico Huber (Code Review)
15 Oct '17
15 Oct '17
Nico Huber has uploaded this change for review. (
https://review.coreboot.org/22018
Change subject: spi25: Introduce spi_simple_write_cmd() ...................................................................... spi25: Introduce spi_simple_write_cmd() spi_simple_write_cmd() executes WREN plus a single byte write and polls WIP afterwards. It's used to replace current spi_erase_chip_*() imple- mentations. Change-Id: Ib244356fa471e15863b52e6037899d19113cb4a9 Signed-off-by: Nico Huber <nico.h(a)gmx.de> --- M flash.h M spi25.c 2 files changed, 29 insertions(+), 93 deletions(-) git pull ssh://review.coreboot.org:29418/flashrom refs/changes/18/22018/1 diff --git a/flash.h b/flash.h index dfda9d2..52303f1 100644 --- a/flash.h +++ b/flash.h @@ -369,6 +369,7 @@ const unsigned char *writearr; unsigned char *readarr; }; +#define NULL_SPI_CMD { 0, 0, NULL, NULL, } int spi_send_command(struct flashctx *flash, unsigned int writecnt, unsigned int readcnt, const unsigned char *writearr, unsigned char *readarr); int spi_send_multicommand(struct flashctx *flash, struct spi_command *cmds); uint32_t spi_get_valid_read_addr(struct flashctx *flash); diff --git a/spi25.c b/spi25.c index 30b862f..4f8d497 100644 --- a/spi25.c +++ b/spi25.c @@ -22,6 +22,7 @@ * Contains the common SPI chip driver functions */ +#include <stddef.h> #include <string.h> #include "flash.h" #include "flashchips.h" @@ -322,114 +323,48 @@ return 0; } -int spi_chip_erase_60(struct flashctx *flash) +static int spi_simple_write_cmd(struct flashctx *const flash, const uint8_t op, const unsigned int poll_delay) { - int result; struct spi_command cmds[] = { { - .writecnt = JEDEC_WREN_OUTSIZE, + .writecnt = 1, .writearr = (const unsigned char[]){ JEDEC_WREN }, - .readcnt = 0, - .readarr = NULL, }, { - .writecnt = JEDEC_CE_60_OUTSIZE, - .writearr = (const unsigned char[]){ JEDEC_CE_60 }, - .readcnt = 0, - .readarr = NULL, - }, { - .writecnt = 0, - .writearr = NULL, - .readcnt = 0, - .readarr = NULL, - }}; - - result = spi_send_multicommand(flash, cmds); - if (result) { - msg_cerr("%s failed during command execution\n", - __func__); - return result; - } - /* Wait until the Write-In-Progress bit is cleared. - * This usually takes 1-85 s, so wait in 1 s steps. - */ - /* FIXME: We assume spi_read_status_register will never fail. */ + .writecnt = 1, + .writearr = (const unsigned char[]){ op }, + }, + NULL_SPI_CMD, + }; + + const int result = spi_send_multicommand(flash, cmds); + if (result) + msg_cerr("%s failed during command execution\n", __func__); + + /* FIXME: We can't tell if spi_read_status_register() failed. */ + /* FIXME: We don't time out. */ while (spi_read_status_register(flash) & SPI_SR_WIP) - programmer_delay(1000 * 1000); + programmer_delay(poll_delay); /* FIXME: Check the status register for errors. */ - return 0; + + return result; +} + +int spi_chip_erase_60(struct flashctx *flash) +{ + /* This usually takes 1-85s, so wait in 1s steps. */ + return spi_simple_write_cmd(flash, 0x60, 1000 * 1000); } int spi_chip_erase_62(struct flashctx *flash) { - int result; - struct spi_command cmds[] = { - { - .writecnt = JEDEC_WREN_OUTSIZE, - .writearr = (const unsigned char[]){ JEDEC_WREN }, - .readcnt = 0, - .readarr = NULL, - }, { - .writecnt = JEDEC_CE_62_OUTSIZE, - .writearr = (const unsigned char[]){ JEDEC_CE_62 }, - .readcnt = 0, - .readarr = NULL, - }, { - .writecnt = 0, - .writearr = NULL, - .readcnt = 0, - .readarr = NULL, - }}; - - result = spi_send_multicommand(flash, cmds); - if (result) { - msg_cerr("%s failed during command execution\n", - __func__); - return result; - } - /* Wait until the Write-In-Progress bit is cleared. - * This usually takes 2-5 s, so wait in 100 ms steps. - */ - /* FIXME: We assume spi_read_status_register will never fail. */ - while (spi_read_status_register(flash) & SPI_SR_WIP) - programmer_delay(100 * 1000); - /* FIXME: Check the status register for errors. */ - return 0; + /* This usually takes 2-5s, so wait in 100ms steps. */ + return spi_simple_write_cmd(flash, 0x62, 100 * 1000); } int spi_chip_erase_c7(struct flashctx *flash) { - int result; - struct spi_command cmds[] = { - { - .writecnt = JEDEC_WREN_OUTSIZE, - .writearr = (const unsigned char[]){ JEDEC_WREN }, - .readcnt = 0, - .readarr = NULL, - }, { - .writecnt = JEDEC_CE_C7_OUTSIZE, - .writearr = (const unsigned char[]){ JEDEC_CE_C7 }, - .readcnt = 0, - .readarr = NULL, - }, { - .writecnt = 0, - .writearr = NULL, - .readcnt = 0, - .readarr = NULL, - }}; - - result = spi_send_multicommand(flash, cmds); - if (result) { - msg_cerr("%s failed during command execution\n", __func__); - return result; - } - /* Wait until the Write-In-Progress bit is cleared. - * This usually takes 1-85 s, so wait in 1 s steps. - */ - /* FIXME: We assume spi_read_status_register will never fail. */ - while (spi_read_status_register(flash) & SPI_SR_WIP) - programmer_delay(1000 * 1000); - /* FIXME: Check the status register for errors. */ - return 0; + /* This usually takes 1-85s, so wait in 1s steps. */ + return spi_simple_write_cmd(flash, 0xc7, 1000 * 1000); } int spi_block_erase_52(struct flashctx *flash, unsigned int addr, -- To view, visit
https://review.coreboot.org/22018
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: staging Gerrit-MessageType: newchange Gerrit-Change-Id: Ib244356fa471e15863b52e6037899d19113cb4a9 Gerrit-Change-Number: 22018 Gerrit-PatchSet: 1 Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
1
0
0
0
Change in flashrom[staging]: spi25_statusreg: Return defined value on failed RDSR
by Nico Huber (Code Review)
15 Oct '17
15 Oct '17
Nico Huber has uploaded this change for review. (
https://review.coreboot.org/22017
Change subject: spi25_statusreg: Return defined value on failed RDSR ...................................................................... spi25_statusreg: Return defined value on failed RDSR The interface of spi_read_status_register() is broken and can't return errors. Let's not return random stack data at least. Change-Id: I714b20001a5443bba665c2e0061ca14069777581 Signed-off-by: Nico Huber <nico.h(a)gmx.de> --- M spi25_statusreg.c 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://review.coreboot.org:29418/flashrom refs/changes/17/22017/1 diff --git a/spi25_statusreg.c b/spi25_statusreg.c index 01a6862..05c7acf 100644 --- a/spi25_statusreg.c +++ b/spi25_statusreg.c @@ -117,8 +117,11 @@ /* Read Status Register */ ret = spi_send_command(flash, sizeof(cmd), sizeof(readarr), cmd, readarr); - if (ret) + if (ret) { msg_cerr("RDSR failed!\n"); + /* FIXME: We should propagate the error. */ + return 0; + } return readarr[0]; } -- To view, visit
https://review.coreboot.org/22017
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: staging Gerrit-MessageType: newchange Gerrit-Change-Id: I714b20001a5443bba665c2e0061ca14069777581 Gerrit-Change-Number: 22017 Gerrit-PatchSet: 1 Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
1
0
0
0
Change in flashrom[staging]: 4BA: Print power-up addressing mode for N25Q SPI flash chips
by build bot (Jenkins) (Code Review)
14 Oct '17
14 Oct '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/20512
) Change subject: 4BA: Print power-up addressing mode for N25Q SPI flash chips ...................................................................... Patch Set 4: Verified+1 Build Successful
https://qa.coreboot.org/job/flashrom-customrules/772/
: SUCCESS
https://qa.coreboot.org/job/flashrom_gerrit/695/
: SUCCESS -- To view, visit
https://review.coreboot.org/20512
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: staging Gerrit-MessageType: comment Gerrit-Change-Id: I95f1a8182dd15ca024bbee2b6f7b0dad0d8dd8b3 Gerrit-Change-Number: 20512 Gerrit-PatchSet: 4 Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: Ed Swierk <eswierk(a)skyportsystems.com> Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de> Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net> Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Sat, 14 Oct 2017 11:01:47 +0000 Gerrit-HasComments: No
1
0
0
0
Change in flashrom[staging]: 4BA: Add Micron N25Q/MT25QL 32MB and 64MB 3V SPI flash
by build bot (Jenkins) (Code Review)
14 Oct '17
14 Oct '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/20511
) Change subject: 4BA: Add Micron N25Q/MT25QL 32MB and 64MB 3V SPI flash ...................................................................... Patch Set 4: Verified+1 Build Successful
https://qa.coreboot.org/job/flashrom-customrules/771/
: SUCCESS
https://qa.coreboot.org/job/flashrom_gerrit/694/
: SUCCESS -- To view, visit
https://review.coreboot.org/20511
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: staging Gerrit-MessageType: comment Gerrit-Change-Id: I3c130c5ecf4bcc7cf3b34257cb5fc3df523ce08b Gerrit-Change-Number: 20511 Gerrit-PatchSet: 4 Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: Ed Swierk <eswierk(a)skyportsystems.com> Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de> Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net> Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Sat, 14 Oct 2017 11:01:44 +0000 Gerrit-HasComments: No
1
0
0
0
Change in flashrom[staging]: 4BA: Allow disabling 4-byte address mode for SPI flash
by build bot (Jenkins) (Code Review)
14 Oct '17
14 Oct '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/20510
) Change subject: 4BA: Allow disabling 4-byte address mode for SPI flash ...................................................................... Patch Set 4: Verified+1 Build Successful
https://qa.coreboot.org/job/flashrom-customrules/770/
: SUCCESS
https://qa.coreboot.org/job/flashrom_gerrit/693/
: SUCCESS -- To view, visit
https://review.coreboot.org/20510
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: staging Gerrit-MessageType: comment Gerrit-Change-Id: I0b25309d731426940fc50956b744b681ab599e87 Gerrit-Change-Number: 20510 Gerrit-PatchSet: 4 Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: Ed Swierk <eswierk(a)skyportsystems.com> Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de> Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net> Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Sat, 14 Oct 2017 11:01:44 +0000 Gerrit-HasComments: No
1
0
0
0
Change in flashrom[staging]: 4BA: Add spi_exit_4ba function to switch SPI flash to 3-byte addressing
by build bot (Jenkins) (Code Review)
14 Oct '17
14 Oct '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/20509
) Change subject: 4BA: Add spi_exit_4ba function to switch SPI flash to 3-byte addressing ...................................................................... Patch Set 4: Verified+1 Build Successful
https://qa.coreboot.org/job/flashrom-customrules/769/
: SUCCESS
https://qa.coreboot.org/job/flashrom_gerrit/692/
: SUCCESS -- To view, visit
https://review.coreboot.org/20509
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: staging Gerrit-MessageType: comment Gerrit-Change-Id: I553e7fb5028f35e14a3a81b3fa8903c1b321a223 Gerrit-Change-Number: 20509 Gerrit-PatchSet: 4 Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: Ed Swierk <eswierk(a)skyportsystems.com> Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de> Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net> Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Sat, 14 Oct 2017 11:01:32 +0000 Gerrit-HasComments: No
1
0
0
0
Change in flashrom[staging]: 4BA: Support for new direct-4BA instructions + W25Q256.V update
by build bot (Jenkins) (Code Review)
14 Oct '17
14 Oct '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/20508
) Change subject: 4BA: Support for new direct-4BA instructions + W25Q256.V update ...................................................................... Patch Set 4: Verified+1 Build Successful
https://qa.coreboot.org/job/flashrom-customrules/768/
: SUCCESS
https://qa.coreboot.org/job/flashrom_gerrit/691/
: SUCCESS -- To view, visit
https://review.coreboot.org/20508
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: staging Gerrit-MessageType: comment Gerrit-Change-Id: Ib51bcc5de7826b30ad697fcbb9a5152bde2c2ac9 Gerrit-Change-Number: 20508 Gerrit-PatchSet: 4 Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de> Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net> Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Sat, 14 Oct 2017 11:01:14 +0000 Gerrit-HasComments: No
1
0
0
0
Change in flashrom[staging]: 4BA: Support for 4-bytes addressing via Extended Address Register
by build bot (Jenkins) (Code Review)
14 Oct '17
14 Oct '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/20507
) Change subject: 4BA: Support for 4-bytes addressing via Extended Address Register ...................................................................... Patch Set 4: Verified+1 Build Successful
https://qa.coreboot.org/job/flashrom-customrules/767/
: SUCCESS
https://qa.coreboot.org/job/flashrom_gerrit/690/
: SUCCESS -- To view, visit
https://review.coreboot.org/20507
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: staging Gerrit-MessageType: comment Gerrit-Change-Id: I09a8aa11de2ca14901f142c67c83c4fa0def4e27 Gerrit-Change-Number: 20507 Gerrit-PatchSet: 4 Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de> Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net> Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Sat, 14 Oct 2017 11:01:03 +0000 Gerrit-HasComments: No
1
0
0
0
Change in flashrom[staging]: 4BA: Flashrom integration for the 4-bytes addressing extensions
by build bot (Jenkins) (Code Review)
14 Oct '17
14 Oct '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/20505
) Change subject: 4BA: Flashrom integration for the 4-bytes addressing extensions ...................................................................... Patch Set 4: Verified+1 Build Successful
https://qa.coreboot.org/job/flashrom-customrules/766/
: SUCCESS
https://qa.coreboot.org/job/flashrom_gerrit/689/
: SUCCESS -- To view, visit
https://review.coreboot.org/20505
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: staging Gerrit-MessageType: comment Gerrit-Change-Id: Ib051cfc93bd4aa7580519e0e6206d025f3ca8049 Gerrit-Change-Number: 20505 Gerrit-PatchSet: 4 Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de> Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net> Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Sat, 14 Oct 2017 11:00:53 +0000 Gerrit-HasComments: No
1
0
0
0
Change in flashrom[staging]: 4BA: Winbond W25Q256.V chip (32MB) declaration, 4-bytes addr mode
by build bot (Jenkins) (Code Review)
14 Oct '17
14 Oct '17
build bot (Jenkins) has posted comments on this change. (
https://review.coreboot.org/20506
) Change subject: 4BA: Winbond W25Q256.V chip (32MB) declaration, 4-bytes addr mode ...................................................................... Patch Set 4: Verified+1 Build Successful
https://qa.coreboot.org/job/flashrom-customrules/765/
: SUCCESS
https://qa.coreboot.org/job/flashrom_gerrit/688/
: SUCCESS -- To view, visit
https://review.coreboot.org/20506
To unsubscribe, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom Gerrit-Branch: staging Gerrit-MessageType: comment Gerrit-Change-Id: I90226f453f8147ae5ac7dbbef7549ee3bfacc3d6 Gerrit-Change-Number: 20506 Gerrit-PatchSet: 4 Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com> Gerrit-Reviewer: Lijian Zhao <lijian.zhao(a)intel.com> Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de> Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net> Gerrit-Reviewer: Philippe Mathieu-Daudé <f4bug(a)amsat.org> Gerrit-Reviewer: Ravishankar Sarawadi <ravishankar.sarawadi(a)intel.com> Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at> Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org> Gerrit-Comment-Date: Sat, 14 Oct 2017 11:00:48 +0000 Gerrit-HasComments: No
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
40
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Results per page:
10
25
50
100
200