]>
Commit | Line | Data |
---|---|---|
32afad78 ZZ |
1 | /* |
2 | * (C) Copyright 2003 | |
3 | * Wolfgang Denk, DENX Software Engineering, <wd@denx.de> | |
4 | * | |
1a459660 | 5 | * SPDX-License-Identifier: GPL-2.0+ |
32afad78 ZZ |
6 | */ |
7 | ||
8 | #include <common.h> | |
9 | #include <command.h> | |
eef88dfb | 10 | #include <linux/compiler.h> |
8cb4817d | 11 | #include <asm/cache.h> |
32afad78 | 12 | #include <asm/mipsregs.h> |
32afad78 ZZ |
13 | #include <asm/reboot.h> |
14 | ||
5e36546c | 15 | #ifndef CONFIG_SYSRESET |
eef88dfb | 16 | void __weak _machine_restart(void) |
32afad78 ZZ |
17 | { |
18 | fprintf(stderr, "*** reset failed ***\n"); | |
19 | ||
20 | while (1) | |
21 | /* NOP */; | |
22 | } | |
23 | ||
24 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) | |
25 | { | |
26 | _machine_restart(); | |
27 | ||
28 | return 0; | |
29 | } | |
5e36546c | 30 | #endif |
32afad78 | 31 | |
32afad78 ZZ |
32 | void write_one_tlb(int index, u32 pagemask, u32 hi, u32 low0, u32 low1) |
33 | { | |
34 | write_c0_entrylo0(low0); | |
35 | write_c0_pagemask(pagemask); | |
36 | write_c0_entrylo1(low1); | |
37 | write_c0_entryhi(hi); | |
38 | write_c0_index(index); | |
39 | tlb_write_indexed(); | |
40 | } | |
8cb4817d PB |
41 | |
42 | int arch_cpu_init(void) | |
43 | { | |
44 | mips_cache_probe(); | |
45 | return 0; | |
46 | } |