mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
dm: mmc: sandbox: Update SD card emulation
The SDcard initialization procedure does a few more things than it did earlier: * switch the bus width even for 1-bit bus width * check that speed has been properly set (in resp[4] of SD_CMD_SWITCH_FUNC) Update the SD simulator to handle those requests gracefully. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
This commit is contained in:
parent
c9d3f34e77
commit
49f89252ed
1 changed files with 4 additions and 1 deletions
|
@ -48,9 +48,12 @@ static int sandbox_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
|
|||
cmd->response[1] = 10 << 16; /* 1 << block_len */
|
||||
break;
|
||||
case SD_CMD_SWITCH_FUNC: {
|
||||
if (!data)
|
||||
break;
|
||||
u32 *resp = (u32 *)data->dest;
|
||||
|
||||
resp[7] = cpu_to_be32(SD_HIGHSPEED_BUSY);
|
||||
if ((cmd->cmdarg & 0xF) == UHS_SDR12_BUS_SPEED)
|
||||
resp[4] = (cmd->cmdarg & 0xF) << 24;
|
||||
break;
|
||||
}
|
||||
case MMC_CMD_READ_SINGLE_BLOCK:
|
||||
|
|
Loading…
Reference in a new issue