blob: 7a69a00f99a0f0293c1be8127e5ab615933be857 [file] [log] [blame]
Vlad Lungu635e76c2008-01-16 19:27:51 +02001/*
2 * (C) Copyright 2007
Vlad Lungu3987beb2008-05-05 14:20:03 +03003 * Vlad Lungu vlad.lungu@windriver.com
Vlad Lungu635e76c2008-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>
28
Becky Brucebd99ae72008-06-09 16:03:40 -050029phys_size_t initdram(int board_type)
Vlad Lungu635e76c2008-01-16 19:27:51 +020030{
31 /* Sdram is setup by assembler code */
32 /* If memory could be changed, we should return the true value here */
33 return MEM_SIZE*1024*1024;
34}
35
36int checkboard(void)
37{
38 u32 proc_id;
39 u32 config1;
40
Shinya Kuribayashi0fdd27e2008-05-30 00:53:38 +090041 proc_id = read_c0_prid();
Vlad Lungu635e76c2008-01-16 19:27:51 +020042 printf("Board: Qemu -M mips CPU: ");
43 switch (proc_id) {
44 case 0x00018000:
45 printf("4Kc");
46 break;
47 case 0x00018400:
48 printf("4KEcR1");
49 break;
50 case 0x00019000:
51 printf("4KEc");
52 break;
53 case 0x00019300:
Shinya Kuribayashi0fdd27e2008-05-30 00:53:38 +090054 config1 = read_c0_config1();
Vlad Lungu635e76c2008-01-16 19:27:51 +020055 if (config1 & 1)
56 printf("24Kf");
57 else
58 printf("24Kc");
59 break;
60 case 0x00019500:
61 printf("34Kf");
62 break;
63 case 0x00000400:
64 printf("R4000");
65 break;
66 case 0x00018100:
Shinya Kuribayashi0fdd27e2008-05-30 00:53:38 +090067 config1 = read_c0_config1();
Vlad Lungu635e76c2008-01-16 19:27:51 +020068 if (config1 & 1)
69 printf("5Kf");
70 else
71 printf("5Kc");
72 break;
73 case 0x000182a0:
74 printf("20Kc");
75 break;
76
77 default:
78 printf("unknown");
79 }
80 printf(" proc_id=0x%x\n", proc_id);
81
82 return 0;
83}
84
85int misc_init_r(void)
86{
87 set_io_port_base(0);
88 return 0;
89}