]> git.sur5r.net Git - u-boot/blob - arch/sparc/cpu/leon3/cpu.c
sparc: Add CONFIG_DISPLAY_BOARDINFO variable to all LEON boards
[u-boot] / arch / sparc / cpu / leon3 / cpu.c
1 /* CPU specific code for the LEON3 CPU
2  *
3  * (C) Copyright 2007, 2015
4  * Daniel Hellstrom, Cobham Gaisler, daniel@gaisler.com
5  *
6  * SPDX-License-Identifier:     GPL-2.0+
7  */
8
9 #include <common.h>
10 #include <watchdog.h>
11 #include <command.h>
12 #include <netdev.h>
13
14 #include <asm/io.h>
15 #include <asm/processor.h>
16
17 DECLARE_GLOBAL_DATA_PTR;
18
19 extern void _reset_reloc(void);
20
21 int checkcpu(void)
22 {
23         /* check LEON version here */
24         printf("CPU: LEON3\n");
25         return 0;
26 }
27
28 #ifdef CONFIG_DISPLAY_CPUINFO
29
30 int print_cpuinfo(void)
31 {
32         printf("CPU:   LEON3\n");
33         return 0;
34 }
35
36 #endif
37
38 /* ------------------------------------------------------------------------- */
39
40 void cpu_reset(void)
41 {
42         /* Interrupts off */
43         disable_interrupts();
44
45         /* jump to restart in flash */
46         _reset_reloc();
47 }
48
49 int do_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
50 {
51         cpu_reset();
52
53         return 1;
54
55 }
56
57 u64 flash_read64(void *addr)
58 {
59         return __raw_readq(addr);
60 }
61
62 /* ------------------------------------------------------------------------- */
63
64 #ifdef CONFIG_GRETH
65 int cpu_eth_init(bd_t *bis)
66 {
67         return greth_initialize(bis);
68 }
69 #endif