From 2cd03f1696024d00a86865dbb7b6c14b5a7129a9 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Thu, 18 May 2017 14:58:32 -0700 Subject: southbridge/intel: Move spi driver to use spi_bus_map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is in preparation to get rid of the strong spi_setup_slave implemented by different platforms. BUG=b:38430839 Change-Id: I23c1108c85532b7346ff7e0adb0ac90dbf2bb2cc Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/19779 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Philippe Mathieu-Daudé --- src/southbridge/intel/common/spi.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/southbridge/intel/common/spi.c') diff --git a/src/southbridge/intel/common/spi.c b/src/southbridge/intel/common/spi.c index be9b128713..13db224a97 100644 --- a/src/southbridge/intel/common/spi.c +++ b/src/southbridge/intel/common/spi.c @@ -941,10 +941,12 @@ static const struct spi_ctrlr spi_ctrlr = { .flash_probe = spi_flash_programmer_probe, }; -int spi_setup_slave(unsigned int bus, unsigned int cs, struct spi_slave *slave) -{ - slave->bus = bus; - slave->cs = cs; - slave->ctrlr = &spi_ctrlr; - return 0; -} +const struct spi_ctrlr_buses spi_ctrlr_bus_map[] = { + { + .ctrlr = &spi_ctrlr, + .bus_start = 0, + .bus_end = 0, + }, +}; + +const size_t spi_ctrlr_bus_map_count = ARRAY_SIZE(spi_ctrlr_bus_map); -- cgit v1.2.3