aboutsummaryrefslogtreecommitdiff
path: root/hw/pcmcia/pcmcia.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-07-17 19:46:16 +0200
committerAndreas Färber <afaerber@suse.de>2013-11-05 18:06:52 +0100
commitd1f2c96a81a4d18b99b7f471bf58e65c9afab33f (patch)
tree5f8be6b1e059b93091d11ae7ba630e94f06dac0a /hw/pcmcia/pcmcia.c
parent853ca11dafb625e36db036b8e83d6e2168703e1f (diff)
pcmcia: QOM'ify PCMCIACardState and MicroDriveState
Turn PCMCIACardState into a device. Move callbacks to new PCMCIACardClass. Derive TYPE_MICRODRIVE from TYPE_PCMCIA_CARD. Replace ide_init2_with_non_qdev_drives(). Signed-off-by: Othmar Pasteka <pasteka@kabsi.at> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/pcmcia/pcmcia.c')
-rw-r--r--hw/pcmcia/pcmcia.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/hw/pcmcia/pcmcia.c b/hw/pcmcia/pcmcia.c
new file mode 100644
index 0000000000..78efe5a67a
--- /dev/null
+++ b/hw/pcmcia/pcmcia.c
@@ -0,0 +1,24 @@
+/*
+ * PCMCIA emulation
+ *
+ * Copyright 2013 SUSE LINUX Products GmbH
+ */
+
+#include "qemu-common.h"
+#include "hw/hw.h"
+#include "hw/pcmcia.h"
+
+static const TypeInfo pcmcia_card_type_info = {
+ .name = TYPE_PCMCIA_CARD,
+ .parent = TYPE_DEVICE,
+ .instance_size = sizeof(PCMCIACardState),
+ .abstract = true,
+ .class_size = sizeof(PCMCIACardClass),
+};
+
+static void pcmcia_register_types(void)
+{
+ type_register_static(&pcmcia_card_type_info);
+}
+
+type_init(pcmcia_register_types)