]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - fs/yaffs2/yaffs_uboot_glue.c
arm: mx6: rename some missed instances of CONFIG_MX6* to CONFIG_SOC_MX6*
[karo-tx-uboot.git] / fs / yaffs2 / yaffs_uboot_glue.c
index e113e4039e1f78a66d7258142df8854f6519eb06..50000a135b54f229e4aa914939ab6c554bdab0c4 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include <common.h>
+#include <div64.h>
 
 #include <config.h>
 #include "nand.h"
@@ -184,7 +185,7 @@ void cmd_yaffs_devconfig(char *_mp, int flash_dev,
        }
 
        if (end_block == 0)
-               end_block = mtd->size / mtd->erasesize - 1;
+               end_block = lldiv(mtd->size, mtd->erasesize - 1);
 
        if (end_block < start_block) {
                printf("Bad start/end\n");