aboutsummaryrefslogtreecommitdiff
path: root/hw/sd/milkymist-memcard.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sd/milkymist-memcard.c')
-rw-r--r--hw/sd/milkymist-memcard.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/sd/milkymist-memcard.c b/hw/sd/milkymist-memcard.c
index fcbccf54ea..df42aa1c54 100644
--- a/hw/sd/milkymist-memcard.c
+++ b/hw/sd/milkymist-memcard.c
@@ -100,8 +100,7 @@ static void memcard_sd_command(MilkymistMemcardState *s)
SDRequest req;
req.cmd = s->command[0] & 0x3f;
- req.arg = (s->command[1] << 24) | (s->command[2] << 16)
- | (s->command[3] << 8) | s->command[4];
+ req.arg = ldl_be_p(s->command + 1);
req.crc = s->command[5];
s->response[0] = req.cmd;