[prev in list] [next in list] [prev in thread] [next in thread] 

List:       u-boot
Subject:    [U-Boot] [PATCH] cfi_flash: give default CONFIG_SYS_MAX_FLASH_SECT in flash.h
From:       Thomas Chou <thomas () wytron ! com ! tw>
Date:       2015-10-31 3:09:36
Message-ID: 1446260976-8610-1-git-send-email-thomas () wytron ! com ! tw
[Download RAW message or body]

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 <thomas@wytron.com.tw>
---
 include/flash.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/flash.h b/include/flash.h
index 5754cf9..dc0645e 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
  */
@@ -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_ */
-- 
2.5.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic