[PATCH 1/2] arm: mvebu: fix A38x breakage from commit bb872dd930cc

This function parameter usage of load_addr was incorrectly caught in the clarifying renames of commit bb872dd930cc, which results in boot failures on Marvell A38x.
Signed-off-by: Joel Johnson mrjoel@lixil.net Patch-to: Simon Glass sjg@chromium.org ---
drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c b/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c index 9293d54e5a..1eababeebd 100644 --- a/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c +++ b/drivers/ddr/marvell/a38x/ddr3_training_ip_engine.c @@ -615,7 +615,7 @@ int ddr3_tip_load_pattern_to_odpg(u32 dev_num, enum hws_access_type access_type,
CHECK_STATUS(ddr3_tip_if_write(dev_num, access_type, if_id, ODPG_DATA_BUFFER_OFFS_REG, - image_load_addr, MASK_ALL_BITS)); + load_addr, MASK_ALL_BITS));
return MV_OK; }

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 mrjoel@lixil.net ---
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 *

Hi Joel, Tom and all,
just sent a fix, you can check it here: https://patchwork.ozlabs.org/project/uboot/list/?series=155358
Sorry again, Regards, Angelo
On Sun, Jan 26, 2020 at 5:49 PM Joel Johnson mrjoel@lixil.net wrote:
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 mrjoel@lixil.net
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
-- 2.20.1

Thanks for the quick response and update!
Joel
On 2020-01-26 11:34, Angelo Dureghello wrote:
Hi Joel, Tom and all,
just sent a fix, you can check it here: https://patchwork.ozlabs.org/project/uboot/list/?series=155358
Sorry again, Regards, Angelo
On Sun, Jan 26, 2020 at 5:49 PM Joel Johnson mrjoel@lixil.net wrote:
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 mrjoel@lixil.net
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
-- 2.20.1

On Sun, Jan 26, 2020 at 09:48:58AM -0700, Joel Johnson wrote:
This function parameter usage of load_addr was incorrectly caught in the clarifying renames of commit bb872dd930cc, which results in boot failures on Marvell A38x.
Signed-off-by: Joel Johnson mrjoel@lixil.net Patch-to: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!
participants (3)
-
Angelo Dureghello
-
Joel Johnson
-
Tom Rini