soc/amd/common/block/spi: remove code duplication
commit173620a88dfe3afec1733d7bec8846406f9c8946
authorAaron Durbin <adurbin@chromium.org>
Fri, 27 Dec 2019 18:47:05 +0000 (27 11:47 -0700)
committerAaron Durbin <adurbin@chromium.org>
Fri, 3 Jan 2020 23:06:32 +0000 (3 23:06 +0000)
tree35950e3e8c541aac02d126ae463d281268dd94a3
parent1513d72a38e7f643c9499fc2079a99a75f0eac3c
soc/amd/common/block/spi: remove code duplication

This removes all the duplicated code and logic and leverages
the existing ones in libraries themselves. The current side
effect is that protection cannot be fully enabled because the
read, write, and write enable command are not exposed in struct
spi_flash currently. That support can be revised if protection
scheme makes sense for our use-cases once it's better understood.

BUG=b:146928174
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Change-Id: I8faf9cc719ee33dd9f03fb74b579b02bbc6a5e2e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37957
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
src/soc/amd/common/block/include/amdblocks/fch_spi.h [deleted file]
src/soc/amd/common/block/spi/Makefile.inc
src/soc/amd/common/block/spi/fch_spi_ctrl.c
src/soc/amd/common/block/spi/fch_spi_flash.c [deleted file]
src/soc/amd/common/block/spi/fch_spi_special.c [deleted file]
src/soc/amd/common/block/spi/fch_spi_table.c [deleted file]