2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2015-02-12 00:40:00 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2014 Angelo Dureghello <angelo@sysam.it>
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2020-05-10 17:40:03 +00:00
|
|
|
#include <command.h>
|
2020-05-10 17:40:02 +00:00
|
|
|
#include <init.h>
|
2019-11-14 19:57:20 +00:00
|
|
|
#include <vsprintf.h>
|
2015-02-12 00:40:00 +00:00
|
|
|
#include <asm/immap.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
|
|
|
|
#ifdef CONFIG_M5307
|
2020-05-10 17:40:03 +00:00
|
|
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
2015-02-12 00:40:00 +00:00
|
|
|
{
|
|
|
|
sim_t *sim = (sim_t *)(MMAP_SIM);
|
|
|
|
|
|
|
|
/* enable watchdog/reset, set timeout to 0 and wait */
|
|
|
|
out_8(&sim->sypcr, SYPCR_SWE | SYPCR_SWRI);
|
|
|
|
|
|
|
|
/* wait for watchdog reset */
|
|
|
|
for (;;)
|
|
|
|
;
|
|
|
|
|
|
|
|
/* we don't return! */
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-08-19 22:01:55 +00:00
|
|
|
#if defined(CONFIG_DISPLAY_CPUINFO)
|
|
|
|
int print_cpuinfo(void)
|
2015-02-12 00:40:00 +00:00
|
|
|
{
|
|
|
|
char buf[32];
|
|
|
|
|
|
|
|
printf("CPU: Freescale Coldfire MCF5307 at %s MHz\n",
|
2022-11-16 18:10:41 +00:00
|
|
|
strmhz(buf, CFG_SYS_CPU_CLK));
|
2015-02-12 00:40:00 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2017-08-19 22:01:55 +00:00
|
|
|
#endif /* CONFIG_DISPLAY_CPUINFO */
|
2015-02-12 00:40:00 +00:00
|
|
|
#endif
|