Skip to content
Snippets Groups Projects
Commit bf2ba6d4 authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash

parents faf4fe76 f8e2b310
No related branches found
No related tags found
No related merge requests found
......@@ -142,22 +142,12 @@ static int cfi_mtd_set_erasesize(struct mtd_info *mtd, flash_info_t *fi)
int sect_size = 0;
int sect;
/*
* Select the largest sector size as erasesize (e.g. for UBI)
*/
for (sect = 0; sect < fi->sector_count; sect++) {
if (!sect_size) {
if (flash_sector_size(fi, sect) > sect_size)
sect_size = flash_sector_size(fi, sect);
continue;
}
if (sect_size != flash_sector_size(fi, sect)) {
sect_size = 0;
break;
}
}
if (!sect_size) {
puts("cfi-mtd: devices with multiple sector sizes are"
"not supported\n");
return -EINVAL;
}
mtd->erasesize = sect_size;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment