mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
sdcard: Use the ldst API
The load/store API will ease further code movement. Per the Physical Layer Simplified Spec. "3.6 Bus Protocol": "In the CMD line the Most Significant Bit (MSB) is transmitted first, the Least Significant Bit (LSB) is the last." Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
13606b9951
commit
b3141c0625
6 changed files with 19 additions and 35 deletions
|
@ -163,8 +163,7 @@ static void omap_mmc_command(struct omap_mmc_s *host, int cmd, int dir,
|
|||
CID_CSD_OVERWRITE;
|
||||
if (host->sdio & (1 << 13))
|
||||
mask |= AKE_SEQ_ERROR;
|
||||
rspstatus = (response[0] << 24) | (response[1] << 16) |
|
||||
(response[2] << 8) | (response[3] << 0);
|
||||
rspstatus = ldl_be_p(response);
|
||||
break;
|
||||
|
||||
case sd_r2:
|
||||
|
@ -182,8 +181,7 @@ static void omap_mmc_command(struct omap_mmc_s *host, int cmd, int dir,
|
|||
}
|
||||
rsplen = 4;
|
||||
|
||||
rspstatus = (response[0] << 24) | (response[1] << 16) |
|
||||
(response[2] << 8) | (response[3] << 0);
|
||||
rspstatus = ldl_be_p(response);
|
||||
if (rspstatus & 0x80000000)
|
||||
host->status &= 0xe000;
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue