Skip to contentSkip to conversation

cfi_flash: give default CONFIG_SYS_MAX_FLASH_SECT in flash.h

PATCH New Thomas Chou 2 participants 2 messages Oct 31, 2015 – Nov 30, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 include/flash.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
include/flash.h +4 -3
index 5754cf9..dc0645e 100644
@@ -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
  */
@@ -500,6 +503,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_ */
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 cfi_flash: give default CONFIG_SYS_MAX_FLASH_SECT in flash.h

Quoted 5 lines · Thomas Chou

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.

Applied to u-boot-cfi-flash/master.

Thanks,
Stefan