blob: 563044eb0c4184391c318039c898b931160b2cf7 [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 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Vlad Lungu635e76c2008-01-16 19:27:51 +02006 */
7
8#include <common.h>
9#include <command.h>
10#include <asm/mipsregs.h>
11#include <asm/io.h>
Bernhard Kaindladb18ea2011-10-20 10:56:59 +000012#include <netdev.h>
Vlad Lungu635e76c2008-01-16 19:27:51 +020013
Becky Brucebd99ae72008-06-09 16:03:40 -050014phys_size_t initdram(int board_type)
Vlad Lungu635e76c2008-01-16 19:27:51 +020015{
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
21int checkboard(void)
22{
23 u32 proc_id;
24 u32 config1;
25
Shinya Kuribayashi0fdd27e2008-05-30 00:53:38 +090026 proc_id = read_c0_prid();
Vlad Lungu635e76c2008-01-16 19:27:51 +020027 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:
Shinya Kuribayashi0fdd27e2008-05-30 00:53:38 +090039 config1 = read_c0_config1();
Vlad Lungu635e76c2008-01-16 19:27:51 +020040 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:
Shinya Kuribayashi0fdd27e2008-05-30 00:53:38 +090052 config1 = read_c0_config1();
Vlad Lungu635e76c2008-01-16 19:27:51 +020053 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
70int misc_init_r(void)
71{
72 set_io_port_base(0);
73 return 0;
74}
Bernhard Kaindladb18ea2011-10-20 10:56:59 +000075
76int board_eth_init(bd_t *bis)
77{
78 return ne2k_register();
79}