From 2d9a99535d0636ffcffe97214f34100a0026d8b0 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Thu, 18 May 2017 14:54:57 -0700 Subject: soc/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: Id3f05a2ea6eb5e31ca607861973d96b507208115 Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/19778 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Philippe Mathieu-Daudé --- src/soc/intel/braswell/spi.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/soc/intel/braswell') diff --git a/src/soc/intel/braswell/spi.c b/src/soc/intel/braswell/spi.c index 12bf7d5c80..4bdcdbff8f 100644 --- a/src/soc/intel/braswell/spi.c +++ b/src/soc/intel/braswell/spi.c @@ -596,10 +596,12 @@ static const struct spi_ctrlr spi_ctrlr = { .max_xfer_size = member_size(ich9_spi_regs, fdata), }; -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