flash_info_t *info;
ulong bank;
int i, n, sect_first, sect_last;
- ulong addr_first, addr_last;
#endif /* CONFIG_SYS_NO_FLASH */
+#if !defined(CONFIG_SYS_NO_FLASH) || defined(CONFIG_HAS_DATAFLASH)
+ ulong addr_first, addr_last;
+#endif
#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
struct mtd_device *dev;
struct part_info *part;