mflash: factor init to 'mflash init'

Splits mflash initialiation to 'mflash init', called from 'init'.
This commit is contained in:
Zachary T Welch
2009-11-30 17:32:56 -08:00
parent 747f8af672
commit 1de0b9d351
2 changed files with 26 additions and 4 deletions

View File

@@ -139,11 +139,10 @@ COMMAND_HANDLER(handle_init_command)
return ERROR_FAIL;
LOG_DEBUG("flash init complete");
if (mflash_init_drivers(CMD_CTX) != ERROR_OK)
return ERROR_FAIL;
LOG_DEBUG("mflash init complete");
command_context_mode(CMD_CTX, COMMAND_CONFIG);
if (command_run_line(CMD_CTX, "mflash init") != ERROR_OK)
return ERROR_FAIL;
if (command_run_line(CMD_CTX, "nand init") != ERROR_OK)
return ERROR_FAIL;