common: Drop init.h from common header
[pandora-u-boot.git] / arch / m68k / cpu / mcf530x / cpu.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * (C) Copyright 2014  Angelo Dureghello <angelo@sysam.it>
4  *
5  */
6
7 #include <common.h>
8 #include <init.h>
9 #include <vsprintf.h>
10 #include <asm/immap.h>
11 #include <asm/io.h>
12
13 #ifdef CONFIG_M5307
14 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
15 {
16         sim_t *sim = (sim_t *)(MMAP_SIM);
17
18         /* enable watchdog/reset, set timeout to 0 and wait */
19         out_8(&sim->sypcr, SYPCR_SWE | SYPCR_SWRI);
20
21         /* wait for watchdog reset */
22         for (;;)
23                 ;
24
25         /* we don't return! */
26         return 0;
27 }
28
29 #if defined(CONFIG_DISPLAY_CPUINFO)
30 int print_cpuinfo(void)
31 {
32         char buf[32];
33
34         printf("CPU:   Freescale Coldfire MCF5307 at %s MHz\n",
35                strmhz(buf, CONFIG_SYS_CPU_CLK));
36         return 0;
37 }
38 #endif /* CONFIG_DISPLAY_CPUINFO */
39 #endif