1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2011
4  * Heiko Schocher, DENX Software Engineering, hs@denx.de.
5  */
6 
7 #ifndef __CONFIG_KEYMILE_POWERPC_H
8 #define __CONFIG_KEYMILE_POWERPC_H
9 
10 /* Do boardspecific init for all boards */
11 
12 /* EEprom support 24C08, 24C16, 24C64 */
13 #define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE
14 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS	3  /* 8 Byte write page */
15 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS	10
16 
17 #define CONFIG_SYS_LOAD_ADDR	0x100000	/* default load address */
18 
19 /* Reserve 4 MB for malloc */
20 #define CONFIG_SYS_MALLOC_LEN		(4 * 1024 * 1024)
21 
22 /* Increase max size of compressed kernel */
23 #define CONFIG_SYS_BOOTM_LEN		0x2000000     /* 32 MB */
24 
25 /******************************************************************************
26  * (PRAM usage)
27  * ... -------------------------------------------------------
28  * ... |ROOTFSSIZE | PNVRAM |PHRAM |RESERVED_PRAM | END_OF_RAM
29  * ... |<------------------- pram -------------------------->|
30  * ... -------------------------------------------------------
31  * @END_OF_RAM:
32  * @CONFIG_KM_RESERVED_PRAM: reserved pram for special purpose
33  * @CONFIG_KM_PHRAM: address for /var
34  * @CONFIG_KM_PNVRAM: address for PNVRAM (for the application)
35  * @CONFIG_KM_ROOTFSSIZE: address for rootfilesystem in RAM
36  */
37 
38 /* size of rootfs in RAM */
39 #define CONFIG_KM_ROOTFSSIZE	0x0
40 /* set the default PRAM value to at least PNVRAM + PHRAM when pram env variable
41  * is not valid yet, which is the case for when u-boot copies itself to RAM */
42 #define CONFIG_PRAM		((CONFIG_KM_PNVRAM + CONFIG_KM_PHRAM)>>10)
43 
44 /* architecture specific default bootargs */
45 #define CONFIG_KM_DEF_BOOT_ARGS_CPU		""
46 
47 #define CONFIG_KM_DEF_ENV_CPU						\
48 	"u-boot="CONFIG_HOSTNAME "/u-boot.bin\0"		\
49 	"update="							\
50 		"protect off " __stringify(BOOTFLASH_START) " +${filesize} && "\
51 		"erase " __stringify(BOOTFLASH_START) "  +${filesize} && "\
52 		"cp.b ${load_addr_r} " __stringify(BOOTFLASH_START)	\
53 		"  ${filesize} && "					\
54 		"protect on " __stringify(BOOTFLASH_START) "  +${filesize}\0"\
55 	"set_fdthigh=true\0"						\
56 	"checkfdt=true\0"						\
57 	"bootm_mapsize=" __stringify(CONFIG_SYS_BOOTM_LEN) "\0"		\
58 	""
59 
60 #endif /* __CONFIG_KEYMILE_POWERPC_H */
61