diff options
author | Wolfgang Wegner <w.wegner@astro-kom.de> | 2010-03-02 10:59:19 +0100 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2010-03-04 10:07:12 +0100 |
commit | 8f9a221045a4ace14fe006e1353c593619d1001a (patch) | |
tree | 8688b09285d8fd109461de2aa62d4c181c9d794f /drivers/mtd/cfi_flash.c | |
parent | f3651764e57e353251695691677bd95ba5a420bc (diff) | |
download | u-boot-imx-8f9a221045a4ace14fe006e1353c593619d1001a.zip u-boot-imx-8f9a221045a4ace14fe006e1353c593619d1001a.tar.gz u-boot-imx-8f9a221045a4ace14fe006e1353c593619d1001a.tar.bz2 |
] fix monitor protection for CONFIG_MONITOR_IS_IN_RAM
For platforms with flash below ram addresses, the current check to
activate monitor protection is wrong/insufficient. This patch fixes
CONFIG_MONITOR_IS_IN_RAM for these systems by adding a check for
this configuration.
Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/mtd/cfi_flash.c')
-rw-r--r-- | drivers/mtd/cfi_flash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 24eb33f..fdba297 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -1980,7 +1980,8 @@ unsigned long flash_init (void) } /* Monitor protection ON by default */ -#if (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE) +#if (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE) && \ + (!defined(CONFIG_MONITOR_IS_IN_RAM)) flash_protect (FLAG_PROTECT_SET, CONFIG_SYS_MONITOR_BASE, CONFIG_SYS_MONITOR_BASE + monitor_flash_len - 1, |