blob: 8e1cc4e1fea24b7df24e135ff87c218ef02c9b24 [file] [log] [blame]
wdenkc0218802003-03-27 12:09:35 +00001/*
2 * (C) Copyright 2003
3 * Wolfgang Denk, DENX Software Engineering, <wd@denx.de>
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
wdenkc0218802003-03-27 12:09:35 +00006 */
7
8#include <common.h>
9#include <command.h>
Shinya Kuribayashi5dfb3ee2008-10-19 12:08:50 +090010#include <netdev.h>
wdenk5da627a2003-10-09 20:09:04 +000011#include <asm/mipsregs.h>
Shinya Kuribayashib0c66af2008-03-25 21:30:07 +090012#include <asm/reboot.h>
Shinya Kuribayashiccf8f822008-03-25 21:30:06 +090013
Shinya Kuribayashib0c66af2008-03-25 21:30:07 +090014void __attribute__((weak)) _machine_restart(void)
15{
16}
17
Wolfgang Denk54841ab2010-06-28 22:00:46 +020018int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
wdenkc0218802003-03-27 12:09:35 +000019{
Shinya Kuribayashib0c66af2008-03-25 21:30:07 +090020 _machine_restart();
wdenk3e386912003-04-05 00:53:31 +000021
wdenkc0218802003-03-27 12:09:35 +000022 fprintf(stderr, "*** reset failed ***\n");
23 return 0;
24}
25
Shinya Kuribayashi03c031d2007-10-27 15:27:06 +090026void write_one_tlb(int index, u32 pagemask, u32 hi, u32 low0, u32 low1)
27{
Shinya Kuribayashie2ad8422008-05-30 00:53:38 +090028 write_c0_entrylo0(low0);
29 write_c0_pagemask(pagemask);
30 write_c0_entrylo1(low1);
31 write_c0_entryhi(hi);
32 write_c0_index(index);
wdenk5da627a2003-10-09 20:09:04 +000033 tlb_write_indexed();
34}
Shinya Kuribayashi5dfb3ee2008-10-19 12:08:50 +090035
36int cpu_eth_init(bd_t *bis)
37{
38#ifdef CONFIG_SOC_AU1X00
39 au1x00_enet_initialize(bis);
40#endif
41 return 0;
42}