flash: factor init to 'flash init'

Split flash initialiation into 'flash init', called from 'init'.
This commit is contained in:
Zachary T Welch
2009-11-30 17:38:02 -08:00
parent 1de0b9d351
commit 37201c019f
2 changed files with 26 additions and 4 deletions

View File

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