From: Marek Vasut Date: Wed, 6 Sep 2023 21:29:42 +0000 (+0200) Subject: blkcache: Remove unused NEEDS_MANUAL_RELOC code bits X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=4fa6511e8c05f2b1bd2d4b969b5c9d6cc49228ff;p=u-boot.git blkcache: Remove unused NEEDS_MANUAL_RELOC code bits The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut --- diff --git a/cmd/blkcache.c b/cmd/blkcache.c index 47ea1ec0b9..1456654df6 100644 --- a/cmd/blkcache.c +++ b/cmd/blkcache.c @@ -46,24 +46,11 @@ static struct cmd_tbl cmd_blkc_sub[] = { U_BOOT_CMD_MKENT(configure, 3, 0, blkc_configure, "", ""), }; -static __maybe_unused void blkc_reloc(void) -{ - static int relocated; - - if (!relocated) { - fixup_cmdtable(cmd_blkc_sub, ARRAY_SIZE(cmd_blkc_sub)); - relocated = 1; - }; -} - static int do_blkcache(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { struct cmd_tbl *c; -#ifdef CONFIG_NEEDS_MANUAL_RELOC - blkc_reloc(); -#endif if (argc < 2) return CMD_RET_USAGE; diff --git a/common/board_r.c b/common/board_r.c index ad9a3cf633..697d4a5bd3 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -657,9 +657,6 @@ static init_fnc_t init_sequence_r[] = { initr_watchdog, #endif INIT_FUNC_WATCHDOG_RESET -#if defined(CONFIG_NEEDS_MANUAL_RELOC) && defined(CONFIG_BLOCK_CACHE) - blkcache_init, -#endif #ifdef CONFIG_NEEDS_MANUAL_RELOC initr_manual_reloc_cmdtable, #endif diff --git a/drivers/block/blkcache.c b/drivers/block/blkcache.c index f99465aa47..26bcbea435 100644 --- a/drivers/block/blkcache.c +++ b/drivers/block/blkcache.c @@ -13,10 +13,6 @@ #include #include -#ifdef CONFIG_NEEDS_MANUAL_RELOC -DECLARE_GLOBAL_DATA_PTR; -#endif - struct block_cache_node { struct list_head lh; int iftype; @@ -34,18 +30,6 @@ static struct block_cache_stats _stats = { .max_entries = 32 }; -#ifdef CONFIG_NEEDS_MANUAL_RELOC -int blkcache_init(void) -{ - struct list_head *head = &block_cache; - - head->next = (uintptr_t)head->next + gd->reloc_off; - head->prev = (uintptr_t)head->prev + gd->reloc_off; - - return 0; -} -#endif - 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 b819f97c2f..95e86e2d5d 100644 --- a/include/blk.h +++ b/include/blk.h @@ -105,12 +105,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 *