build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/23260 )
Change subject: edi: Add dummy read to ensure proper detection of ENE chips
......................................................................
Patch Set 10:
Build Successful
https://qa.coreboot.org/job/flashrom-customrules/1136/ : SUCCESS
--
To view, visit https://review.coreboot.org/23260
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I69ee71674649cd8ba4fc635f889cb39a1cd204b9
Gerrit-Change-Number: 23260
Gerrit-PatchSet: 10
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 11 Feb 2018 16:53:55 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/23261 )
Change subject: edi: Print debug info like others while probing for ENE chips
......................................................................
edi: Print debug info like others while probing for ENE chips
Instead of just "Probing for ENE KB9012 (EDI), 128 kB:", lets print
some debug info - like it is currently being printed for other chips:
Probing for ENE KB9012 (EDI), 128 kB: edi_chip_probe: hwversion 0xc3, ediid 0x04
Found ENE flash chip "KB9012 (EDI)" (128 kB, SPI) on ch341a_spi.
Change-Id: Id8e62bc9f6785b4bf0be0aaf0f74c8120d77c0d4
Signed-off-by: Mike Banon <mikebdp2(a)gmail.com>
Signed-off-by: Paul Kocialkowski <contact(a)paulk.fr>
Reviewed-on: https://review.coreboot.org/23261
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M edi.c
1 file changed, 8 insertions(+), 2 deletions(-)
Approvals:
Nico Huber: Looks good to me, approved
build bot (Jenkins): Verified
Paul Kocialkowski: Looks good to me, approved
diff --git a/edi.c b/edi.c
index 9397a54..2afd032 100644
--- a/edi.c
+++ b/edi.c
@@ -150,12 +150,18 @@
int rc;
rc = edi_read(flash, ENE_EC_HWVERSION, &hwversion);
- if (rc < 0)
+ if (rc < 0) {
+ msg_cdbg("%s: reading hwversion failed\n", __func__);
return 0;
+ }
rc = edi_read(flash, ENE_EC_EDIID, &ediid);
- if (rc < 0)
+ if (rc < 0) {
+ msg_cdbg("%s: reading ediid failed\n", __func__);
return 0;
+ }
+
+ msg_cdbg("%s: hwversion 0x%02x, ediid 0x%02x\n", __func__, hwversion, ediid);
if (chip->hwversion == hwversion && chip->ediid == ediid)
return 1;
--
To view, visit https://review.coreboot.org/23261
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id8e62bc9f6785b4bf0be0aaf0f74c8120d77c0d4
Gerrit-Change-Number: 23261
Gerrit-PatchSet: 9
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/23259 )
Change subject: Add support for the ENE Embedded Debug Interface EDI and KB9012 EC
......................................................................
Patch Set 11:
Build Successful
https://qa.coreboot.org/job/flashrom-customrules/1135/ : SUCCESS
--
To view, visit https://review.coreboot.org/23259
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib8b2eb2feeef5c337d725d15ebf994a299897854
Gerrit-Change-Number: 23259
Gerrit-PatchSet: 11
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 11 Feb 2018 16:53:46 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/23260 )
Change subject: edi: Add dummy read to ensure proper detection of ENE chips
......................................................................
edi: Add dummy read to ensure proper detection of ENE chips
ENE chips enable EDI by detecting a clock frequency between 1 MHz and 8 MHz.
In many cases, the chip won't be able to both detect the clock signal and
serve the associated request at the same time.
Thus, a dummy read has to be added to ensure that EDI is enabled and
operational starting from the next request.
Change-Id: I69ee71674649cd8ba4fc635f889cb39a1cd204b9
Signed-off-by: Mike Banon <mikebdp2(a)gmail.com>
Signed-off-by: Paul Kocialkowski <contact(a)paulk.fr>
Reviewed-on: https://review.coreboot.org/23260
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M edi.c
1 file changed, 12 insertions(+), 0 deletions(-)
Approvals:
Nico Huber: Looks good to me, approved
build bot (Jenkins): Verified
Paul Kocialkowski: Looks good to me, approved
diff --git a/edi.c b/edi.c
index 0ca1704..9397a54 100644
--- a/edi.c
+++ b/edi.c
@@ -480,6 +480,18 @@
{
int probe;
int rc;
+ unsigned char hwversion;
+
+ /*
+ * ENE chips enable EDI by detecting a clock frequency between 1 MHz and
+ * 8 MHz. In many cases, the chip won't be able to both detect the clock
+ * signal and serve the associated request at the same time.
+ *
+ * Thus, a dummy read has to be added to ensure that EDI is enabled and
+ * operational starting from the next request. This dummy read below
+ * draws the chip's attention and as result the chip enables its EDI.
+ */
+ edi_read(flash, ENE_EC_HWVERSION, &hwversion);
probe = edi_chip_probe(flash, &ene_kb9012);
if (!probe)
--
To view, visit https://review.coreboot.org/23260
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I69ee71674649cd8ba4fc635f889cb39a1cd204b9
Gerrit-Change-Number: 23260
Gerrit-PatchSet: 10
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/23258 )
Change subject: Add support for selecting the erased bit value with a flag
......................................................................
Patch Set 7:
Build Successful
https://qa.coreboot.org/job/flashrom-customrules/1134/ : SUCCESS
--
To view, visit https://review.coreboot.org/23258
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia7b0de8568e31f9bf263ba0ad6b051e837477b6b
Gerrit-Change-Number: 23258
Gerrit-PatchSet: 7
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 11 Feb 2018 16:53:00 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/23262 )
Change subject: Add a SPI command class to `struct flashchip`
......................................................................
Patch Set 6:
Build Successful
https://qa.coreboot.org/job/flashrom-customrules/1133/ : SUCCESS
--
To view, visit https://review.coreboot.org/23262
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I89a53ccaef2791a2ac32904d7ab813da7478a6f0
Gerrit-Change-Number: 23262
Gerrit-PatchSet: 6
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Urja Rannikko <urjaman(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 11 Feb 2018 16:52:41 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/23262 )
Change subject: Add a SPI command class to `struct flashchip`
......................................................................
Add a SPI command class to `struct flashchip`
By default, we want to probe for SPI25 chips only. Other SPI use cases,
like the ENE/EDI protocol, might use commands that can confuse these
common chips.
Now, flashrom will probe for a chip only if one of these conditions is
true:
1) no chip has been specified AND the chip uses the SPI25 commands
2) this chip has been specified by -c | --chip <chipname>
The CLI can later be extended to probe for a specific class of chips.
Change-Id: I89a53ccaef2791a2ac32904d7ab813da7478a6f0
Signed-off-by: Mike Banon <mikebdp2(a)gmail.com>
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
Reviewed-on: https://review.coreboot.org/23262
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Paul Kocialkowski <contact(a)paulk.fr>
---
M flash.h
M flashrom.c
2 files changed, 14 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Paul Kocialkowski: Looks good to me, approved
diff --git a/flash.h b/flash.h
index d31b256..a71fec1 100644
--- a/flash.h
+++ b/flash.h
@@ -183,6 +183,17 @@
enum test_state write;
} tested;
+ /*
+ * Group chips that have common command sets. This should ensure that
+ * no chip gets confused by a probing command for a very different class
+ * of chips.
+ */
+ enum {
+ /* SPI25 is very common. Keep it at zero so we don't have
+ to specify it for each and every chip in the database.*/
+ SPI25 = 0,
+ } spi_cmd_set;
+
int (*probe) (struct flashctx *flash);
/* Delay after "enter/exit ID mode" commands in microseconds.
diff --git a/flashrom.c b/flashrom.c
index ac987fd..a7de995 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1209,6 +1209,9 @@
buses_common = mst->buses_supported & chip->bustype;
if (!buses_common)
continue;
+ /* Only probe for SPI25 chips by default. */
+ if (chip->bustype == BUS_SPI && !chip_to_probe && chip->spi_cmd_set != SPI25)
+ continue;
msg_gdbg("Probing for %s %s, %d kB: ", chip->vendor, chip->name, chip->total_size);
if (!chip->probe && !force) {
msg_gdbg("failed! flashrom has no probe function for this flash chip.\n");
--
To view, visit https://review.coreboot.org/23262
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I89a53ccaef2791a2ac32904d7ab813da7478a6f0
Gerrit-Change-Number: 23262
Gerrit-PatchSet: 6
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Urja Rannikko <urjaman(a)gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Paul Kocialkowski has posted comments on this change. ( https://review.coreboot.org/23263 )
Change subject: Add support for reading the current flash contents from a file
......................................................................
Patch Set 12: Code-Review+2
> After all the rebasing, it would be nice if somebody could check
> this
> commit out and retest the EDI driver.
I just rebased the whole series on top of master and tested it with a CH341A hooked to a KB9012. Everything works, including this commit!
--
To view, visit https://review.coreboot.org/23263
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idf153b6955f37779ae9bfb228a434ed10c304947
Gerrit-Change-Number: 23263
Gerrit-PatchSet: 12
Gerrit-Owner: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact(a)paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 11 Feb 2018 15:16:24 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes