]>
git.ipfire.org Git - people/ms/u-boot.git/blob - arch/sparc/cpu/leon3/cpu.c
1 /* CPU specific code for the LEON3 CPU
3 * (C) Copyright 2007, 2015
4 * Daniel Hellstrom, Cobham Gaisler, daniel@gaisler.com
6 * SPDX-License-Identifier: GPL-2.0+
15 #include <asm/processor.h>
18 DECLARE_GLOBAL_DATA_PTR
;
20 extern void _reset_reloc(void);
24 unsigned int leon_cpu_freq
= CONFIG_SYS_CLK_FREQ
;
31 ambapp_ahbmst_find(&ambapp_plb
, VENDOR_GAISLER
,
32 GAISLER_LEON3
, 0, &dev
);
34 ambapp_ahbmst_find(&ambapp_plb
, VENDOR_GAISLER
,
35 GAISLER_LEON4
, 0, &dev
);
38 leon_cpu_freq
= ambapp_bus_freq(&ambapp_plb
, dev
.ahb_bus_index
);
48 /* check LEON version here */
49 cnt
= ambapp_ahbmst_count(&ambapp_plb
, VENDOR_GAISLER
, GAISLER_LEON3
);
51 cnt
= ambapp_ahbmst_count(&ambapp_plb
, VENDOR_GAISLER
,
66 printf("CPU: %sLEON%d @ %dMHz\n", str
, leon_ver
,
67 leon_cpu_freq
/ 1000000);
72 #ifdef CONFIG_DISPLAY_CPUINFO
74 int print_cpuinfo(void)
76 printf("CPU: LEON3\n");
82 /* ------------------------------------------------------------------------- */
89 /* jump to restart in flash */
93 int do_reset(cmd_tbl_t
* cmdtp
, int flag
, int argc
, char * const argv
[])
101 u64
flash_read64(void *addr
)
103 return __raw_readq(addr
);
106 /* ------------------------------------------------------------------------- */
109 int cpu_eth_init(bd_t
*bis
)
111 return greth_initialize(bis
);