Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
angelo@sysam.it | bb4ba2c | 2015-02-12 01:40:00 +0100 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2014 Angelo Dureghello <angelo@sysam.it> |
| 4 | * |
angelo@sysam.it | bb4ba2c | 2015-02-12 01:40:00 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <asm/immap.h> |
| 9 | #include <asm/io.h> |
| 10 | |
| 11 | #ifdef CONFIG_M5307 |
| 12 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
| 13 | { |
| 14 | sim_t *sim = (sim_t *)(MMAP_SIM); |
| 15 | |
| 16 | /* enable watchdog/reset, set timeout to 0 and wait */ |
| 17 | out_8(&sim->sypcr, SYPCR_SWE | SYPCR_SWRI); |
| 18 | |
| 19 | /* wait for watchdog reset */ |
| 20 | for (;;) |
| 21 | ; |
| 22 | |
| 23 | /* we don't return! */ |
| 24 | return 0; |
| 25 | } |
| 26 | |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 27 | #if defined(CONFIG_DISPLAY_CPUINFO) |
| 28 | int print_cpuinfo(void) |
angelo@sysam.it | bb4ba2c | 2015-02-12 01:40:00 +0100 | [diff] [blame] | 29 | { |
| 30 | char buf[32]; |
| 31 | |
| 32 | printf("CPU: Freescale Coldfire MCF5307 at %s MHz\n", |
| 33 | strmhz(buf, CONFIG_SYS_CPU_CLK)); |
| 34 | return 0; |
| 35 | } |
Angelo Dureghello | 3146b4d | 2017-08-20 00:01:55 +0200 | [diff] [blame] | 36 | #endif /* CONFIG_DISPLAY_CPUINFO */ |
angelo@sysam.it | bb4ba2c | 2015-02-12 01:40:00 +0100 | [diff] [blame] | 37 | #endif |