1*83d290c5STom Rini // SPDX-License-Identifier: GPL-2.0+ 20764c164SVlad Lungu /* 30764c164SVlad Lungu * (C) Copyright 2007 4045b4d2dSVlad Lungu * Vlad Lungu vlad.lungu@windriver.com 50764c164SVlad Lungu */ 60764c164SVlad Lungu 70764c164SVlad Lungu #include <common.h> 80764c164SVlad Lungu #include <command.h> 90764c164SVlad Lungu #include <asm/mipsregs.h> 100764c164SVlad Lungu #include <asm/io.h> 11d0201692SBernhard Kaindl #include <netdev.h> 120764c164SVlad Lungu 13088454cdSSimon Glass DECLARE_GLOBAL_DATA_PTR; 14088454cdSSimon Glass dram_init(void)15f1683aa7SSimon Glassint dram_init(void) 160764c164SVlad Lungu { 170764c164SVlad Lungu /* Sdram is setup by assembler code */ 180764c164SVlad Lungu /* If memory could be changed, we should return the true value here */ 19088454cdSSimon Glass gd->ram_size = MEM_SIZE * 1024 * 1024; 20088454cdSSimon Glass 21088454cdSSimon Glass return 0; 220764c164SVlad Lungu } 230764c164SVlad Lungu checkboard(void)240764c164SVlad Lunguint checkboard(void) 250764c164SVlad Lungu { 260764c164SVlad Lungu u32 proc_id; 270764c164SVlad Lungu u32 config1; 280764c164SVlad Lungu 29e2ad8426SShinya Kuribayashi proc_id = read_c0_prid(); 300764c164SVlad Lungu printf("Board: Qemu -M mips CPU: "); 310764c164SVlad Lungu switch (proc_id) { 320764c164SVlad Lungu case 0x00018000: 330764c164SVlad Lungu printf("4Kc"); 340764c164SVlad Lungu break; 350764c164SVlad Lungu case 0x00018400: 360764c164SVlad Lungu printf("4KEcR1"); 370764c164SVlad Lungu break; 380764c164SVlad Lungu case 0x00019000: 390764c164SVlad Lungu printf("4KEc"); 400764c164SVlad Lungu break; 410764c164SVlad Lungu case 0x00019300: 42e2ad8426SShinya Kuribayashi config1 = read_c0_config1(); 430764c164SVlad Lungu if (config1 & 1) 440764c164SVlad Lungu printf("24Kf"); 450764c164SVlad Lungu else 460764c164SVlad Lungu printf("24Kc"); 470764c164SVlad Lungu break; 480764c164SVlad Lungu case 0x00019500: 490764c164SVlad Lungu printf("34Kf"); 500764c164SVlad Lungu break; 510764c164SVlad Lungu case 0x00000400: 520764c164SVlad Lungu printf("R4000"); 530764c164SVlad Lungu break; 540764c164SVlad Lungu case 0x00018100: 55e2ad8426SShinya Kuribayashi config1 = read_c0_config1(); 560764c164SVlad Lungu if (config1 & 1) 570764c164SVlad Lungu printf("5Kf"); 580764c164SVlad Lungu else 590764c164SVlad Lungu printf("5Kc"); 600764c164SVlad Lungu break; 610764c164SVlad Lungu case 0x000182a0: 620764c164SVlad Lungu printf("20Kc"); 630764c164SVlad Lungu break; 640764c164SVlad Lungu 650764c164SVlad Lungu default: 660764c164SVlad Lungu printf("unknown"); 670764c164SVlad Lungu } 680764c164SVlad Lungu printf(" proc_id=0x%x\n", proc_id); 690764c164SVlad Lungu 700764c164SVlad Lungu return 0; 710764c164SVlad Lungu } 720764c164SVlad Lungu misc_init_r(void)730764c164SVlad Lunguint misc_init_r(void) 740764c164SVlad Lungu { 750764c164SVlad Lungu set_io_port_base(0); 760764c164SVlad Lungu return 0; 770764c164SVlad Lungu } 78d0201692SBernhard Kaindl board_eth_init(bd_t * bis)79d0201692SBernhard Kaindlint board_eth_init(bd_t *bis) 80d0201692SBernhard Kaindl { 81d0201692SBernhard Kaindl return ne2k_register(); 82d0201692SBernhard Kaindl } 83