diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2018-01-15 01:08:39 +0300 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2018-02-11 16:53:42 +0000 |
commit | a590f4840b41430a8d2a457eac04e7050584ef48 (patch) | |
tree | 57ae686e0692e8b4ae28e0e3fdcb453c735a8896 /edi.c | |
parent | 80ae14e5105bb938679193906d1ee43b7a51c094 (diff) | |
download | flashrom-a590f4840b41430a8d2a457eac04e7050584ef48.tar.gz flashrom-a590f4840b41430a8d2a457eac04e7050584ef48.tar.bz2 flashrom-a590f4840b41430a8d2a457eac04e7050584ef48.zip |
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>
Diffstat (limited to 'edi.c')
-rw-r--r-- | edi.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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) |