Skip to content
Snippets Groups Projects
Commit b6edc719 authored by Mike Frysinger's avatar Mike Frysinger
Browse files

Blackfin: respect CONFIG_SYS_MONITOR_LEN for default flash protection


Respect the CONFIG_SYS_MONITOR_LEN define rather than assuming a size of
128kB when setting up the default flash protection region for U-Boot
itself.

Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 78a0ba7d
No related branches found
No related tags found
No related merge requests found
...@@ -350,14 +350,14 @@ void board_init_r(gd_t * id, ulong dest_addr) ...@@ -350,14 +350,14 @@ void board_init_r(gd_t * id, ulong dest_addr)
#endif #endif
#if !defined(CONFIG_SYS_NO_FLASH) #if !defined(CONFIG_SYS_NO_FLASH)
/* There are some other pointer constants we must deal with */ /* Initialize the flash and protect u-boot by default */
/* configure available FLASH banks */
extern flash_info_t flash_info[]; extern flash_info_t flash_info[];
ulong size = flash_init(); ulong size = flash_init();
puts("Flash: "); puts("Flash: ");
print_size(size, "\n"); print_size(size, "\n");
flash_protect(FLAG_PROTECT_SET, CONFIG_SYS_FLASH_BASE, flash_protect(FLAG_PROTECT_SET, CONFIG_SYS_FLASH_BASE,
CONFIG_SYS_FLASH_BASE + 0x1ffff, &flash_info[0]); CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN - 1,
&flash_info[0]);
bd->bi_flashstart = CONFIG_SYS_FLASH_BASE; bd->bi_flashstart = CONFIG_SYS_FLASH_BASE;
bd->bi_flashsize = size; bd->bi_flashsize = size;
bd->bi_flashoffset = 0; bd->bi_flashoffset = 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