wdenk | c021880 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2003 |
| 3 | * Wolfgang Denk, DENX Software Engineering, <wd@denx.de> |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | c021880 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
| 9 | #include <command.h> |
Shinya Kuribayashi | 5dfb3ee | 2008-10-19 12:08:50 +0900 | [diff] [blame] | 10 | #include <netdev.h> |
wdenk | 5da627a | 2003-10-09 20:09:04 +0000 | [diff] [blame] | 11 | #include <asm/mipsregs.h> |
Shinya Kuribayashi | b0c66af | 2008-03-25 21:30:07 +0900 | [diff] [blame] | 12 | #include <asm/reboot.h> |
Shinya Kuribayashi | ccf8f82 | 2008-03-25 21:30:06 +0900 | [diff] [blame] | 13 | |
Shinya Kuribayashi | b0c66af | 2008-03-25 21:30:07 +0900 | [diff] [blame] | 14 | void __attribute__((weak)) _machine_restart(void) |
| 15 | { |
| 16 | } |
| 17 | |
Wolfgang Denk | 54841ab | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 18 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
wdenk | c021880 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 19 | { |
Shinya Kuribayashi | b0c66af | 2008-03-25 21:30:07 +0900 | [diff] [blame] | 20 | _machine_restart(); |
wdenk | 3e38691 | 2003-04-05 00:53:31 +0000 | [diff] [blame] | 21 | |
wdenk | c021880 | 2003-03-27 12:09:35 +0000 | [diff] [blame] | 22 | fprintf(stderr, "*** reset failed ***\n"); |
| 23 | return 0; |
| 24 | } |
| 25 | |
Shinya Kuribayashi | 03c031d | 2007-10-27 15:27:06 +0900 | [diff] [blame] | 26 | void write_one_tlb(int index, u32 pagemask, u32 hi, u32 low0, u32 low1) |
| 27 | { |
Shinya Kuribayashi | e2ad842 | 2008-05-30 00:53:38 +0900 | [diff] [blame] | 28 | write_c0_entrylo0(low0); |
| 29 | write_c0_pagemask(pagemask); |
| 30 | write_c0_entrylo1(low1); |
| 31 | write_c0_entryhi(hi); |
| 32 | write_c0_index(index); |
wdenk | 5da627a | 2003-10-09 20:09:04 +0000 | [diff] [blame] | 33 | tlb_write_indexed(); |
| 34 | } |
Shinya Kuribayashi | 5dfb3ee | 2008-10-19 12:08:50 +0900 | [diff] [blame] | 35 | |
| 36 | int cpu_eth_init(bd_t *bis) |
| 37 | { |
| 38 | #ifdef CONFIG_SOC_AU1X00 |
| 39 | au1x00_enet_initialize(bis); |
| 40 | #endif |
| 41 | return 0; |
| 42 | } |