u8 *part_num, struct part_info **part);
#endif
+#ifndef CFG_NO_FLASH
extern flash_info_t flash_info[]; /* info for FLASH chips */
/*
return rcode;
}
+#endif /* CFG_NO_FLASH */
int do_flinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
+#ifndef CFG_NO_FLASH
ulong bank;
+#endif
#ifdef CONFIG_HAS_DATAFLASH
dataflash_print_info();
#endif
+#ifndef CFG_NO_FLASH
if (argc == 1) { /* print info for all FLASH banks */
for (bank=0; bank <CFG_MAX_FLASH_BANKS; ++bank) {
printf ("\nBank # %ld: ", bank+1);
}
printf ("\nBank # %ld: ", bank);
flash_print_info (&flash_info[bank-1]);
+#endif /* CFG_NO_FLASH */
return 0;
}
int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
+#ifndef CFG_NO_FLASH
flash_info_t *info;
ulong bank, addr_first, addr_last;
int n, sect_first, sect_last;
rcode = flash_sect_erase(addr_first, addr_last);
return rcode;
+#else
+ return 0;
+#endif /* CFG_NO_FLASH */
}
+#ifndef CFG_NO_FLASH
int flash_sect_erase (ulong addr_first, ulong addr_last)
{
flash_info_t *info;
}
return rcode;
}
+#endif /* CFG_NO_FLASH */
int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
+#ifndef CFG_NO_FLASH
flash_info_t *info;
- ulong bank, addr_first, addr_last;
- int i, p, n, sect_first, sect_last;
+ ulong bank;
+ int i, n, sect_first, sect_last;
+#endif /* CFG_NO_FLASH */
+ ulong addr_first, addr_last;
+ int p;
#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
struct mtd_device *dev;
struct part_info *part;
}
#endif
+#ifndef CFG_NO_FLASH
if (strcmp(argv[2], "all") == 0) {
for (bank=1; bank<=CFG_MAX_FLASH_BANKS; ++bank) {
info = &flash_info[bank-1];
return 1;
}
rcode = flash_sect_protect (p, addr_first, addr_last);
+#endif /* CFG_NO_FLASH */
return rcode;
}
-
+#ifndef CFG_NO_FLASH
int flash_sect_protect (int p, ulong addr_first, ulong addr_last)
{
flash_info_t *info;
}
return rcode;
}
+#endif /* CFG_NO_FLASH */
/**************************************************/