[U-Boot] [PATCH] mtd: do not include cfi_flash.h if no flash
    Thomas Chou 
    thomas at wytron.com.tw
       
    Sun Oct 25 04:02:58 CET 2015
    
    
  
Do not include cfi_flash.h if CONFIG_SYS_NO_FLASH. Because
the flash_info is undefined in flash.h if CONFIG_SYS_NO_FLASH.
Signed-off-by: Thomas Chou <thomas at wytron.com.tw>
---
 include/mtd/cfi_flash.h | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/include/mtd/cfi_flash.h b/include/mtd/cfi_flash.h
index 048b477..526898a 100644
--- a/include/mtd/cfi_flash.h
+++ b/include/mtd/cfi_flash.h
@@ -8,6 +8,8 @@
 #ifndef __CFI_FLASH_H__
 #define __CFI_FLASH_H__
 
+#ifndef CONFIG_SYS_NO_FLASH
+
 #define FLASH_CMD_CFI			0x98
 #define FLASH_CMD_READ_ID		0x90
 #define FLASH_CMD_RESET			0xff
@@ -182,4 +184,6 @@ u32 flash_read32(void *addr);
 u64 flash_read64(void *addr);
 #endif
 
+#endif /* !CONFIG_SYS_NO_FLASH */
+
 #endif /* __CFI_FLASH_H__ */
-- 
2.1.4
    
    
More information about the U-Boot
mailing list