diff options
-rw-r--r-- | drivers/block/Kconfig | 7 | ||||
-rw-r--r-- | drivers/block/Makefile | 2 | ||||
-rw-r--r-- | include/blk.h | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index 0792373cfc4..f9502b36bac 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig @@ -37,6 +37,13 @@ config BLOCK_CACHE it will prevent repeated reads from directory structures and other filesystem data structures. +config SPL_BLOCK_CACHE + bool "Use block device cache in SPL" + depends on SPL_BLK + default n + help + This option enables the disk-block cache in SPL + config IDE bool "Support IDE controllers" select HAVE_BLOCK_DEVICE diff --git a/drivers/block/Makefile b/drivers/block/Makefile index 5fcafb193ee..0e80ce94058 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -11,4 +11,4 @@ endif obj-$(CONFIG_IDE) += ide.o obj-$(CONFIG_SANDBOX) += sandbox.o -obj-$(CONFIG_BLOCK_CACHE) += blkcache.o +obj-$(CONFIG_$(SPL_)BLOCK_CACHE) += blkcache.o diff --git a/include/blk.h b/include/blk.h index fc0c239e468..86f6d5057f2 100644 --- a/include/blk.h +++ b/include/blk.h @@ -111,7 +111,7 @@ struct blk_desc { #define PAD_TO_BLOCKSIZE(size, blk_desc) \ (PAD_SIZE(size, blk_desc->blksz)) -#ifdef CONFIG_BLOCK_CACHE +#if CONFIG_IS_ENABLED(BLOCK_CACHE) /** * blkcache_read() - attempt to read a set of blocks from cache * |