mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
hw/sd/sdcard: Make iolen unsigned
I/O request length can not be negative. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20200630133912.9428-15-f4bug@amsat.org>
This commit is contained in:
parent
aecaa05922
commit
692fb0ef31
@ -1982,7 +1982,7 @@ uint8_t sd_read_byte(SDState *sd)
|
||||
{
|
||||
/* TODO: Append CRCs */
|
||||
uint8_t ret;
|
||||
int io_len;
|
||||
uint32_t io_len;
|
||||
|
||||
if (!sd->blk || !blk_is_inserted(sd->blk) || !sd->enable)
|
||||
return 0x00;
|
||||
|
@ -52,7 +52,7 @@ sdcard_unlock(void) ""
|
||||
sdcard_read_block(uint64_t addr, uint32_t len) "addr 0x%" PRIx64 " size 0x%x"
|
||||
sdcard_write_block(uint64_t addr, uint32_t len) "addr 0x%" PRIx64 " size 0x%x"
|
||||
sdcard_write_data(const char *proto, const char *cmd_desc, uint8_t cmd, uint8_t value) "%s %20s/ CMD%02d value 0x%02x"
|
||||
sdcard_read_data(const char *proto, const char *cmd_desc, uint8_t cmd, int length) "%s %20s/ CMD%02d len %d"
|
||||
sdcard_read_data(const char *proto, const char *cmd_desc, uint8_t cmd, uint32_t length) "%s %20s/ CMD%02d len %" PRIu32
|
||||
sdcard_set_voltage(uint16_t millivolts) "%u mV"
|
||||
|
||||
# milkymist-memcard.c
|
||||
|
Loading…
Reference in New Issue
Block a user