diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/cbfs_spi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/cbfs_spi.c b/src/lib/cbfs_spi.c index 31a2e79e6c..82c3b834d3 100644 --- a/src/lib/cbfs_spi.c +++ b/src/lib/cbfs_spi.c @@ -22,6 +22,7 @@ #include <boot_device.h> #include <spi_flash.h> #include <symbols.h> +#include <cbmem.h> static struct spi_flash *spi_flash_info; @@ -42,6 +43,12 @@ static const struct region_device_ops spi_ops = { static struct mmap_helper_region_device mdev = MMAP_HELPER_REGION_INIT(&spi_ops, 0, CONFIG_ROM_SIZE); +static void initialize_mdev(int unused) +{ + mmap_helper_device_init(&mdev, _dram_cbfs_cache, _dram_cbfs_cache_size); +} +ROMSTAGE_CBMEM_INIT_HOOK(initialize_mdev); + void boot_device_init(void) { int bus = CONFIG_BOOT_MEDIA_SPI_BUS; |