mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
hw/sd: Use the IEC binary prefix definitions
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180625124238.25339-37-f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
246e195b52
commit
4c8f9735da
2 changed files with 5 additions and 5 deletions
|
@ -31,6 +31,7 @@
|
|||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/units.h"
|
||||
#include "hw/qdev.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/registerfields.h"
|
||||
|
@ -38,7 +39,6 @@
|
|||
#include "hw/sd/sd.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/bitmap.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/timer.h"
|
||||
|
@ -403,7 +403,7 @@ static void sd_set_csd(SDState *sd, uint64_t size)
|
|||
((HWBLOCK_SHIFT << 6) & 0xc0);
|
||||
sd->csd[14] = 0x00; /* File format group */
|
||||
} else { /* SDHC */
|
||||
size /= 512 * 1024;
|
||||
size /= 512 * KiB;
|
||||
size -= 1;
|
||||
sd->csd[0] = 0x40;
|
||||
sd->csd[1] = 0x0e;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue