summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-02-18 14:16:18 +0000
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:45:29 -0600
commitd09b8cb1fc794f54c49c5171ab12bda96c10a848 (patch)
tree7113a6c8eb87dc59719ed46f38f26527ef68a00a /include
parent907949083381b0eb2b71887d6a4b1290ff9e60ca (diff)
downloadhqemu-d09b8cb1fc794f54c49c5171ab12bda96c10a848.zip
hqemu-d09b8cb1fc794f54c49c5171ab12bda96c10a848.tar.gz
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')
-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 79adb5b..404d589 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);
OpenPOWER on IntegriCloud