2008-03-28 09:00:33 +00:00
|
|
|
/* CPU specific code for the LEON2 CPU
|
|
|
|
*
|
|
|
|
* (C) Copyright 2007
|
|
|
|
* Daniel Hellstrom, Gaisler Research, daniel@gaisler.com
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2008-03-28 09:00:33 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <watchdog.h>
|
|
|
|
#include <command.h>
|
2008-09-01 05:22:04 +00:00
|
|
|
#include <netdev.h>
|
2008-03-28 09:00:33 +00:00
|
|
|
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
|
|
|
extern void _reset_reloc(void);
|
|
|
|
|
|
|
|
int checkcpu(void)
|
|
|
|
{
|
|
|
|
/* check LEON version here */
|
|
|
|
printf("CPU: LEON2\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
void cpu_reset(void)
|
|
|
|
{
|
|
|
|
/* Interrupts off */
|
|
|
|
disable_interrupts();
|
|
|
|
|
|
|
|
/* jump to restart in flash */
|
|
|
|
_reset_reloc();
|
|
|
|
}
|
|
|
|
|
2010-06-28 20:00:46 +00:00
|
|
|
int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
|
2008-03-28 09:00:33 +00:00
|
|
|
{
|
|
|
|
cpu_reset();
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
2008-07-09 08:04:19 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_GRETH
|
|
|
|
int cpu_eth_init(bd_t *bis)
|
|
|
|
{
|
|
|
|
return greth_initialize(bis);
|
|
|
|
}
|
|
|
|
#endif
|