mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-17 18:28:55 +00:00
0914011310
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
40 lines
785 B
C
40 lines
785 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* (C) Copyright 2014 Angelo Dureghello <angelo@sysam.it>
|
|
*
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <command.h>
|
|
#include <init.h>
|
|
#include <vsprintf.h>
|
|
#include <asm/immap.h>
|
|
#include <asm/io.h>
|
|
|
|
#ifdef CONFIG_M5307
|
|
int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
|
{
|
|
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;
|
|
}
|
|
|
|
#if defined(CONFIG_DISPLAY_CPUINFO)
|
|
int print_cpuinfo(void)
|
|
{
|
|
char buf[32];
|
|
|
|
printf("CPU: Freescale Coldfire MCF5307 at %s MHz\n",
|
|
strmhz(buf, CONFIG_SYS_CPU_CLK));
|
|
return 0;
|
|
}
|
|
#endif /* CONFIG_DISPLAY_CPUINFO */
|
|
#endif
|