From: Thomas Chou Date: Sat, 31 Oct 2015 03:09:36 +0000 (+0800) Subject: cfi_flash: give default CONFIG_SYS_MAX_FLASH_SECT in flash.h X-Git-Tag: v2016.01-rc2~110^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5aeeabf43c27b1bf4b3bb86e2b713dd98801df63;p=u-boot cfi_flash: give default CONFIG_SYS_MAX_FLASH_SECT in flash.h Give default CONFIG_SYS_MAX_FLASH_SECT in flash.h, so that the header can be included regardless of the present of flash. The value 512 is the most used. Signed-off-by: Thomas Chou Signed-off-by: Stefan Roese --- diff --git a/include/flash.h b/include/flash.h index 13e03842c8..f53ace7889 100644 --- a/include/flash.h +++ b/include/flash.h @@ -8,7 +8,10 @@ #ifndef _FLASH_H_ #define _FLASH_H_ -#ifndef CONFIG_SYS_NO_FLASH +#ifndef CONFIG_SYS_MAX_FLASH_SECT +#define CONFIG_SYS_MAX_FLASH_SECT 512 +#endif + /*----------------------------------------------------------------------- * FLASH Info: contains chip specific data, per FLASH bank */ @@ -503,6 +506,4 @@ extern flash_info_t *flash_get_info(ulong base); #define FLASH_ERASE_TIMEOUT 120000 /* timeout for erasing in ms */ #define FLASH_WRITE_TIMEOUT 500 /* timeout for writes in ms */ -#endif /* !CONFIG_SYS_NO_FLASH */ - #endif /* _FLASH_H_ */