mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
hw/sd: Introduce receive_ready() callback
At present there is a data_ready() callback for the SD data read path. Let's add a receive_ready() for the SD data write path. Signed-off-by: Bin Meng <bin.meng@windriver.com> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20210128063035.15674-5-bmeng.cn@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
This commit is contained in:
parent
eedb7f249c
commit
995731d3f7
3 changed files with 21 additions and 0 deletions
13
hw/sd/core.c
13
hw/sd/core.c
|
@ -160,6 +160,19 @@ void sdbus_read_data(SDBus *sdbus, void *buf, size_t length)
|
|||
}
|
||||
}
|
||||
|
||||
bool sdbus_receive_ready(SDBus *sdbus)
|
||||
{
|
||||
SDState *card = get_card(sdbus);
|
||||
|
||||
if (card) {
|
||||
SDCardClass *sc = SD_CARD_GET_CLASS(card);
|
||||
|
||||
return sc->receive_ready(card);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool sdbus_data_ready(SDBus *sdbus)
|
||||
{
|
||||
SDState *card = get_card(sdbus);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue