1 /*
2  * (C) Copyright 2012
3  * Linaro
4  * Linus Walleij <linus.walleij@linaro.org>
5  * Common ARM Integrator configuration settings
6  *
7  * SPDX-License-Identifier:	GPL-2.0+
8  */
9 
10 #define CONFIG_SYS_MEMTEST_START	0x100000
11 #define CONFIG_SYS_MEMTEST_END		0x10000000
12 #define CONFIG_SYS_TIMERBASE		0x13000100	/* Timer1 */
13 #define CONFIG_SYS_LOAD_ADDR		0x7fc0	/* default load address */
14 #define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128*1024) /* Size of malloc() pool */
15 
16 #define CONFIG_CONS_INDEX		0
17 
18 #define CONFIG_CMDLINE_TAG		/* enable passing of ATAGs  */
19 #define CONFIG_SETUP_MEMORY_TAGS
20 #define CONFIG_MISC_INIT_R		/* call misc_init_r during start up */
21 
22 /*
23  * There are various dependencies on the core module (CM) fitted
24  * Users should refer to their CM user guide
25  */
26 #include "armcoremodule.h"
27 
28 /*
29  * Initialize and remap the core module, use SPD to detect memory size
30  * If CONFIG_SKIP_LOWLEVEL_INIT is not defined &
31  * the core module has a CM_INIT register
32  * then the U-Boot initialisation code will
33  * e.g. ARM Boot Monitor or pre-loader is repeated once
34  * (to re-initialise any existing CM_INIT settings to safe values).
35  *
36  * This is usually not the desired behaviour since the platform
37  * will either reboot into the ARM monitor (or pre-loader)
38  * or continuously cycle thru it without U-Boot running,
39  * depending upon the setting of Integrator/CP switch S2-4.
40  *
41  * However it may be needed if Integrator/CP switch S2-1
42  * is set OFF to boot direct into U-Boot.
43  * In that case comment out the line below.
44  */
45 #define CONFIG_CM_INIT
46 #define CONFIG_CM_REMAP
47 #define CONFIG_CM_SPD_DETECT
48 
49 /*
50  * The ARM boot monitor initializes the board.
51  * However, the default U-Boot code also performs the initialization.
52  * If desired, this can be prevented by defining SKIP_LOWLEVEL_INIT
53  * - see documentation supplied with board for details of how to choose the
54  * image to run at reset/power up
55  * e.g. whether the ARM Boot Monitor runs before U-Boot
56  */
57 /* #define CONFIG_SKIP_LOWLEVEL_INIT */
58 
59 /*
60  * The ARM boot monitor does not relocate U-Boot.
61  * However, the default U-Boot code performs the relocation check,
62  * and may relocate the code if the memory map is changed.
63  * If necessary this can be prevented by defining SKIP_RELOCATE_UBOOT
64  */
65 /* #define SKIP_CONFIG_RELOCATE_UBOOT */
66 
67 /*
68  * Physical Memory Map
69  */
70 #define CONFIG_NR_DRAM_BANKS	1		/* we have 1 bank of DRAM */
71 #define PHYS_SDRAM_1		0x00000000	/* SDRAM Bank #1 */
72 #define PHYS_SDRAM_1_SIZE	0x08000000	/* 128 MB */
73 #define CONFIG_SYS_SDRAM_BASE	PHYS_SDRAM_1
74 #define CONFIG_SYS_INIT_RAM_SIZE PHYS_SDRAM_1_SIZE
75 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_SDRAM_BASE + \
76 				    CONFIG_SYS_INIT_RAM_SIZE - \
77 				    GENERATED_GBL_DATA_SIZE)
78 #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET
79 
80 /*
81  * FLASH and environment organization
82  * Top varies according to amount fitted
83  * Reserve top 4 blocks of flash
84  * - ARM Boot Monitor
85  * - Unused
86  * - SIB block
87  * - U-Boot environment
88  */
89 #define CONFIG_SYS_FLASH_CFI		1
90 #define CONFIG_FLASH_CFI_DRIVER		1
91 #define CONFIG_SYS_FLASH_BASE		0x24000000
92 #define CONFIG_SYS_MAX_FLASH_BANKS	1
93 
94 /* Timeout values in ticks */
95 #define CONFIG_SYS_FLASH_ERASE_TOUT	(2 * CONFIG_SYS_HZ) /* Erase Timeout */
96 #define CONFIG_SYS_FLASH_WRITE_TOUT	(2 * CONFIG_SYS_HZ) /* Write Timeout */
97 #define CONFIG_SYS_FLASH_PROTECTION	/* The devices have real protection */
98 #define CONFIG_SYS_FLASH_EMPTY_INFO	/* flinfo indicates empty blocks */
99