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