xref: /rk3399_rockchip-uboot/include/configs/qemu-mips.h (revision ff9b0cb8b4804ed372c09b8aad2a984b396596b2)
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 #define CONFIG_TIMESTAMP		/* Print image info with timestamp */
440764c164SVlad Lungu #undef CONFIG_BOOTARGS
450764c164SVlad Lungu 
460764c164SVlad Lungu #define CONFIG_EXTRA_ENV_SETTINGS					\
470764c164SVlad Lungu 	"addmisc=setenv bootargs ${bootargs} "				\
480764c164SVlad Lungu 		"console=ttyS0,${baudrate} "				\
490764c164SVlad Lungu 		"panic=1\0"						\
500764c164SVlad Lungu 	"bootfile=/tftpboot/vmlinux\0"				\
510764c164SVlad Lungu 	"load=tftp 80500000 ${u-boot}\0"				\
520764c164SVlad Lungu 	""
530764c164SVlad Lungu 
540764c164SVlad Lungu #define CONFIG_BOOTCOMMAND	"bootp;bootelf"
550764c164SVlad Lungu 
560764c164SVlad Lungu /*
570764c164SVlad Lungu  * BOOTP options
580764c164SVlad Lungu  */
590764c164SVlad Lungu #define CONFIG_BOOTP_BOOTFILESIZE
600764c164SVlad Lungu #define CONFIG_BOOTP_BOOTPATH
610764c164SVlad Lungu #define CONFIG_BOOTP_GATEWAY
620764c164SVlad Lungu #define CONFIG_BOOTP_HOSTNAME
630764c164SVlad Lungu 
640764c164SVlad Lungu /*
650764c164SVlad Lungu  * Command line configuration.
660764c164SVlad Lungu  */
670764c164SVlad Lungu #include <config_cmd_default.h>
680764c164SVlad Lungu 
690764c164SVlad Lungu #define CONFIG_CMD_ELF
700764c164SVlad Lungu #define CONFIG_CMD_FAT
710764c164SVlad Lungu #define CONFIG_CMD_EXT2
720764c164SVlad Lungu #undef CONFIG_CMD_LOADB
730764c164SVlad Lungu #undef CONFIG_CMD_LOADS
740764c164SVlad Lungu #define CONFIG_CMD_DHCP
750764c164SVlad Lungu 
760764c164SVlad Lungu #define CONFIG_DRIVER_NE2000
770764c164SVlad Lungu #define CONFIG_DRIVER_NE2000_BASE	(0xb4000300)
780764c164SVlad Lungu 
796d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550
806d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_SERIAL
816d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_REG_SIZE	1
826d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_CLK		115200
836d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_NS16550_COM1	(0xb40003f8)
840764c164SVlad Lungu #define CONFIG_CONS_INDEX	1
850764c164SVlad Lungu 
860764c164SVlad Lungu #define CONFIG_CMD_IDE
870764c164SVlad Lungu #define CONFIG_DOS_PARTITION
880764c164SVlad Lungu 
896d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IDE_MAXBUS		2
906d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_IDE0_OFFSET	(0x1f0)
916d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_IDE1_OFFSET	(0x170)
926d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_DATA_OFFSET	(0)
936d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_REG_OFFSET	(0)
946d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_ATA_BASE_ADDR	(0xb4000000)
950764c164SVlad Lungu 
966d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_IDE_MAXDEVICE	(4)
970764c164SVlad Lungu 
980764c164SVlad Lungu /*
990764c164SVlad Lungu  * Miscellaneous configurable options
1000764c164SVlad Lungu  */
1016d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LONGHELP				/* undef to save memory */
1020764c164SVlad Lungu 
103748fd4a6SDaniel Schwierzeck /* Monitor Command Prompt */
104748fd4a6SDaniel Schwierzeck #if defined(CONFIG_SYS_LITTLE_ENDIAN)
105748fd4a6SDaniel Schwierzeck #define CONFIG_SYS_PROMPT		"qemu-mipsel # "
106748fd4a6SDaniel Schwierzeck #else
107748fd4a6SDaniel Schwierzeck #define CONFIG_SYS_PROMPT		"qemu-mips # "
108748fd4a6SDaniel Schwierzeck #endif
1090764c164SVlad Lungu 
110bed8ce83SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_AUTO_COMPLETE
111bed8ce83SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_CMDLINE_EDITING
1126d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HUSH_PARSER
113bed8ce83SJean-Christophe PLAGNIOL-VILLARD 
1146d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_CBSIZE		256		/* Console I/O Buffer Size */
1156d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)  /* Print Buffer Size */
1166d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAXARGS		16		/* max number of command args */
1170764c164SVlad Lungu 
1186d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MALLOC_LEN		128*1024
1190764c164SVlad Lungu 
1206d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_BOOTPARAMS_LEN	128*1024
1210764c164SVlad Lungu 
1226d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MHZ			132
1230764c164SVlad Lungu 
1246d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MIPS_TIMER_FREQ	(CONFIG_SYS_MHZ * 1000000)
125a55d4817SShinya Kuribayashi 
1266d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_HZ			1000
1270764c164SVlad Lungu 
1286d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_SDRAM_BASE		0x80000000	/* Cached addr */
1290764c164SVlad Lungu 
1306d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_LOAD_ADDR		0x81000000	/* default load address */
1310764c164SVlad Lungu 
1326d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_START	0x80100000
1336d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MEMTEST_END		0x80800000
1340764c164SVlad Lungu 
1350764c164SVlad Lungu /*-----------------------------------------------------------------------
1360764c164SVlad Lungu  * FLASH and environment organization
1370764c164SVlad Lungu  */
1380764c164SVlad Lungu 
1390764c164SVlad Lungu /* The following #defines are needed to get flash environment right */
140*ff9b0cb8SZhi-zhou Zhang #define CONFIG_SYS_TEXT_BASE		0xbfc00000 /* Rom version */
14114d0a02aSWolfgang Denk #define CONFIG_SYS_MONITOR_BASE	CONFIG_SYS_TEXT_BASE
1426d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MONITOR_LEN		(192 << 10)
1430764c164SVlad Lungu 
1446d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_INIT_SP_OFFSET	0x400000
1450764c164SVlad Lungu 
1460764c164SVlad Lungu /* We boot from this flash, selected with dip switch */
1476d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_BASE		0xbfc00000
1486d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_BANKS	1
1496d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_MAX_FLASH_SECT	128
1506d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_CFI		1	/* Flash memory is CFI compliant */
15100b1883aSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_FLASH_CFI_DRIVER	1
1526d0f6bcfSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE	1
1530764c164SVlad Lungu 
1545a1aceb0SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_IS_IN_FLASH	1
15513095b2fSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_ADDR		(CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
1560764c164SVlad Lungu 
1570764c164SVlad Lungu /* Address and size of Primary Environment Sector */
1580e8d1586SJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_SIZE		0x8000
159b4aff1ffSJean-Christophe PLAGNIOL-VILLARD 
160b4aff1ffSJean-Christophe PLAGNIOL-VILLARD #define CONFIG_ENV_OVERWRITE	1
1618875e3abSShinya Kuribayashi 
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