avionic design with actual uboot and tooling
submodule of avionic design uboot bootloader and with included tools to get you started , read readme.md and readme-tk1-loader.md
This commit is contained in:
36
u-boot/arch/m68k/cpu/mcf530x/cpu.c
Normal file
36
u-boot/arch/m68k/cpu/mcf530x/cpu.c
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user