Skip to content
Snippets Groups Projects
Commit 3a5e2188 authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

MCC200 Board: fix flash unprotection code for flash > 32 MB.

parent 5fbb2cd3
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment