[coreboot-gerrit] Change in coreboot[master]: soc/rockchip: Move spi driver to use spi_bus_map
Furquan Shaikh (Code Review)
gerrit at coreboot.org
Wed May 24 04:38:54 CEST 2017
Furquan Shaikh has submitted this change and it was merged. ( https://review.coreboot.org/19771 )
Change subject: soc/rockchip: Move spi driver to use spi_bus_map
......................................................................
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: I66b1b9635ece2381f62f2a9d6f5744d639d59163
Signed-off-by: Furquan Shaikh <furquan at chromium.org>
Reviewed-on: https://review.coreboot.org/19771
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Julius Werner <jwerner at chromium.org>
Reviewed-by: Aaron Durbin <adurbin at chromium.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude at gmail.com>
---
M src/soc/rockchip/common/spi.c
1 file changed, 8 insertions(+), 9 deletions(-)
Approvals:
Aaron Durbin: Looks good to me, approved
Philippe Mathieu-Daudé: Looks good to me, but someone else must approve
Julius Werner: Looks good to me, approved
build bot (Jenkins): Verified
diff --git a/src/soc/rockchip/common/spi.c b/src/soc/rockchip/common/spi.c
index 0e73769..86f2594 100644
--- a/src/soc/rockchip/common/spi.c
+++ b/src/soc/rockchip/common/spi.c
@@ -330,13 +330,12 @@
.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);
--
To view, visit https://review.coreboot.org/19771
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I66b1b9635ece2381f62f2a9d6f5744d639d59163
Gerrit-PatchSet: 6
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Aaron Durbin <adurbin at chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Julius Werner <jwerner at chromium.org>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
Gerrit-Reviewer: Philippe Mathieu-Daudé <philippe.mathieu.daude at gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
More information about the coreboot-gerrit
mailing list