southbridge/intel: 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: I23c1108c85532b7346ff7e0adb0ac90dbf2bb2cc Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/19779 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
This commit is contained in:
parent
2d9a99535d
commit
2cd03f1696
@ -941,10 +941,12 @@ static const struct spi_ctrlr spi_ctrlr = {
|
||||
.flash_probe = spi_flash_programmer_probe,
|
||||
};
|
||||
|
||||
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);
|
||||
|
@ -724,10 +724,12 @@ static const struct spi_ctrlr spi_ctrlr = {
|
||||
.max_xfer_size = member_size(ich10_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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user