From patchwork Sun Jan 26 16:48:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Johnson X-Patchwork-Id: 240125 List-Id: U-Boot discussion From: mrjoel at lixil.net (Joel Johnson) Date: Sun, 26 Jan 2020 09:48:59 -0700 Subject: [PATCH 2/2] Revert "common: add blkcache init" In-Reply-To: <20200126164859.21312-1-mrjoel@lixil.net> References: <20200126164859.21312-1-mrjoel@lixil.net> Message-ID: <20200126164859.21312-2-mrjoel@lixil.net> This reverts commit 1526bcce0f7285087621e16e6720636d01839da8. The commit causes boot failure using MMC environment for Marvell A38x (tested with SolidRun Clearfog). The boot hangs after the following message is printed to console: Loading Environment from MMC... Other than bisecting to identify the problematic commit I haven't tested further to determine a better possible fix to be compatible with both A38x and m68k. Signed-off-by: Joel Johnson --- common/board_r.c | 3 --- drivers/block/blkcache.c | 9 +-------- include/blk.h | 6 ------ 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/common/board_r.c b/common/board_r.c index 4f56c19fcc..8a0c1114e7 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -864,9 +864,6 @@ static init_fnc_t init_sequence_r[] = { #endif #if defined(CONFIG_PRAM) initr_mem, -#endif -#ifdef CONFIG_BLOCK_CACHE - blkcache_init, #endif run_main_loop, }; diff --git a/drivers/block/blkcache.c b/drivers/block/blkcache.c index f603aa129d..1fa64989d3 100644 --- a/drivers/block/blkcache.c +++ b/drivers/block/blkcache.c @@ -21,20 +21,13 @@ struct block_cache_node { char *cache; }; -static struct list_head block_cache; +static LIST_HEAD(block_cache); static struct block_cache_stats _stats = { .max_blocks_per_entry = 8, .max_entries = 32 }; -int blkcache_init(void) -{ - INIT_LIST_HEAD(&block_cache); - - return 0; -} - static struct block_cache_node *cache_find(int iftype, int devnum, lbaint_t start, lbaint_t blkcnt, unsigned long blksz) diff --git a/include/blk.h b/include/blk.h index 6f541bb2ba..ccc66e6a20 100644 --- a/include/blk.h +++ b/include/blk.h @@ -113,12 +113,6 @@ struct blk_desc { (PAD_SIZE(size, blk_desc->blksz)) #if CONFIG_IS_ENABLED(BLOCK_CACHE) - -/** - * blkcache_init() - initialize the block cache list pointers - */ -int blkcache_init(void); - /** * blkcache_read() - attempt to read a set of blocks from cache *