Commit 7c49b523e799fe2c46bfb3ad312c9faf02e2f47e

Authored by Marcel Ziswiler
Committed by Marek Vasut
1 parent fe488a8528

pxa: colibri_pxa270: avoid overwriting factory configuration block

Specify a CONFIG_BOARD_SIZE_LIMIT of 256 KB in order to avoid
overwriting the factory configuration block located at offset 0x40000
in NOR flash.

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>

Showing 1 changed file with 8 additions and 6 deletions Side-by-side Diff

include/configs/colibri_pxa270.h
... ... @@ -7,8 +7,8 @@
7 7 * SPDX-License-Identifier: GPL-2.0+
8 8 */
9 9  
10   -#ifndef __CONFIG_H
11   -#define __CONFIG_H
  10 +#ifndef __CONFIG_H
  11 +#define __CONFIG_H
12 12  
13 13 /*
14 14 * High Level Board Configuration Options
... ... @@ -16,6 +16,8 @@
16 16 #define CONFIG_CPU_PXA27X 1 /* Marvell PXA270 CPU */
17 17 #define CONFIG_SYS_GENERIC_BOARD
18 18 #define CONFIG_SYS_TEXT_BASE 0x0
  19 +/* Avoid overwriting factory configuration block */
  20 +#define CONFIG_BOARD_SIZE_LIMIT 0x40000
19 21  
20 22 /*
21 23 * Environment settings
... ... @@ -100,7 +102,6 @@
100 102 #define CONFIG_CMDLINE_EDITING 1
101 103 #define CONFIG_AUTO_COMPLETE 1
102 104  
103   -
104 105 /*
105 106 * Clock Configuration
106 107 */
107 108  
108 109  
... ... @@ -150,10 +151,11 @@
150 151 #endif
151 152  
152 153 #define CONFIG_SYS_MONITOR_BASE 0x0
153   -#define CONFIG_SYS_MONITOR_LEN 0x80000
  154 +#define CONFIG_SYS_MONITOR_LEN 0x40000
154 155  
  156 +/* Skip factory configuration block */
155 157 #define CONFIG_ENV_ADDR \
156   - (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
  158 + (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN + 0x40000)
157 159 #define CONFIG_ENV_SIZE 0x40000
158 160 #define CONFIG_ENV_SECT_SIZE 0x40000
159 161 #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
... ... @@ -219,5 +221,5 @@
219 221  
220 222 #include "pxa-common.h"
221 223  
222   -#endif /* __CONFIG_H */
  224 +#endif /* __CONFIG_H */