[U-Boot] [PATCH] x86: ich-spi: Convert driver to spi-mem ops

Simon Glass sjg at chromium.org
Fri May 10 01:28:19 UTC 2019


Hi Bernhard,

On Mon, 1 Apr 2019 at 02:33, Bernhard Messerklinger
<bernhard.messerklinger at br-automation.com> wrote:
>
> With the introduction of the new spi-mem model operations changed
> slightly, which broke the ich-spi driver. The new spi-mem operations
> make things a bit easier to handle for ich flash interface. This patch
> makes ich-spi work again by using spi-mem operations.
>
> Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger at br-automation.com>
> ---
> Unfortunately I only have apollo lake HW so I can't test
> with the other boards. Please give feedback if anybody is interested in
> this patch or any errors appear.
>
>  drivers/spi/ich.c | 250 +++++++++++++++++-----------------------------
>  drivers/spi/ich.h |   9 +-
>  2 files changed, 96 insertions(+), 163 deletions(-)

This seems to make read work again.

But it does not fix 'sf test'.

=> sf test 0 1000
SPI flash test:
0 erase: 0 ticks, 4096000 KiB/s 32768.000 Mbps
1 check: 2 ticks, 2000 KiB/s 16.000 Mbps
2 write: 0 ticks, 4096000 KiB/s 32768.000 Mbps
3 read: 2 ticks, 2000 KiB/s 16.000 Mbps
Verify failed at 0, good data:
00000000: fa fc 0f 20 c0 0d 00 00 00 60 0f 22 c0 0f 09 bb    ... .....`."....
00000010: 00 00 02 00 bd 00 00 00 00 eb 0c 90 78 56 34 12    ............xV4.
00000020: bb 00 00 01 00 89 c5 89 ce b8 18 00 00 00 8e e0    ................
00000030: 8e d8 8e e8 8e c0 8e d0 0f 01 1d a1 00 e0 ff e9    ................
Bad data:
00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00000020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
00000030: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
Test failed

Regards,
Simon


More information about the U-Boot mailing list