summaryrefslogtreecommitdiff
path: root/src/soc/nvidia/tegra124/spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/nvidia/tegra124/spi.c')
-rw-r--r--src/soc/nvidia/tegra124/spi.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/soc/nvidia/tegra124/spi.c b/src/soc/nvidia/tegra124/spi.c
index 4ecd67a8a4..ae07d53fed 100644
--- a/src/soc/nvidia/tegra124/spi.c
+++ b/src/soc/nvidia/tegra124/spi.c
@@ -800,15 +800,12 @@ static const struct spi_ctrlr spi_ctrlr = {
.max_xfer_size = SPI_CTRLR_DEFAULT_MAX_XFER_SIZE,
};
-int spi_setup_slave(unsigned int bus, unsigned int cs, struct spi_slave *slave)
-{
- struct tegra_spi_channel *channel = to_tegra_spi(bus);
- if (!channel)
- return -1;
-
- slave->bus = channel->slave.bus;
- slave->cs = channel->slave.cs;
- slave->ctrlr = &spi_ctrlr;
+const struct spi_ctrlr_buses spi_ctrlr_bus_map[] = {
+ {
+ .ctrlr = &spi_ctrlr,
+ .bus_start = 1,
+ .bus_end = ARRAY_SIZE(tegra_spi_channels)
+ },
+};
- return 0;
-}
+const size_t spi_ctrlr_bus_map_count = ARRAY_SIZE(spi_ctrlr_bus_map);