summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-04-06 15:03:42 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-04-06 15:03:42 +0200
commit3a5e21881a194f4d4e053be8410d82a2458e8544 (patch)
tree20e90a65e5b7686801d12cf82fda0882ba7be5d1
parent5fbb2cd3b1b11352dfb73f0b8326c323662182a8 (diff)
downloadu-boot-imx-3a5e21881a194f4d4e053be8410d82a2458e8544.zip
u-boot-imx-3a5e21881a194f4d4e053be8410d82a2458e8544.tar.gz
u-boot-imx-3a5e21881a194f4d4e053be8410d82a2458e8544.tar.bz2
MCC200 Board: fix flash unprotection code for flash > 32 MB.
-rw-r--r--board/mcc200/mcc200.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/board/mcc200/mcc200.c b/board/mcc200/mcc200.c
index 456411d..5fe239f 100644
--- a/board/mcc200/mcc200.c
+++ b/board/mcc200/mcc200.c
@@ -238,6 +238,16 @@ int misc_init_r (void)
&flash_info[CFG_MAX_FLASH_BANKS - 1]);
}
+ if (gd->bd->bi_flashsize > (32 << 20)) {
+ /* Unprotect the upper bank of the Flash */
+ *(volatile int*)MPC5XXX_CS0_CFG |= (1 << 6);
+ flash_protect (FLAG_PROTECT_CLEAR,
+ flash_info[0].start[0],
+ (flash_info[0].start[0] + flash_info[0].size) / 2 - 1,
+ &flash_info[0]);
+ *(volatile int*)MPC5XXX_CS0_CFG &= ~(1 << 6);
+ }
+
return (0);
}