]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
hw/sd.c: make sd_wp_addr() accept 64 bit address argument
authorMitsyanko Igor <i.mitsyanko@samsung.com>
Mon, 13 Aug 2012 10:04:06 +0000 (11:04 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 13 Aug 2012 10:04:06 +0000 (11:04 +0100)
Currently sd_wp_addr() accepts 32 bit address arguments therefore implicitly
restricting SD card address range. Change address argument type to uint64_t.

Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/sd.c

diff --git a/hw/sd.c b/hw/sd.c
index 575b509bde8de99452c1255a7d5018c3da965ca1..e24d04ae33f8bef7cdd78261425c3c4e1b960eee 100644 (file)
--- a/hw/sd.c
+++ b/hw/sd.c
@@ -539,7 +539,7 @@ static void sd_function_switch(SDState *sd, uint32_t arg)
     sd->data[66] = crc & 0xff;
 }
 
-static inline int sd_wp_addr(SDState *sd, uint32_t addr)
+static inline int sd_wp_addr(SDState *sd, uint64_t addr)
 {
     return test_bit(addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT),
             sd->wp_groups);