spi: Clean up SPI driver interface
commitb5d41cb063a54d2a90e0480ede18d3b9c1ae8474
authorFurquan Shaikh <furquan@chromium.org>
Thu, 1 Dec 2016 15:25:31 +0000 (1 07:25 -0800)
committerMartin Roth <martinroth@google.com>
Wed, 7 Dec 2016 19:19:07 +0000 (7 20:19 +0100)
treec0a34038912a8aa8d8eae9a20ee5cbadb6dc067e
parent2dc8b77d0e95dbb90a99ff5dc2b162b805faba18
spi: Clean up SPI driver interface

1. Add new structure spi_ctrlr_buses that allows platform to define a
mapping from SPI controller to buses managed by the controller.
2. Provide weak implementations of spi_init and spi_setup_slave that
will be used by platforms using the new interface.

BUG=chrome-os-partner:59832
BRANCH=None
TEST=Compiles successfully

Change-Id: Ia6f47941b786299f4d823895898ffb1b36e02f73
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17561
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
src/drivers/spi/spi-generic.c
src/include/spi-generic.h