]>
Commit | Line | Data |
---|---|---|
5c952cf0 WD |
1 | /* |
2 | * (C) Copyright 2004, Psyent Corporation <www.psyent.com> | |
3 | * Scott McNutt <smcnutt@psyent.com> | |
4 | * | |
1a459660 | 5 | * SPDX-License-Identifier: GPL-2.0+ |
5c952cf0 WD |
6 | */ |
7 | ||
8 | #include <common.h> | |
9 | #include <nios2.h> | |
10 | #include <nios2-io.h> | |
f956ad98 | 11 | #include <asm/cache.h> |
5c952cf0 | 12 | |
6d0f6bcf | 13 | #if defined (CONFIG_SYS_NIOS_SYSID_BASE) |
0c1c117c | 14 | extern void display_sysid (void); |
6d0f6bcf | 15 | #endif /* CONFIG_SYS_NIOS_SYSID_BASE */ |
5c952cf0 WD |
16 | |
17 | int checkcpu (void) | |
18 | { | |
19 | printf ("CPU : Nios-II\n"); | |
6d0f6bcf | 20 | #if !defined(CONFIG_SYS_NIOS_SYSID_BASE) |
5c952cf0 WD |
21 | printf ("SYSID : <unknown>\n"); |
22 | #else | |
0c1c117c | 23 | display_sysid (); |
5c952cf0 WD |
24 | #endif |
25 | return (0); | |
26 | } | |
27 | ||
882b7d72 | 28 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
5c952cf0 | 29 | { |
7a6a7d10 TC |
30 | disable_interrupts(); |
31 | /* indirect call to go beyond 256MB limitation of toolchain */ | |
32 | nios2_callr(CONFIG_SYS_RESET_ADDR); | |
33 | return 0; | |
5c952cf0 | 34 | } |
f956ad98 JF |
35 | |
36 | int dcache_status(void) | |
37 | { | |
38 | return 1; | |
39 | } | |
40 | ||
41 | void dcache_enable(void) | |
42 | { | |
43 | flush_dcache(CONFIG_SYS_DCACHE_SIZE, CONFIG_SYS_DCACHELINE_SIZE); | |
44 | } | |
45 | ||
46 | void dcache_disable(void) | |
47 | { | |
48 | flush_dcache(CONFIG_SYS_DCACHE_SIZE, CONFIG_SYS_DCACHELINE_SIZE); | |
49 | } |