amd_spi100: Add new driver for AMD SPI100 controllers

Start with a very simple PIO driver. Reads are slow this way, but
we can optimize that later. A factor of 2 is possible simply by
aligning the FIFO reads, and another factor of 3 (at least) with
memory-mapped reads.

We override the SPI speed but choose a conservative value to be
on the safe side. Flashrom only supports normal read commands,
hence we won't go over 33MHz. Also, if the firmware set a lower
speed for normal reads, we use that. We can't use dual/quad I/O
with the SPI command engine, and tests have shown that increasing
the SPI speed lifts the read speed only marginally. It seems to
be limited by the FIFO reads.

Change-Id: I403d5f103b3ae72f3a91829d562984c54c2e2d00
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72577
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
5 files changed