- end_offset = part->offset + part->size;
- offset_aligned = 0;
- for (i = 0; i < flash->sector_count; i++) {
- if (i) {
- sector_size = flash->start[i] - flash->start[i-1];
- if (part->sector_size < sector_size)
- part->sector_size = sector_size;
- }
- if ((flash->start[i] - flash->start[0]) == end_offset)
- offset_aligned = 1;
- }
-
- if (offset_aligned || flash->size == end_offset)
- return 0;
-
- printf("%s%d: partition (%s) size alignment incorrect\n",
- MTD_DEV_TYPE(id->type), id->num, part->name);
-#endif
- return 1;
-}
-
-/**
- * Performs sanity check for supplied NAND flash partition. Table of existing
- * NAND flash devices is searched and partition device is located. Alignment
- * with the granularity of nand erasesize is verified.
- *
- * @param id of the parent device
- * @param part partition to validate
- * @return 0 if partition is valid, 1 otherwise
- */
-static int part_validate_nand(struct mtdids *id, struct part_info *part)
-{
-#if defined(CONFIG_CMD_NAND)
- /* info for NAND chips */
- nand_info_t *nand;