diff options
author | angelo@sysam.it <angelo@sysam.it> | 2015-02-12 01:40:00 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-03-05 20:13:21 -0500 |
commit | e77e65dfc2f803e7dd78f5bb2bc6b3750635cedd (patch) | |
tree | b2bd4bce76fb02f4756c977d966b35def10ba234 /arch/m68k/cpu/mcf530x/cpu.c | |
parent | 06fd66a4aa8f0bdb0e78072593728fa31be8dadf (diff) | |
download | u-boot-imx-e77e65dfc2f803e7dd78f5bb2bc6b3750635cedd.zip u-boot-imx-e77e65dfc2f803e7dd78f5bb2bc6b3750635cedd.tar.gz u-boot-imx-e77e65dfc2f803e7dd78f5bb2bc6b3750635cedd.tar.bz2 |
m68k: add mcf5307 cpu support
Add Freescale MCF5307 cpu support.
Signed-off-by: Angelo Dureghello <angelo@sysam.it>
Diffstat (limited to 'arch/m68k/cpu/mcf530x/cpu.c')
-rw-r--r-- | arch/m68k/cpu/mcf530x/cpu.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/m68k/cpu/mcf530x/cpu.c b/arch/m68k/cpu/mcf530x/cpu.c new file mode 100644 index 0000000..78f4385 --- /dev/null +++ b/arch/m68k/cpu/mcf530x/cpu.c @@ -0,0 +1,36 @@ +/* + * (C) Copyright 2014 Angelo Dureghello <angelo@sysam.it> + * + * SPDX-License-Identifier: GPL-2.0+ + * + */ + +#include <common.h> +#include <asm/immap.h> +#include <asm/io.h> + +#ifdef CONFIG_M5307 +int do_reset(cmd_tbl_t *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; +} + +int checkcpu(void) +{ + char buf[32]; + + printf("CPU: Freescale Coldfire MCF5307 at %s MHz\n", + strmhz(buf, CONFIG_SYS_CPU_CLK)); + return 0; +} +#endif |