blob: 2b3a1d6b0992f79157246655f3bfed5daff4a6fd [file] [log] [blame]
Vlad Lungu0764c162008-01-16 19:27:51 +02001/*
2 * (C) Copyright 2007
Vlad Lungu045b4d22008-05-05 14:20:03 +03003 * Vlad Lungu vlad.lungu@windriver.com
Vlad Lungu0764c162008-01-16 19:27:51 +02004 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * MA 02111-1307 USA
22 */
23
24#include <common.h>
25#include <command.h>
26#include <asm/mipsregs.h>
27#include <asm/io.h>
Bernhard Kaindld0201692011-10-20 10:56:59 +000028#include <netdev.h>
Vlad Lungu0764c162008-01-16 19:27:51 +020029
Becky Bruce9973e3c2008-06-09 16:03:40 -050030phys_size_t initdram(int board_type)
Vlad Lungu0764c162008-01-16 19:27:51 +020031{
32 /* Sdram is setup by assembler code */
33 /* If memory could be changed, we should return the true value here */
34 return MEM_SIZE*1024*1024;
35}
36
37int checkboard(void)
38{
39 u32 proc_id;
40 u32 config1;
41
Shinya Kuribayashie2ad8422008-05-30 00:53:38 +090042 proc_id = read_c0_prid();
Vlad Lungu0764c162008-01-16 19:27:51 +020043 printf("Board: Qemu -M mips CPU: ");
44 switch (proc_id) {
45 case 0x00018000:
46 printf("4Kc");
47 break;
48 case 0x00018400:
49 printf("4KEcR1");
50 break;
51 case 0x00019000:
52 printf("4KEc");
53 break;
54 case 0x00019300:
Shinya Kuribayashie2ad8422008-05-30 00:53:38 +090055 config1 = read_c0_config1();
Vlad Lungu0764c162008-01-16 19:27:51 +020056 if (config1 & 1)
57 printf("24Kf");
58 else
59 printf("24Kc");
60 break;
61 case 0x00019500:
62 printf("34Kf");
63 break;
64 case 0x00000400:
65 printf("R4000");
66 break;
67 case 0x00018100:
Shinya Kuribayashie2ad8422008-05-30 00:53:38 +090068 config1 = read_c0_config1();
Vlad Lungu0764c162008-01-16 19:27:51 +020069 if (config1 & 1)
70 printf("5Kf");
71 else
72 printf("5Kc");
73 break;
74 case 0x000182a0:
75 printf("20Kc");
76 break;
77
78 default:
79 printf("unknown");
80 }
81 printf(" proc_id=0x%x\n", proc_id);
82
83 return 0;
84}
85
86int misc_init_r(void)
87{
88 set_io_port_base(0);
89 return 0;
90}
Bernhard Kaindld0201692011-10-20 10:56:59 +000091
92int board_eth_init(bd_t *bis)
93{
94 return ne2k_register();
95}