From 305c0cafaa2fe7d766918898692971b70259b4ac Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Sat, 3 Dec 2016 17:04:06 -0600 Subject: drivers/spi: provide a mechanism to obtain the SPI flash boot device The MRC cache wants to be able to access the SPI flash boot device. Allow an easy way to provide that so that there isn't duplicate spi_flash objects representing the same device. BUG=chrome-os-partner:56151 Change-Id: Iba92e8bb8a6060cdd327b10f5f8ec23ac61101e7 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/17715 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/drivers/spi/boot_device_rw_nommap.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/drivers/spi/boot_device_rw_nommap.c') diff --git a/src/drivers/spi/boot_device_rw_nommap.c b/src/drivers/spi/boot_device_rw_nommap.c index a52a7befd2..e7d9b9a944 100644 --- a/src/drivers/spi/boot_device_rw_nommap.c +++ b/src/drivers/spi/boot_device_rw_nommap.c @@ -95,3 +95,9 @@ const struct region_device *boot_device_rw(void) return &spi_rw; } + +const struct spi_flash *boot_device_spi_flash(void) +{ + boot_device_rw_init(); + return car_get_var(sfg); +} -- cgit v1.2.3