]> Git Repo - qemu.git/blobdiff - hw/block/tc58128.c
xen: do not build backends for targets that do not support xen
[qemu.git] / hw / block / tc58128.c
index 728f1c3b6892ffa8d69d8c9f19277c13bdb439cd..1d9f7ee000689d401a1058d11c5f7d6e8ca90c3f 100644 (file)
@@ -1,3 +1,4 @@
+#include "qemu/osdep.h"
 #include "hw/hw.h"
 #include "hw/sh4/sh.h"
 #include "hw/loader.h"
@@ -44,7 +45,7 @@ static void init_dev(tc58128_dev * dev, const char *filename)
             }
        } else {
            /* Build first block with number of blocks */
-           blocks = (ret + 528 * 32 - 1) / (528 * 32);
+            blocks = DIV_ROUND_UP(ret, 528 * 32);
            dev->flash_contents[0] = blocks & 0xff;
            dev->flash_contents[1] = (blocks >> 8) & 0xff;
            dev->flash_contents[2] = (blocks >> 16) & 0xff;
This page took 0.02377 seconds and 4 git commands to generate.