The current do_reset() is called from a command context. Add a function
which can be used from anywhere, as is done on ARM.
Signed-off-by: Simon Glass <sjg@chromium.org>
* Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
*/
+#include <cpu_func.h>
#include <command.h>
#include <init.h>
#include <linux/compiler.h>
/* NOP */;
}
-int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
+void reset_cpu(void)
{
_machine_restart();
+}
+
+int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
+{
+ reset_cpu();
return 0;
}