eth: Moved eth_initialize to end of autoboot

If autoboot command fails, it returns to prompt
without ethernet initialized. Hence, moved it to
the end of autoboot to make sure ethrernet is
initialized before entering the prompt.

Change-Id: I79ea6f51842c544e9eb3b97bf7658c45feb34f0b
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
This commit is contained in:
Gokul Sriram Palanisamy 2017-12-21 11:50:24 +05:30
parent adaaa17195
commit a23d322ca1

View file

@ -270,12 +270,6 @@ static int abortboot_normal(int bootdelay)
#ifdef CONFIG_SILENT_CONSOLE
if (abort)
gd->flags &= ~GD_FLG_SILENT;
#endif
#ifdef CONFIG_IPQ_ETH_INIT_DEFER
if (abort) {
puts("\nNet: ");
eth_initialize();
}
#endif
return abort;
}
@ -382,4 +376,9 @@ void autoboot_command(const char *s)
run_command_list(s, -1, 0);
}
#endif /* CONFIG_MENUKEY */
#ifdef CONFIG_IPQ_ETH_INIT_DEFER
puts("\nNet: ");
eth_initialize();
#endif
}