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