summaryrefslogtreecommitdiffstats
path: root/include/hw/sd
diff options
context:
space:
mode:
authorPeter Maydell2016-02-18 15:16:18 +0100
committerPeter Maydell2016-02-18 15:26:33 +0100
commit260bc9d8aa887bdd72d1b2499a9080f75b289cb4 (patch)
tree9c4dd0750ece1b1b8ab883c14aff8e9770d49339 /include/hw/sd
parenthw/sd/sdhci.c: Remove x-drive property (diff)
downloadqemu-260bc9d8aa887bdd72d1b2499a9080f75b289cb4.tar.gz
qemu-260bc9d8aa887bdd72d1b2499a9080f75b289cb4.tar.xz
qemu-260bc9d8aa887bdd72d1b2499a9080f75b289cb4.zip
hw/sd/sd.c: QOMify
Turn the SD card into a QOM device. This conversion only changes the device itself; the various functions which are effectively methods on the device are not touched at this point. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Message-id: 1455646193-13238-3-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'include/hw/sd')
-rw-r--r--include/hw/sd/sd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/sd/sd.h b/include/hw/sd/sd.h
index 79adb5bb48..404d5896db 100644
--- a/include/hw/sd/sd.h
+++ b/include/hw/sd/sd.h
@@ -68,6 +68,9 @@ typedef struct {
typedef struct SDState SDState;
+#define TYPE_SD_CARD "sd-card"
+#define SD_CARD(obj) OBJECT_CHECK(SDState, (obj), TYPE_SD_CARD)
+
SDState *sd_init(BlockBackend *bs, bool is_spi);
int sd_do_command(SDState *sd, SDRequest *req,
uint8_t *response);