diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-10-06 04:00:07 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-01-28 13:26:12 -0500 |
commit | b6edc719a106ab7fa6e6950b4d97bc39c1368e45 (patch) | |
tree | d64b0c991377806b39a7f4f5e1d9ca0249c83da6 /lib_blackfin/board.c | |
parent | 78a0ba7dc24c9682371f6ee8549b569fb573a329 (diff) | |
download | u-boot-imx-b6edc719a106ab7fa6e6950b4d97bc39c1368e45.zip u-boot-imx-b6edc719a106ab7fa6e6950b4d97bc39c1368e45.tar.gz u-boot-imx-b6edc719a106ab7fa6e6950b4d97bc39c1368e45.tar.bz2 |
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: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'lib_blackfin/board.c')
-rw-r--r-- | lib_blackfin/board.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index fef1934..01b71d4 100644 --- a/lib_blackfin/board.c +++ b/lib_blackfin/board.c @@ -350,14 +350,14 @@ void board_init_r(gd_t * id, ulong dest_addr) #endif #if !defined(CONFIG_SYS_NO_FLASH) - /* There are some other pointer constants we must deal with */ - /* configure available FLASH banks */ + /* Initialize the flash and protect u-boot by default */ extern flash_info_t flash_info[]; ulong size = flash_init(); puts("Flash: "); print_size(size, "\n"); 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_flashsize = size; bd->bi_flashoffset = 0; |