1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) ASPEED Technology Inc.
4  *
5  * Copyright 2016 IBM Corporation
6  * (C) Copyright 2016 Google, Inc
7  */
8 
9 #ifndef __ASPEED_COMMON_CONFIG_H
10 #define __ASPEED_COMMON_CONFIG_H
11 
12 #include <asm/arch/platform.h>
13 
14 #define CONFIG_BOOTFILE		"all.bin"
15 
16 #define CONFIG_GATEWAYIP	192.168.0.1
17 #define CONFIG_NETMASK		255.255.255.0
18 #define CONFIG_IPADDR		192.168.0.45
19 #define CONFIG_SERVERIP		192.168.0.81
20 
21 /* Misc CPU related */
22 #define CONFIG_CMDLINE_TAG
23 #define CONFIG_SETUP_MEMORY_TAGS
24 #define CONFIG_INITRD_TAG
25 
26 /* Enable cache controller */
27 #define CONFIG_SYS_DCACHE_OFF
28 
29 #define CONFIG_SYS_SDRAM_BASE		ASPEED_DRAM_BASE
30 
31 #ifdef CONFIG_PRE_CON_BUF_SZ
32 #define CONFIG_SYS_INIT_RAM_ADDR	(ASPEED_SRAM_BASE + CONFIG_PRE_CON_BUF_SZ)
33 #define CONFIG_SYS_INIT_RAM_SIZE	(36*1024 - CONFIG_PRE_CON_BUF_SZ)
34 #else
35 #define CONFIG_SYS_INIT_RAM_ADDR	(ASPEED_SRAM_BASE)
36 #define CONFIG_SYS_INIT_RAM_SIZE	(36*1024)
37 #endif
38 
39 #define SYS_INIT_RAM_END \
40 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE)
41 #define CONFIG_SYS_INIT_SP_ADDR \
42 	(SYS_INIT_RAM_END - GENERATED_GBL_DATA_SIZE)
43 
44 #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
45 
46 /*
47  * NS16550 Configuration
48  */
49 #ifdef CONFIG_SYS_NS16550
50 #define CONFIG_SYS_NS16550_SERIAL
51 #define CONFIG_SYS_NS16550_REG_SIZE		(-4)
52 #define CONFIG_SYS_NS16550_CLK			AST_UART_CLK
53 #define CONFIG_SYS_NS16550_COM1			AST_UART0_BASE
54 #define CONFIG_SYS_NS16550_COM2			AST_UART3_BASE
55 #define CONFIG_SYS_NS16550_COM3			AST_UART4_BASE
56 #define CONFIG_SYS_LOADS_BAUD_CHANGE
57 #define CONFIG_CONS_INDEX				1
58 #define CONFIG_BAUDRATE					115200
59 #endif
60 
61 /*
62  * BOOTP options
63  */
64 #define CONFIG_BOOTP_BOOTFILESIZE
65 
66 /*
67  * Miscellaneous configurable options
68  */
69 #define CONFIG_BOOTCOMMAND		"bootm 20080000 20400000 20070000"
70 #define CONFIG_ENV_OVERWRITE
71 
72 #define CONFIG_EXTRA_ENV_SETTINGS \
73 	"verify=yes\0"	\
74 	"spi_dma=yes\0" \
75 	""
76 
77 #endif	/* __ASPEED_COMMON_CONFIG_H */
78