From a1491574ef2c91ff8b89df70feba67ad34836c75 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Wed, 17 May 2017 19:14:06 -0700 Subject: drivers/spi/spi_flash: Clean up SPI flash probe 1. Rename __spi_flash_probe to spi_flash_generic_probe and export it so that drivers can use it outside spi_flash.c. 2. Make southbridge intel spi driver use spi_flash_generic_probe if spi_is_multichip returns 0. 3. Add spi_flash_probe to spi_ctrlr structure to allow platforms to provide specialized probe functions. With this change, the specialized spi flash probe functions are now associated with a particular spi ctrlr structure and no longer disconnected from the spi controller. BUG=b:38330715 Change-Id: I35f3bd8ddc5e71515df3ef0c1c4b1a68ee56bf4b Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/19708 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Julius Werner --- src/soc/intel/common/block/fast_spi/fast_spi_flash.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/soc/intel/common') diff --git a/src/soc/intel/common/block/fast_spi/fast_spi_flash.c b/src/soc/intel/common/block/fast_spi/fast_spi_flash.c index 77801445be..fc36553d9c 100644 --- a/src/soc/intel/common/block/fast_spi/fast_spi_flash.c +++ b/src/soc/intel/common/block/fast_spi/fast_spi_flash.c @@ -280,8 +280,8 @@ static int fast_spi_flash_status(const struct spi_flash *flash, * The size of the flash component is always taken from density field in the * SFDP table. FLCOMP.C0DEN is no longer used by the Flash Controller. */ -int spi_flash_programmer_probe(const struct spi_slave *dev, - int force, struct spi_flash *flash) +static int fast_spi_flash_probe(const struct spi_slave *dev, + struct spi_flash *flash) { BOILERPLATE_CREATE_CTX(ctx); uint32_t flash_bits; @@ -362,4 +362,5 @@ static int fast_spi_flash_ctrlr_setup(const struct spi_slave *dev) const struct spi_ctrlr fast_spi_flash_ctrlr = { .setup = fast_spi_flash_ctrlr_setup, .max_xfer_size = SPI_CTRLR_DEFAULT_MAX_XFER_SIZE, + .flash_probe = fast_spi_flash_probe, }; -- cgit v1.2.3