2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2008-01-16 17:27:51 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2007
|
2008-05-05 11:20:03 +00:00
|
|
|
* Vlad Lungu vlad.lungu@windriver.com
|
2008-01-16 17:27:51 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <command.h>
|
2020-05-10 17:40:02 +00:00
|
|
|
#include <init.h>
|
2020-05-10 17:39:56 +00:00
|
|
|
#include <net.h>
|
2020-10-31 03:38:53 +00:00
|
|
|
#include <asm/global_data.h>
|
2008-01-16 17:27:51 +00:00
|
|
|
#include <asm/mipsregs.h>
|
|
|
|
#include <asm/io.h>
|
2011-10-20 10:56:59 +00:00
|
|
|
#include <netdev.h>
|
2008-01-16 17:27:51 +00:00
|
|
|
|
2017-03-31 14:40:25 +00:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2017-04-06 18:47:05 +00:00
|
|
|
int dram_init(void)
|
2008-01-16 17:27:51 +00:00
|
|
|
{
|
|
|
|
/* Sdram is setup by assembler code */
|
|
|
|
/* If memory could be changed, we should return the true value here */
|
2017-03-31 14:40:25 +00:00
|
|
|
gd->ram_size = MEM_SIZE * 1024 * 1024;
|
|
|
|
|
|
|
|
return 0;
|
2008-01-16 17:27:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int checkboard(void)
|
|
|
|
{
|
|
|
|
u32 proc_id;
|
|
|
|
u32 config1;
|
|
|
|
|
2008-05-29 15:53:38 +00:00
|
|
|
proc_id = read_c0_prid();
|
2008-01-16 17:27:51 +00:00
|
|
|
printf("Board: Qemu -M mips CPU: ");
|
|
|
|
switch (proc_id) {
|
|
|
|
case 0x00018000:
|
|
|
|
printf("4Kc");
|
|
|
|
break;
|
|
|
|
case 0x00018400:
|
|
|
|
printf("4KEcR1");
|
|
|
|
break;
|
|
|
|
case 0x00019000:
|
|
|
|
printf("4KEc");
|
|
|
|
break;
|
|
|
|
case 0x00019300:
|
2008-05-29 15:53:38 +00:00
|
|
|
config1 = read_c0_config1();
|
2008-01-16 17:27:51 +00:00
|
|
|
if (config1 & 1)
|
|
|
|
printf("24Kf");
|
|
|
|
else
|
|
|
|
printf("24Kc");
|
|
|
|
break;
|
|
|
|
case 0x00019500:
|
|
|
|
printf("34Kf");
|
|
|
|
break;
|
|
|
|
case 0x00000400:
|
|
|
|
printf("R4000");
|
|
|
|
break;
|
|
|
|
case 0x00018100:
|
2008-05-29 15:53:38 +00:00
|
|
|
config1 = read_c0_config1();
|
2008-01-16 17:27:51 +00:00
|
|
|
if (config1 & 1)
|
|
|
|
printf("5Kf");
|
|
|
|
else
|
|
|
|
printf("5Kc");
|
|
|
|
break;
|
|
|
|
case 0x000182a0:
|
|
|
|
printf("20Kc");
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
printf("unknown");
|
|
|
|
}
|
|
|
|
printf(" proc_id=0x%x\n", proc_id);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int misc_init_r(void)
|
|
|
|
{
|
|
|
|
set_io_port_base(0);
|
|
|
|
return 0;
|
|
|
|
}
|
2011-10-20 10:56:59 +00:00
|
|
|
|
2020-06-26 06:13:33 +00:00
|
|
|
int board_eth_init(struct bd_info *bis)
|
2011-10-20 10:56:59 +00:00
|
|
|
{
|
|
|
|
return ne2k_register();
|
|
|
|
}
|