summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorWolfgang Grandegger <wg@grandegger.com>2009-02-11 18:38:19 +0100
committerAndy Fleming <afleming@freescale.com>2009-02-16 18:05:58 -0600
commit31ca9119c3186cec579b54d2a7a2b361b4d2b7bf (patch)
tree1ca51e69e48a7ed7d4949888465a7941d9d083fa /board
parenta1c8a719262151f97119e76166043ee3da3f97b2 (diff)
downloadu-boot-imx-31ca9119c3186cec579b54d2a7a2b361b4d2b7bf.zip
u-boot-imx-31ca9119c3186cec579b54d2a7a2b361b4d2b7bf.tar.gz
u-boot-imx-31ca9119c3186cec579b54d2a7a2b361b4d2b7bf.tar.bz2
MPC85xx: TQM85xx: fix flash protection for boot loader
As the reset vector is located at 0xfffffffc, all flash sectors from the beginning of the U-Boot binary to 0xffffffff must be protected. On the TQM8548-AG having small sectors at the end of the flash it happened that the last two sector were not protected and an "erase all" left an un-bootable system behind: Bank # 2: CFI conformant FLASH (32 x 16) Size: 32 MB in 270 Sectors AMD Standard command set, Manufacturer ID: 0xEC, Device ID: 0x257E Erase timeout: 8192 ms, write timeout: 1 ms FFFA0000 E RO FFFC0000 RO FFFE0000 RO FFFE4000 RO FFFE8000 RO FFFEC000 RO FFFF0000 RO FFFF4000 RO FFFF8000 E FFFFC000 The same bug seems to be in drivers/mtd/cfi_flash.c:flash_init() and many board BSPs as well. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Diffstat (limited to 'board')
-rw-r--r--board/tqc/tqm85xx/tqm85xx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/board/tqc/tqm85xx/tqm85xx.c b/board/tqc/tqm85xx/tqm85xx.c
index cda8208..c414344 100644
--- a/board/tqc/tqm85xx/tqm85xx.c
+++ b/board/tqc/tqm85xx/tqm85xx.c
@@ -315,8 +315,7 @@ int misc_init_r (void)
/* Monitor protection ON by default */
flash_protect (FLAG_PROTECT_SET,
- CONFIG_SYS_MONITOR_BASE,
- CONFIG_SYS_MONITOR_BASE + monitor_flash_len - 1,
+ CONFIG_SYS_MONITOR_BASE, 0xffffffff,
&flash_info[CONFIG_SYS_MAX_FLASH_BANKS - 1]);
/* Environment protection ON by default */