xref: /rk3399_rockchip-uboot/include/configs/qemu-mips.h (revision 0e8d158664a913392cb01fb11a948d83f72e105e)
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 */
440764c164SVlad Lungu #define CFG_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 
820764c164SVlad Lungu #define CFG_NS16550
830764c164SVlad Lungu #define CFG_NS16550_SERIAL
840764c164SVlad Lungu #define CFG_NS16550_REG_SIZE	1
850764c164SVlad Lungu #define CFG_NS16550_CLK		115200
860764c164SVlad Lungu #define CFG_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 
920764c164SVlad Lungu #define CFG_IDE_MAXBUS		2
930764c164SVlad Lungu #define CFG_ATA_IDE0_OFFSET	(0x1f0)
940764c164SVlad Lungu #define CFG_ATA_IDE1_OFFSET	(0x170)
950764c164SVlad Lungu #define CFG_ATA_DATA_OFFSET	(0)
960764c164SVlad Lungu #define CFG_ATA_REG_OFFSET	(0)
970764c164SVlad Lungu #define CFG_ATA_BASE_ADDR	(0xb4000000)
980764c164SVlad Lungu 
990764c164SVlad Lungu #define CFG_IDE_MAXDEVICE	(4)
1000764c164SVlad Lungu 
1010764c164SVlad Lungu /*
1020764c164SVlad Lungu  * Miscellaneous configurable options
1030764c164SVlad Lungu  */
1040764c164SVlad Lungu #define CFG_LONGHELP				/* undef to save memory */
1050764c164SVlad Lungu 
1060764c164SVlad Lungu #define CFG_PROMPT		"qemu-mips # "	/* Monitor Command Prompt */
1070764c164SVlad Lungu 
108bed8ce83SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_AUTO_COMPLETE
109bed8ce83SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_CMDLINE_EDITING
110bed8ce83SJean-Christophe PLAGNIOL-VILLARD #define CFG_HUSH_PARSER
111bed8ce83SJean-Christophe PLAGNIOL-VILLARD #define CFG_PROMPT_HUSH_PS2	"> "
112bed8ce83SJean-Christophe PLAGNIOL-VILLARD 
1130764c164SVlad Lungu #define CFG_CBSIZE		256		/* Console I/O Buffer Size */
1140764c164SVlad Lungu #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16)  /* Print Buffer Size */
1150764c164SVlad Lungu #define CFG_MAXARGS		16		/* max number of command args */
1160764c164SVlad Lungu 
1170764c164SVlad Lungu #define CFG_MALLOC_LEN		128*1024
1180764c164SVlad Lungu 
1190764c164SVlad Lungu #define CFG_BOOTPARAMS_LEN	128*1024
1200764c164SVlad Lungu 
1210764c164SVlad Lungu #define CFG_MHZ			132
1220764c164SVlad Lungu 
123a55d4817SShinya Kuribayashi #define CFG_MIPS_TIMER_FREQ	(CFG_MHZ * 1000000)
124a55d4817SShinya Kuribayashi 
125a55d4817SShinya Kuribayashi #define CFG_HZ			1000
1260764c164SVlad Lungu 
1270764c164SVlad Lungu #define CFG_SDRAM_BASE		0x80000000	/* Cached addr */
1280764c164SVlad Lungu 
1290764c164SVlad Lungu #define CFG_LOAD_ADDR		0x81000000	/* default load address */
1300764c164SVlad Lungu 
1310764c164SVlad Lungu #define CFG_MEMTEST_START	0x80100000
1320764c164SVlad Lungu #define CFG_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 */
1390764c164SVlad Lungu #define CFG_MONITOR_BASE	TEXT_BASE
1400764c164SVlad Lungu #define CFG_MONITOR_LEN		(192 << 10)
1410764c164SVlad Lungu 
1420764c164SVlad Lungu #define CFG_INIT_SP_OFFSET	0x400000
1430764c164SVlad Lungu 
1440764c164SVlad Lungu /* We boot from this flash, selected with dip switch */
1450764c164SVlad Lungu #define CFG_FLASH_BASE		0xbfc00000
146b4aff1ffSJean-Christophe PLAGNIOL-VILLARD #define CFG_MAX_FLASH_BANKS	1
147b4aff1ffSJean-Christophe PLAGNIOL-VILLARD #define CFG_MAX_FLASH_SECT	128
148b4aff1ffSJean-Christophe PLAGNIOL-VILLARD #define CFG_FLASH_CFI		1	/* Flash memory is CFI compliant */
14900b1883aSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_FLASH_CFI_DRIVER	1
150b4aff1ffSJean-Christophe PLAGNIOL-VILLARD #define CFG_FLASH_USE_BUFFER_WRITE	1
1510764c164SVlad Lungu 
1525a1aceb0SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_IS_IN_FLASH	1
153*0e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR		(CFG_FLASH_BASE + 0x40000)
1540764c164SVlad Lungu 
1550764c164SVlad Lungu /* Address and size of Primary Environment Sector */
156*0e8d1586SJean-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 
1660764c164SVlad Lungu /*-----------------------------------------------------------------------
1670764c164SVlad Lungu  * Cache Configuration
1680764c164SVlad Lungu  */
1690764c164SVlad Lungu #define CFG_DCACHE_SIZE		16384
1700764c164SVlad Lungu #define CFG_ICACHE_SIZE		16384
1710764c164SVlad Lungu #define CFG_CACHELINE_SIZE	32
1720764c164SVlad Lungu 
1730764c164SVlad Lungu #endif /* __CONFIG_H */
174