[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/15] hw/sd.c, hw/sd.h: add receive ready query rou
From: |
Evgeny Voevodin |
Subject: |
[Qemu-devel] [PATCH 13/15] hw/sd.c, hw/sd.h: add receive ready query routine to SD/MMC API |
Date: |
Fri, 09 Dec 2011 17:34:40 +0400 |
From: Mitsyanko Igor <address@hidden>
Data transfer direction between host controller and SD/MMC card is selected by
host controller configuration registers, but whether we actually need or need
not perform data transfer depends on type of last issued command. To avoid
memorization of which type of command host controller issued the last time, we
can use simple query procedures, to make sure that SD/MMC card is in the
right state. The only query routine currently presented in SD/MMC card
emulation is sd_data_ready(), this patch adds sd_receive_ready() routine.
Signed-off-by: Evgeny Voevodin <address@hidden>
---
hw/sd.c | 5 +++++
hw/sd.h | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/hw/sd.c b/hw/sd.c
index 10e26ad..b0a8557 100644
--- a/hw/sd.c
+++ b/hw/sd.c
@@ -1670,3 +1670,8 @@ void sd_enable(SDState *sd, int enable)
{
sd->enable = enable;
}
+
+int sd_receive_ready(SDState *sd)
+{
+ return sd->state == sd_receivingdata_state;
+}
diff --git a/hw/sd.h b/hw/sd.h
index ac4b7c4..71ab781 100644
--- a/hw/sd.h
+++ b/hw/sd.h
@@ -75,5 +75,6 @@ uint8_t sd_read_data(SDState *sd);
void sd_set_cb(SDState *sd, qemu_irq readonly, qemu_irq insert);
int sd_data_ready(SDState *sd);
void sd_enable(SDState *sd, int enable);
+int sd_receive_ready(SDState *sd);
#endif /* __hw_sd_h */
--
1.7.4.1
- [Qemu-devel] [PATCH 07/15] hw/arm_boot.c: Add new secondary CPU bootloader., (continued)
- [Qemu-devel] [PATCH 07/15] hw/arm_boot.c: Add new secondary CPU bootloader., Evgeny Voevodin, 2011/12/09
- [Qemu-devel] [PATCH 01/15] ARM: Samsung exynos421 0-based boards emulation, Evgeny Voevodin, 2011/12/09
- [Qemu-devel] [PATCH 03/15] ARM: exynos4210: UART support, Evgeny Voevodin, 2011/12/09
- [Qemu-devel] [PATCH 06/15] ARM: exynos4210: PWM support., Evgeny Voevodin, 2011/12/09
- [Qemu-devel] [PATCH 12/15] hw/exynos4210.c: Add LAN support for SMDKC210., Evgeny Voevodin, 2011/12/09
- [Qemu-devel] [PATCH 10/15] hw/exynos4210.c: Boot secondary CPU., Evgeny Voevodin, 2011/12/09
- [Qemu-devel] [PATCH 02/15] ARM: exynos4210: CMU support, Evgeny Voevodin, 2011/12/09
- [Qemu-devel] [PATCH 05/15] ARM: exynos4210: IRQ subsystem support., Evgeny Voevodin, 2011/12/09
- [Qemu-devel] [PATCH 11/15] hw/lan9118: Add basic 16-bit mode support., Evgeny Voevodin, 2011/12/09
- [Qemu-devel] [PATCH 09/15] ARM: exynos4210: MCT support., Evgeny Voevodin, 2011/12/09
- [Qemu-devel] [PATCH 13/15] hw/sd.c, hw/sd.h: add receive ready query routine to SD/MMC API,
Evgeny Voevodin <=
- [Qemu-devel] [PATCH 14/15] ARM: exynos4210: added SD/MMC host controller, Evgeny Voevodin, 2011/12/09
- [Qemu-devel] [PATCH 15/15] ARM: exynos4210: added display controller implementation, Evgeny Voevodin, 2011/12/09