[U-Boot] Temporary patch for missing _udivdi3 in fs/yaffs2/yaffscfg.c

J.C. Wren jcwren at jcwren.com
Sat Aug 1 01:00:58 CEST 2009


I don't know if this is the correct way to submit a patch or not.  If not,
please accept my apologies.  This gets past the missing _udivid3 issue, but
is not the correct way, long-term.
diff --git a/fs/yaffs2/yaffscfg.c b/fs/yaffs2/yaffscfg.c
index 16e84a4..25a43aa 100644
--- a/fs/yaffs2/yaffscfg.c
+++ b/fs/yaffs2/yaffscfg.c
@@ -22,6 +22,7 @@
 #include <common.h>

 #include <config.h>
+#include <div64.h>
 #include "nand.h"
 #include "yaffscfg.h"
 #include "yaffsfs.h"
@@ -182,7 +183,7 @@ int yaffs_StartUp(void)
                flashDev->nDataBytesPerChunk = mtd->oobblock;
                flashDev->nChunksPerBlock = mtd->erasesize / mtd->oobblock;
 #endif
-               nBlocks = mtd->size / mtd->erasesize;
+               nBlocks = lldiv (mtd->size, mtd->erasesize);

                flashDev->nCheckpointReservedBlocks = 10;
                flashDev->startBlock = 0;


More information about the U-Boot mailing list