xref: /rk3399_rockchip-uboot/include/configs/km/km-powerpc.h (revision 264eaa0ea967bac32214b87d60cfc86c8b22cac6)
1*264eaa0eSValentin Longchamp /*
2*264eaa0eSValentin Longchamp  * (C) Copyright 2011
3*264eaa0eSValentin Longchamp  * Heiko Schocher, DENX Software Engineering, hs@denx.de.
4*264eaa0eSValentin Longchamp  *
5*264eaa0eSValentin Longchamp  * See file CREDITS for list of people who contributed to this
6*264eaa0eSValentin Longchamp  * project.
7*264eaa0eSValentin Longchamp  *
8*264eaa0eSValentin Longchamp  * This program is free software; you can redistribute it and/or
9*264eaa0eSValentin Longchamp  * modify it under the terms of the GNU General Public License as
10*264eaa0eSValentin Longchamp  * published by the Free Software Foundation; either version 2 of
11*264eaa0eSValentin Longchamp  * the License, or (at your option) any later version.
12*264eaa0eSValentin Longchamp  *
13*264eaa0eSValentin Longchamp  * This program is distributed in the hope that it will be useful,
14*264eaa0eSValentin Longchamp  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15*264eaa0eSValentin Longchamp  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
16*264eaa0eSValentin Longchamp  * GNU General Public License for more details.
17*264eaa0eSValentin Longchamp  *
18*264eaa0eSValentin Longchamp  * You should have received a copy of the GNU General Public License
19*264eaa0eSValentin Longchamp  * along with this program; if not, write to the Free Software
20*264eaa0eSValentin Longchamp  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21*264eaa0eSValentin Longchamp  * MA 02111-1307 USA
22*264eaa0eSValentin Longchamp  */
23*264eaa0eSValentin Longchamp 
24*264eaa0eSValentin Longchamp #ifndef __CONFIG_KEYMILE_POWERPC_H
25*264eaa0eSValentin Longchamp #define __CONFIG_KEYMILE_POWERPC_H
26*264eaa0eSValentin Longchamp 
27*264eaa0eSValentin Longchamp #define CONFIG_BOOTCOUNT_LIMIT
28*264eaa0eSValentin Longchamp 
29*264eaa0eSValentin Longchamp #define CONFIG_CMD_DTT
30*264eaa0eSValentin Longchamp #define CONFIG_JFFS2_CMDLINE
31*264eaa0eSValentin Longchamp 
32*264eaa0eSValentin Longchamp #define CONFIG_ENV_SIZE		0x04000		/* Size of Environment */
33*264eaa0eSValentin Longchamp #define CONFIG_FLASH_CFI_MTD
34*264eaa0eSValentin Longchamp 
35*264eaa0eSValentin Longchamp #define CONFIG_SYS_MEMTEST_START 0x00100000	/* memtest works on */
36*264eaa0eSValentin Longchamp 
37*264eaa0eSValentin Longchamp #define CONFIG_SYS_MEMTEST_END	0x00f00000	/* 1 ... 15 MB in DRAM	*/
38*264eaa0eSValentin Longchamp 
39*264eaa0eSValentin Longchamp #define CONFIG_SYS_LOAD_ADDR	0x100000	/* default load address */
40*264eaa0eSValentin Longchamp 
41*264eaa0eSValentin Longchamp /******************************************************************************
42*264eaa0eSValentin Longchamp  * (PRAM usage)
43*264eaa0eSValentin Longchamp  * ... -------------------------------------------------------
44*264eaa0eSValentin Longchamp  * ... |ROOTFSSIZE | PNVRAM |PHRAM |RESERVED_PRAM | END_OF_RAM
45*264eaa0eSValentin Longchamp  * ... |<------------------- pram -------------------------->|
46*264eaa0eSValentin Longchamp  * ... -------------------------------------------------------
47*264eaa0eSValentin Longchamp  * @END_OF_RAM:
48*264eaa0eSValentin Longchamp  * @CONFIG_KM_RESERVED_PRAM: reserved pram for special purpose
49*264eaa0eSValentin Longchamp  * @CONFIG_KM_PHRAM: address for /var
50*264eaa0eSValentin Longchamp  * @CONFIG_KM_PNVRAM: address for PNVRAM (for the application)
51*264eaa0eSValentin Longchamp  * @CONFIG_KM_ROOTFSSIZE: address for rootfilesystem in RAM
52*264eaa0eSValentin Longchamp  */
53*264eaa0eSValentin Longchamp 
54*264eaa0eSValentin Longchamp /* size of rootfs in RAM */
55*264eaa0eSValentin Longchamp #define CONFIG_KM_ROOTFSSIZE	0x0
56*264eaa0eSValentin Longchamp /* pseudo-non volatile RAM [hex] */
57*264eaa0eSValentin Longchamp #define CONFIG_KM_PNVRAM	0x80000
58*264eaa0eSValentin Longchamp /* physical RAM MTD size [hex] */
59*264eaa0eSValentin Longchamp #define CONFIG_KM_PHRAM		0x100000
60*264eaa0eSValentin Longchamp /* resereved pram area at the end of memroy [hex] */
61*264eaa0eSValentin Longchamp #define CONFIG_KM_RESERVED_PRAM	0x0
62*264eaa0eSValentin Longchamp /* enable protected RAM */
63*264eaa0eSValentin Longchamp #define CONFIG_PRAM		0
64*264eaa0eSValentin Longchamp 
65*264eaa0eSValentin Longchamp #define CONFIG_KM_CRAMFS_ADDR	0x800000
66*264eaa0eSValentin Longchamp #define CONFIG_KM_KERNEL_ADDR	0x400000	/* 3968Kbytes */
67*264eaa0eSValentin Longchamp #define CONFIG_KM_FDT_ADDR	0x7E0000	/* 128Kbytes */
68*264eaa0eSValentin Longchamp 
69*264eaa0eSValentin Longchamp #define CONFIG_KM_DEF_ENV_CPU						\
70*264eaa0eSValentin Longchamp 	"addbootcount=echo \\\\c\0"					\
71*264eaa0eSValentin Longchamp 	"addmtdparts=echo \\\\c\0"					\
72*264eaa0eSValentin Longchamp 	"boot=bootm ${actual_kernel_addr} - ${actual_fdt_addr}\0"	\
73*264eaa0eSValentin Longchamp 	"cramfsloadfdt="						\
74*264eaa0eSValentin Longchamp 		"cramfsload ${fdt_addr_r} "				\
75*264eaa0eSValentin Longchamp 		"fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb && "		\
76*264eaa0eSValentin Longchamp 		"setenv actual_fdt_addr ${fdt_addr_r}\0"		\
77*264eaa0eSValentin Longchamp 	"fdt_addr_r=" xstr(CONFIG_KM_FDT_ADDR) "\0"			\
78*264eaa0eSValentin Longchamp 	"fdt_file="							\
79*264eaa0eSValentin Longchamp 		xstr(CONFIG_HOSTNAME) "/"				\
80*264eaa0eSValentin Longchamp 		xstr(CONFIG_HOSTNAME) ".dtb\0"				\
81*264eaa0eSValentin Longchamp 	"tftpfdt="							\
82*264eaa0eSValentin Longchamp 		"tftpboot ${fdt_addr_r} ${fdt_file} && "		\
83*264eaa0eSValentin Longchamp 		"setenv actual_fdt_addr ${fdt_addr_r} \0"		\
84*264eaa0eSValentin Longchamp 	"update="							\
85*264eaa0eSValentin Longchamp 		"protect off " xstr(BOOTFLASH_START) " +${filesize} && "\
86*264eaa0eSValentin Longchamp 		"erase " xstr(BOOTFLASH_START) "  +${filesize} && "	\
87*264eaa0eSValentin Longchamp 		"cp.b ${u-boot_addr_r} " xstr(BOOTFLASH_START)		\
88*264eaa0eSValentin Longchamp 		"  ${filesize} && "					\
89*264eaa0eSValentin Longchamp 		"protect on " xstr(BOOTFLASH_START) "  +${filesize}\0"  \
90*264eaa0eSValentin Longchamp 	""
91*264eaa0eSValentin Longchamp 
92*264eaa0eSValentin Longchamp #endif /* __CONFIG_KEYMILE_POWERPC_H */
93