diff options
author | Vignesh Raghavendra <vigneshr@ti.com> | 2019-10-23 11:00:00 +0300 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2019-10-24 10:48:53 +0300 |
commit | d75eacf9b8a7562e8ea8c94138cd4ff4694f7c53 (patch) | |
tree | ffcafb4fed5b98f8fd1bd85e174d6815cb3d1860 /drivers/mtd/cfi_flash.c | |
parent | 44510daea4d07fee736dd90411c4b503340b449e (diff) | |
download | u-boot-d75eacf9b8a7562e8ea8c94138cd4ff4694f7c53.tar.xz |
mtd: cfi_flash: Use CONFIG_SYS_MONITOR_BASE only when defined
Make use of CONFIG_SYS_MONITOR_BASE only when available to avoid build
error when CONFIG_SYS_MONITOR_BASE is not defined.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/mtd/cfi_flash.c')
-rw-r--r-- | drivers/mtd/cfi_flash.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index c59254c76e..0574fa63a4 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -178,7 +178,8 @@ __maybe_weak u64 flash_read64(void *addr) /*----------------------------------------------------------------------- */ #if defined(CONFIG_ENV_IS_IN_FLASH) || defined(CONFIG_ENV_ADDR_REDUND) || \ - (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE) + (defined(CONFIG_SYS_MONITOR_BASE) && \ + (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE)) static flash_info_t *flash_get_info(ulong base) { int i; @@ -2329,7 +2330,8 @@ static void flash_protect_default(void) #endif /* Monitor protection ON by default */ -#if (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE) && \ +#if defined(CONFIG_SYS_MONITOR_BASE) && \ + (CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE) && \ (!defined(CONFIG_MONITOR_IS_IN_RAM)) flash_protect(FLAG_PROTECT_SET, CONFIG_SYS_MONITOR_BASE, |