]> git.sur5r.net Git - u-boot/blobdiff - common/cmd_jffs2.c
ppc: Move mirror_hack to arch_global_data
[u-boot] / common / cmd_jffs2.c
index 0e7a6b0f3b2140d6f89005bce111f791edbf4551..27296ddd7d6c02d3369b7948c2f916eaf1580fd7 100644 (file)
@@ -281,7 +281,7 @@ static inline u32 get_part_sector_size_nor(struct mtdids *id, struct part_info *
        flash = &flash_info[id->num];
 
        start_phys = flash->start[0] + part->offset;
-       end_phys = start_phys + part->size;
+       end_phys = start_phys + part->size - 1;
 
        for (i = 0; i < flash->sector_count; i++) {
                if (flash->start[i] >= end_phys)