-#ifdef CONFIG_HAS_DATAFLASH
- if ((strcmp(argv[2], "all") != 0) && (strcmp(argv[2], "bank") != 0)) {
- addr_first = simple_strtoul(argv[2], NULL, 16);
- addr_last = simple_strtoul(argv[3], NULL, 16);
-
- if (addr_dataflash(addr_first) && addr_dataflash(addr_last)) {
- status = dataflash_real_protect(p,addr_first,addr_last);
- if (status < 0){
- puts ("Bad DataFlash sector specification\n");
- return 1;
- }
- printf("%sProtect %d DataFlash Sectors\n",
- p ? "" : "Un-", status);
- return 0;
- }
- }
-#endif
-
-#ifndef CONFIG_SYS_NO_FLASH