From: Tom Rini Date: Sun, 10 Jun 2018 07:20:35 -0400 Subject: [U-Boot] [PATCH] block: Add SPL_BLOCK_CACHE and default n In-Reply-To: <20180609225511.24890-1-aford173@gmail.com> References: <20180609225511.24890-1-aford173@gmail.com> Message-ID: <20180610112035.GA350@bill-the-cat.ec.rr.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Jun 09, 2018 at 05:55:11PM -0500, Adam Ford wrote: > When enabling BLOCK_CACHE on devices with limited RAM during SPL, > some devices may not boot. This creates an option to enable > block caching in SPL by defaults off. It is dependent on BLOCK_CACHE > and SPL_BLK > > Fixes: 46960ad6d09b ("block: Have BLOCK_CACHE default to y in some cases") > > Signed-off-by: Adam Ford > -- > > V2: Clean up macros and ifdefs [snip] > diff --git a/include/blk.h b/include/blk.h > index fc0c239e46..bd90e39932 100644 > --- a/include/blk.h > +++ b/include/blk.h > @@ -111,7 +111,8 @@ 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) && !CONFIG_IS_ENABLED(SPL_BUILD)) || \ > + (CONFIG_IS_ENABLED(SPL_BLOCK_CACHE) && CONFIG_IS_ENABLED(SPL_BUILD)) > /** > * blkcache_read() - attempt to read a set of blocks from cache > * CONFIG_IS_ENABLED(FOO) has the logic for checking for SPL_FOO and SPL_BUILD and so forth. Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: