UPSTREAM: soc/rockchip: Move spi driver to use spi_bus_map
This is in preparation to get rid of the strong spi_setup_slave
implemented by different platforms.
BUG=b:38430839
Change-Id: Ief26dec8c156ce1fbc87cab0f3504c091d7c048c
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 23d5d99098
Original-Change-Id: I66b1b9635ece2381f62f2a9d6f5744d639d59163
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19771
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/513960
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
This commit is contained in:
parent
34d592501f
commit
0f689973cb
1 changed files with 8 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue