From 656658dd1577b62d5192ba2db4d9b8a3be1dbee3 Mon Sep 17 00:00:00 2001 From: wdenk Date: Sun, 10 Oct 2004 22:16:06 +0000 Subject: * Configure SX1 board to use drivers/cfi_flash.c * Patches by Michael Bendzick, 30 Aug 2004: - Configure omap1510inn board to use drivers/cfi_flash.c - Make drivers/cfi_flash.c protect environment and redundant environment. * Patch by Steven Scholz, 23 Jun 2004: - Add script (tools/img2brec.sh) to programm U-Boot into (Synch)Flash using the Bootstrap Mode of the MC9328MX1/L --- drivers/cfi_flash.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'drivers') diff --git a/drivers/cfi_flash.c b/drivers/cfi_flash.c index fcf213cda..c46ac2476 100644 --- a/drivers/cfi_flash.c +++ b/drivers/cfi_flash.c @@ -338,6 +338,21 @@ unsigned long flash_init (void) &flash_info[0]); #endif + /* Environment protection ON by default */ +#ifdef CFG_ENV_IS_IN_FLASH + flash_protect (FLAG_PROTECT_SET, + CFG_ENV_ADDR, + CFG_ENV_ADDR + CFG_ENV_SECT_SIZE - 1, + &flash_info[0]); +#endif + + /* Redundant environment protection ON by default */ +#ifdef CFG_ENV_ADDR_REDUND + flash_protect (FLAG_PROTECT_SET, + CFG_ENV_ADDR_REDUND, + CFG_ENV_ADDR_REDUND + CFG_ENV_SIZE_REDUND - 1, + &flash_info[0]); +#endif return (size); } -- cgit v1.2.3