diff --git a/src/soc/rockchip/common/spi.c b/src/soc/rockchip/common/spi.c index 0e7376945b..86f2594285 100644 --- a/src/soc/rockchip/common/spi.c +++ b/src/soc/rockchip/common/spi.c @@ -330,13 +330,12 @@ static const struct spi_ctrlr spi_ctrlr = { .max_xfer_size = 65535, }; -int spi_setup_slave(unsigned int bus, unsigned int cs, struct spi_slave *slave) -{ - assert(bus < ARRAY_SIZE(rockchip_spi_slaves)); +const struct spi_ctrlr_buses spi_ctrlr_bus_map[] = { + { + .ctrlr = &spi_ctrlr, + .bus_start = 0, + .bus_end = ARRAY_SIZE(rockchip_spi_slaves) - 1, + }, +}; - slave->bus = bus; - slave->cs = cs; - slave->ctrlr = &spi_ctrlr; - - return 0; -} +const size_t spi_ctrlr_bus_map_count = ARRAY_SIZE(spi_ctrlr_bus_map);