[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 12/14] SD card: add query function to check wether S
From: |
Evgeny Voevodin |
Subject: |
[Qemu-devel] [PATCH 12/14] SD card: add query function to check wether SD card currently ready to recieve data Before executing data transfer to card, we must check that previously issued command wasn't a simple query command (for ex. CMD13), which doesn't require data transfer. Currently, we only can aquire information about whether SD card is in sending data state or not. This patch allows us to query wether previous command was data write command and it was successfully accepted by card (meaning that SD card in recieving data state). |
Date: |
Wed, 07 Dec 2011 13:47:03 +0400 |
From: Mitsyanko Igor <address@hidden>
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..ddb9d39 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_recieve_ready(SDState *sd)
+{
+ return sd->state == sd_receivingdata_state;
+}
diff --git a/hw/sd.h b/hw/sd.h
index ac4b7c4..782c8d6 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_recieve_ready(SDState *sd);
#endif /* __hw_sd_h */
--
1.7.4.1
- [Qemu-devel] [PATCH 05/14] hw/arm_boot.c: Add new secondary CPU bootloader., (continued)
- [Qemu-devel] [PATCH 05/14] hw/arm_boot.c: Add new secondary CPU bootloader., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 04/14] ARM: s5pc210: PWM support., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 01/14] ARM: s5pc210: Basic support of s5pc210 boards, Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 03/14] ARM: s5pc210: IRQ subsystem support., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 09/14] hw/lan9118.c: Basic byte/word/long access support., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 08/14] ARM: s5pc210: Boot secondary CPU., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 12/14] SD card: add query function to check wether SD card currently ready to recieve data Before executing data transfer to card, we must check that previously issued command wasn't a simple query command (for ex. CMD13), which doesn't require data transfer. Currently, we only can aquire information about whether SD card is in sending data state or not. This patch allows us to query wether previous command was data write command and it was successfully accepted by card (meaning that SD card in recieving data state).,
Evgeny Voevodin <=
- [Qemu-devel] [PATCH 06/14] hw/arm_gic.c: lower IRQ only on changing of enable bit., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 14/14] s5pc210: Switch to sysbus_init_mmio., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 07/14] ARM: s5pc210: MCT support., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 10/14] hw/s5pc210.c: Add lan9118 support to SMDK board., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 11/14] ARM: s5pc210: added s5pc210 display controller device (FIMD), Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 13/14] ARM: s5pc210: added SD/MMC host controller (ver. 2.0 compliant) implementation, Evgeny Voevodin, 2011/12/07
- Re: [Qemu-devel] [PATCH 00/14] ARM: Samsung S5PC210-based boards support., Peter Maydell, 2011/12/07