]>
Commit | Line | Data |
---|---|---|
0764c164 VL |
1 | /* |
2 | * (C) Copyright 2007 | |
045b4d2d | 3 | * Vlad Lungu vlad.lungu@windriver.com |
0764c164 | 4 | * |
1a459660 | 5 | * SPDX-License-Identifier: GPL-2.0+ |
0764c164 VL |
6 | */ |
7 | ||
8 | #include <common.h> | |
9 | #include <command.h> | |
10 | #include <asm/mipsregs.h> | |
11 | #include <asm/io.h> | |
d0201692 | 12 | #include <netdev.h> |
0764c164 | 13 | |
088454cd SG |
14 | DECLARE_GLOBAL_DATA_PTR; |
15 | ||
16 | int initdram(void) | |
0764c164 VL |
17 | { |
18 | /* Sdram is setup by assembler code */ | |
19 | /* If memory could be changed, we should return the true value here */ | |
088454cd SG |
20 | gd->ram_size = MEM_SIZE * 1024 * 1024; |
21 | ||
22 | return 0; | |
0764c164 VL |
23 | } |
24 | ||
25 | int checkboard(void) | |
26 | { | |
27 | u32 proc_id; | |
28 | u32 config1; | |
29 | ||
e2ad8426 | 30 | proc_id = read_c0_prid(); |
0764c164 VL |
31 | printf("Board: Qemu -M mips CPU: "); |
32 | switch (proc_id) { | |
33 | case 0x00018000: | |
34 | printf("4Kc"); | |
35 | break; | |
36 | case 0x00018400: | |
37 | printf("4KEcR1"); | |
38 | break; | |
39 | case 0x00019000: | |
40 | printf("4KEc"); | |
41 | break; | |
42 | case 0x00019300: | |
e2ad8426 | 43 | config1 = read_c0_config1(); |
0764c164 VL |
44 | if (config1 & 1) |
45 | printf("24Kf"); | |
46 | else | |
47 | printf("24Kc"); | |
48 | break; | |
49 | case 0x00019500: | |
50 | printf("34Kf"); | |
51 | break; | |
52 | case 0x00000400: | |
53 | printf("R4000"); | |
54 | break; | |
55 | case 0x00018100: | |
e2ad8426 | 56 | config1 = read_c0_config1(); |
0764c164 VL |
57 | if (config1 & 1) |
58 | printf("5Kf"); | |
59 | else | |
60 | printf("5Kc"); | |
61 | break; | |
62 | case 0x000182a0: | |
63 | printf("20Kc"); | |
64 | break; | |
65 | ||
66 | default: | |
67 | printf("unknown"); | |
68 | } | |
69 | printf(" proc_id=0x%x\n", proc_id); | |
70 | ||
71 | return 0; | |
72 | } | |
73 | ||
74 | int misc_init_r(void) | |
75 | { | |
76 | set_io_port_base(0); | |
77 | return 0; | |
78 | } | |
d0201692 BK |
79 | |
80 | int board_eth_init(bd_t *bis) | |
81 | { | |
82 | return ne2k_register(); | |
83 | } |