From 5bda642bcb0fc6004f08d8acdfe0e71d5b3c5012 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Fri, 7 Apr 2017 07:13:24 -0700 Subject: drivers/spi: Get rid of spi_get_config There is only one user for spi_get_config i.e. SPI ACPI. Also, the values provided by spi_get_config are constant for now. Thus, get rid of the spi_get_config call and fill in these constant values in SPI ACPI code itself. If there is a need in the future to change these, appropriate device-tree configs can be added. BUG=b:36873582 Change-Id: Ied38e2670784ee3317bb12e542666c224bd9e819 Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/19203 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/gspi/gspi.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'src/soc') diff --git a/src/soc/intel/common/block/gspi/gspi.c b/src/soc/intel/common/block/gspi/gspi.c index f3c146057e..74b94752b1 100644 --- a/src/soc/intel/common/block/gspi/gspi.c +++ b/src/soc/intel/common/block/gspi/gspi.c @@ -307,26 +307,6 @@ int __attribute__((weak)) gspi_get_soc_spi_cfg(unsigned int gspi_bus, return 0; } -static int gspi_ctrlr_get_config(const struct spi_slave *dev, - struct spi_cfg *cfg) -{ - unsigned int gspi_bus; - - /* Currently, only chip select 0 is supported. */ - if (dev->cs != 0) { - printk(BIOS_ERR, "%s: Invalid CS value: cs=%u.\n", __func__, - dev->cs); - return -1; - } - - if (gspi_soc_spi_to_gspi_bus(dev->bus, &gspi_bus)) { - printk(BIOS_ERR, "%s: Failed to find GSPI bus for SPI %u.\n", - __func__, dev->bus); - return -1; - } - return gspi_get_soc_spi_cfg(gspi_bus, cfg); -} - static int gspi_cs_assert(const struct spi_slave *dev) { return gspi_cs_change(dev, CS_ASSERT); @@ -627,7 +607,6 @@ static int gspi_ctrlr_xfer(const struct spi_slave *dev, } const struct spi_ctrlr gspi_ctrlr = { - .get_config = gspi_ctrlr_get_config, .claim_bus = gspi_cs_assert, .release_bus = gspi_cs_deassert, .setup = gspi_ctrlr_setup, -- cgit v1.2.3