#include <common.h>
#include <flash.h>
+#include <log.h>
#include <uuid.h>
#include <mtd/cfi_flash.h>
-extern flash_info_t flash_info[]; /* info for FLASH chips */
-
/*-----------------------------------------------------------------------
* Functions
*/
debug("%s %s: from 0x%08lX to 0x%08lX\n", __func__,
(flag & FLAG_PROTECT_SET) ? "ON" :
- (flag & FLAG_PROTECT_CLEAR) ? "OFF" : "???",
+ (flag & FLAG_PROTECT_CLEAR) ? "OFF" : "???",
from, to);
/* There is nothing to do if we have no data about the flash
#else
info->protect[i] = 0;
#endif /* CONFIG_SYS_FLASH_PROTECTION */
- debug ("protect off %d\n", i);
+ debug("protect off %d\n", i);
}
else if (flag & FLAG_PROTECT_SET) {
#if defined(CONFIG_SYS_FLASH_PROTECTION)
#else
info->protect[i] = 1;
#endif /* CONFIG_SYS_FLASH_PROTECTION */
- debug ("protect on %d\n", i);
+ debug("protect on %d\n", i);
}
}
}
flash_info_t *info;
int i;
- for (i=0, info = &flash_info[0]; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {
+ for (i = 0, info = &flash_info[0]; i < CFI_FLASH_BANKS; ++i, ++info) {
if (info->flash_id != FLASH_UNKNOWN &&
addr >= info->start[0] &&
/* WARNING - The '- 1' is needed if the flash