nds32: fix mmc rescan hang problem.
PATCH 1/1 nds32: fix mmc rescan hang problem.
From: rick <[email protected]>
When execute mmc rescan command, system will hang.
Signed-off-by rick <[email protected]>
--- common/cmd_mmc.c | 9 +++++++++ common/env_common.c | 3 +++ include/environment.h | 3 +++ 3 files changed, 15 insertions(+)
common/cmd_mmc.c +9 -0
@@ -814,6 +814,15 @@ static cmd_tbl_t cmd_mmc[] = { U_BOOT_CMD_MKENT(setdsr, 2, 0, do_mmc_setdsr, "", ""), }; +#if defined(__NDS32__) +#ifdef CONFIG_NEEDS_MANUAL_RELOC +void mmc_reloc (void ) +{ +fixup_cmdtable (cmd_mmc,ARRAY_SIZE (cmd_mmc)); +} +#endif +#endif +static int do_mmcops (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {cmd_tbl_t *cp;
common/env_common.c +3 -0
@@ -253,6 +253,9 @@ void env_relocate(void) {#if defined(CONFIG_NEEDS_MANUAL_RELOC )env_reloc (); +#if defined(CONFIG_NDS32 ) +mmc_reloc (); +#endif env_htab.change_ok += gd->reloc_off;#endif if (gd->env_valid ==0 ) {
include/environment.h +3 -0
@@ -178,6 +178,9 @@ extern unsigned char env_get_char_spec(int);#if defined(CONFIG_NEEDS_MANUAL_RELOC )extern void env_reloc (void ); +#if defined(CONFIG_NDS32 ) +extern void mmc_reloc (void ); +#endif #endif #ifdef CONFIG_ENV_IS_IN_MMC
Signature · 1 line
1.7.9.5
PATCH 1/1 nds32: fix mmc rescan hang problem.
Quoted 21 lines · Andes
From: rick <[email protected]>
When execute mmc rescan command, system will hang.
Signed-off-by rick <[email protected]>--- common/cmd_mmc.c | 9 +++++++++ common/env_common.c | 3 +++ include/environment.h | 3 +++ 3 files changed, 15 insertions(+)common/cmd_mmc.c +2
-0@@ -814,6 +814,15 @@ static cmd_tbl_t cmd_mmc[] = { U_BOOT_CMD_MKENT(setdsr, 2, 0, do_mmc_setdsr, "", ""), }; +#if defined(__NDS32__) +#ifdef CONFIG_NEEDS_MANUAL_RELOC
common/cmd_mmc.c static cmd_tbl_t cmd_mmc[] = { · line 828
Quoted 10 lines
common/cmd_mmc.c +7
-0+void mmc_reloc (void ) +{ +fixup_cmdtable (cmd_mmc,ARRAY_SIZE (cmd_mmc)); +} +#endif +#endif +static int do_mmcops (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {cmd_tbl_t *cp;
Don't need to test __NDS32__ here.
Quoted 5 lines
common/env_common.c +0
-0
common/env_common.c void env_relocate(void) · line 261
Quoted 9 lines
common/env_common.c +3
-0@@ -253,6 +253,9 @@ void env_relocate(void) {#if defined(CONFIG_NEEDS_MANUAL_RELOC )env_reloc (); +#if defined(CONFIG_NDS32 ) +mmc_reloc (); +#endif env_htab.change_ok += gd->reloc_off;#endif if (gd->env_valid ==0 ) {
This should just check CONFIG_ENV_IS_IN_MMC
Quoted 5 lines
include/environment.h +0
-0
include/environment.h extern unsigned char env_get_char_spec(int); · line 186
Quoted 9 lines
include/environment.h +3
-0@@ -178,6 +178,9 @@ extern unsigned char env_get_char_spec(int);#if defined(CONFIG_NEEDS_MANUAL_RELOC )extern void env_reloc (void ); +#if defined(CONFIG_NDS32 ) +extern void mmc_reloc (void ); +#endif #endif #ifdef CONFIG_ENV_IS_IN_MMC
Don't need to test __NDS32__ here.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160125/1d8cacd7/attachment.sig>