Nico Huber merged this change.

View Change

Approvals: Nico Huber: Looks good to me, approved build bot (Jenkins): Verified Paul Kocialkowski: Looks good to me, approved
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@gmail.com>
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/23260
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M edi.c
1 file changed, 12 insertions(+), 0 deletions(-)

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 change 23260. To unsubscribe, or for help writing mail filters, visit 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@gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Paul Kocialkowski <contact@paulk.fr>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>