aboutsummaryrefslogtreecommitdiffstats
path: root/edi.c
diff options
context:
space:
mode:
Diffstat (limited to 'edi.c')
-rw-r--r--edi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/edi.c b/edi.c
index 0ca17042..9397a54e 100644
--- a/edi.c
+++ b/edi.c
@@ -480,6 +480,18 @@ int edi_probe_kb9012(struct flashctx *flash)
{
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)