diff options
Diffstat (limited to 'src/drivers/spi/spi_flash.c')
-rw-r--r-- | src/drivers/spi/spi_flash.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c index b0558bb19a..91fd5d3d5f 100644 --- a/src/drivers/spi/spi_flash.c +++ b/src/drivers/spi/spi_flash.c @@ -7,6 +7,7 @@ * Licensed under the GPL-2 or later. */ +#include <boot_device.h> #include <cbfs.h> #include <cpu/x86/smm.h> #include <delay.h> @@ -390,10 +391,8 @@ void lb_spi_flash(struct lb_header *header) flash->size = sizeof(*flash); /* Try to get the flash device if not loaded yet */ - if (!spi_flash_dev) { - struct cbfs_media media; - init_default_cbfs_media(&media); - } + if (!spi_flash_dev) + boot_device_init(); if (spi_flash_dev) { flash->flash_size = spi_flash_dev->size; |