xref: /rk3399_rockchip-uboot/include/configs/qemu-mips.h (revision 14d0a02a168b36e87665b8d7f42fa3e88263d26d)
10764c164SVlad Lungu /*
20764c164SVlad Lungu  * (C) Copyright 2003
30764c164SVlad Lungu  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
40764c164SVlad Lungu  *
50764c164SVlad Lungu  * See file CREDITS for list of people who contributed to this
60764c164SVlad Lungu  * project.
70764c164SVlad Lungu  *
80764c164SVlad Lungu  * This program is free software; you can redistribute it and/or
90764c164SVlad Lungu  * modify it under the terms of the GNU General Public License as
100764c164SVlad Lungu  * published by the Free Software Foundation; either version 2 of
110764c164SVlad Lungu  * the License, or (at your option) any later version.
120764c164SVlad Lungu  *
130764c164SVlad Lungu  * This program is distributed in the hope that it will be useful,
140764c164SVlad Lungu  * but WITHOUT ANY WARRANTY; without even the implied warranty of
150764c164SVlad Lungu  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
160764c164SVlad Lungu  * GNU General Public License for more details.
170764c164SVlad Lungu  *
180764c164SVlad Lungu  * You should have received a copy of the GNU General Public License
190764c164SVlad Lungu  * along with this program; if not, write to the Free Software
200764c164SVlad Lungu  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
210764c164SVlad Lungu  * MA 02111-1307 USA
220764c164SVlad Lungu  */
230764c164SVlad Lungu 
240764c164SVlad Lungu /*
258875e3abSShinya Kuribayashi  * This file contains the configuration parameters for qemu-mips target.
260764c164SVlad Lungu  */
270764c164SVlad Lungu 
280764c164SVlad Lungu #ifndef __CONFIG_H
290764c164SVlad Lungu #define __CONFIG_H
300764c164SVlad Lungu 
310764c164SVlad Lungu #define CONFIG_MIPS32		1	/* MIPS32 CPU core */
320764c164SVlad Lungu #define CONFIG_QEMU_MIPS	1
330764c164SVlad Lungu #define CONFIG_MISC_INIT_R
340764c164SVlad Lungu 
350764c164SVlad Lungu /*IP address is default used by Qemu*/
360764c164SVlad Lungu #define CONFIG_IPADDR		10.0.2.15	/* Our IP address */
370764c164SVlad Lungu #define CONFIG_SERVERIP		10.0.2.2	/* Server IP address */
380764c164SVlad Lungu 
390764c164SVlad Lungu #define CONFIG_BOOTDELAY	10	/* autoboot after 10 seconds */
400764c164SVlad Lungu 
410764c164SVlad Lungu #define CONFIG_BAUDRATE		115200
420764c164SVlad Lungu 
430764c164SVlad Lungu /* valid baudrates */
446d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200 }
450764c164SVlad Lungu 
460764c164SVlad Lungu #define CONFIG_TIMESTAMP		/* Print image info with timestamp */
470764c164SVlad Lungu #undef CONFIG_BOOTARGS
480764c164SVlad Lungu 
490764c164SVlad Lungu #define CONFIG_EXTRA_ENV_SETTINGS					\
500764c164SVlad Lungu 	"addmisc=setenv bootargs ${bootargs} "				\
510764c164SVlad Lungu 		"console=ttyS0,${baudrate} "				\
520764c164SVlad Lungu 		"panic=1\0"						\
530764c164SVlad Lungu 	"bootfile=/tftpboot/vmlinux\0"				\
540764c164SVlad Lungu 	"load=tftp 80500000 ${u-boot}\0"				\
550764c164SVlad Lungu 	""
560764c164SVlad Lungu 
570764c164SVlad Lungu #define CONFIG_BOOTCOMMAND	"bootp;bootelf"
580764c164SVlad Lungu 
590764c164SVlad Lungu /*
600764c164SVlad Lungu  * BOOTP options
610764c164SVlad Lungu  */
620764c164SVlad Lungu #define CONFIG_BOOTP_BOOTFILESIZE
630764c164SVlad Lungu #define CONFIG_BOOTP_BOOTPATH
640764c164SVlad Lungu #define CONFIG_BOOTP_GATEWAY
650764c164SVlad Lungu #define CONFIG_BOOTP_HOSTNAME
660764c164SVlad Lungu 
670764c164SVlad Lungu /*
680764c164SVlad Lungu  * Command line configuration.
690764c164SVlad Lungu  */
700764c164SVlad Lungu #include <config_cmd_default.h>
710764c164SVlad Lungu 
720764c164SVlad Lungu #define CONFIG_CMD_ELF
730764c164SVlad Lungu #define CONFIG_CMD_FAT
740764c164SVlad Lungu #define CONFIG_CMD_EXT2
750764c164SVlad Lungu #undef CONFIG_CMD_LOADB
760764c164SVlad Lungu #undef CONFIG_CMD_LOADS
770764c164SVlad Lungu #define CONFIG_CMD_DHCP
780764c164SVlad Lungu 
790764c164SVlad Lungu #define CONFIG_DRIVER_NE2000
800764c164SVlad Lungu #define CONFIG_DRIVER_NE2000_BASE	(0xb4000300)
810764c164SVlad Lungu 
826d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550
836d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_SERIAL
846d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_REG_SIZE	1
856d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_CLK		115200
866d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_COM1	(0xb40003f8)
870764c164SVlad Lungu #define CONFIG_CONS_INDEX	1
880764c164SVlad Lungu 
890764c164SVlad Lungu #define CONFIG_CMD_IDE
900764c164SVlad Lungu #define CONFIG_DOS_PARTITION
910764c164SVlad Lungu 
926d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IDE_MAXBUS		2
936d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_IDE0_OFFSET	(0x1f0)
946d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_IDE1_OFFSET	(0x170)
956d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_DATA_OFFSET	(0)
966d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_REG_OFFSET	(0)
976d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_BASE_ADDR	(0xb4000000)
980764c164SVlad Lungu 
996d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IDE_MAXDEVICE	(4)
1000764c164SVlad Lungu 
1010764c164SVlad Lungu /*
1020764c164SVlad Lungu  * Miscellaneous configurable options
1030764c164SVlad Lungu  */
1046d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LONGHELP				/* undef to save memory */
1050764c164SVlad Lungu 
1066d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PROMPT		"qemu-mips # "	/* Monitor Command Prompt */
1070764c164SVlad Lungu 
108bed8ce83SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_AUTO_COMPLETE
109bed8ce83SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_CMDLINE_EDITING
1106d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HUSH_PARSER
1116d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PROMPT_HUSH_PS2	"> "
112bed8ce83SJean-Christophe PLAGNIOL-VILLARD 
1136d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CBSIZE		256		/* Console I/O Buffer Size */
1146d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)  /* Print Buffer Size */
1156d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAXARGS		16		/* max number of command args */
1160764c164SVlad Lungu 
1176d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MALLOC_LEN		128*1024
1180764c164SVlad Lungu 
1196d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BOOTPARAMS_LEN	128*1024
1200764c164SVlad Lungu 
1216d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MHZ			132
1220764c164SVlad Lungu 
1236d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MIPS_TIMER_FREQ	(CONFIG_SYS_MHZ * 1000000)
124a55d4817SShinya Kuribayashi 
1256d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HZ			1000
1260764c164SVlad Lungu 
1276d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_BASE		0x80000000	/* Cached addr */
1280764c164SVlad Lungu 
1296d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOAD_ADDR		0x81000000	/* default load address */
1300764c164SVlad Lungu 
1316d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_START	0x80100000
1326d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_END		0x80800000
1330764c164SVlad Lungu 
1340764c164SVlad Lungu /*-----------------------------------------------------------------------
1350764c164SVlad Lungu  * FLASH and environment organization
1360764c164SVlad Lungu  */
1370764c164SVlad Lungu 
1380764c164SVlad Lungu /* The following #defines are needed to get flash environment right */
139*14d0a02aSWolfgang Denk #define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_TEXT_BASE
1406d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_LEN		(192 << 10)
1410764c164SVlad Lungu 
1426d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_SP_OFFSET	0x400000
1430764c164SVlad Lungu 
1440764c164SVlad Lungu /* We boot from this flash, selected with dip switch */
1456d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_BASE		0xbfc00000
1466d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_BANKS	1
1476d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_SECT	128
1486d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_CFI		1	/* Flash memory is CFI compliant */
14900b1883aSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_FLASH_CFI_DRIVER	1
1506d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE	1
1510764c164SVlad Lungu 
1525a1aceb0SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_IS_IN_FLASH	1
15313095b2fSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
1540764c164SVlad Lungu 
1550764c164SVlad Lungu /* Address and size of Primary Environment Sector */
1560e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE		0x8000
157b4aff1ffSJean-Christophe PLAGNIOL-VILLARD 
158b4aff1ffSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_OVERWRITE	1
1598875e3abSShinya Kuribayashi 
1600764c164SVlad Lungu #undef CONFIG_NET_MULTI
1610764c164SVlad Lungu 
1620764c164SVlad Lungu #define MEM_SIZE		128
1630764c164SVlad Lungu 
1640764c164SVlad Lungu #undef CONFIG_MEMSIZE_IN_BYTES
1650764c164SVlad Lungu 
166caf72ff3SLuigi 'Comio' Mantellini #define CONFIG_LZMA
167caf72ff3SLuigi 'Comio' Mantellini 
1680764c164SVlad Lungu /*-----------------------------------------------------------------------
1690764c164SVlad Lungu  * Cache Configuration
1700764c164SVlad Lungu  */
1716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_DCACHE_SIZE		16384
1726d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ICACHE_SIZE		16384
1736d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CACHELINE_SIZE	32
1740764c164SVlad Lungu 
1750764c164SVlad Lungu #endif /* __CONFIG_H */
176