summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell2017-09-19 11:13:50 +0200
committerPeter Maydell2017-09-19 11:13:51 +0200
commit11e06ce1ed28fd0ffcbc1e2436b72f3412b4ecc8 (patch)
treecf7edbe9f677dd392047d664a1feb4a639fccd81 /include
parentMerge remote-tracking branch 'remotes/kraxel/tags/audio-20170918-pull-request... (diff)
parenthw/block/fdc: Convert to realize (diff)
downloadqemu-11e06ce1ed28fd0ffcbc1e2436b72f3412b4ecc8.tar.gz
qemu-11e06ce1ed28fd0ffcbc1e2436b72f3412b4ecc8.tar.xz
qemu-11e06ce1ed28fd0ffcbc1e2436b72f3412b4ecc8.zip
Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into staging
# gpg: Signature made Tue 19 Sep 2017 01:10:40 BST # gpg: using RSA key 0x7DEF8106AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" # Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB # Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E * remotes/jnsnow/tags/ide-pull-request: hw/block/fdc: Convert to realize hw/ide: Convert DeviceClass init to realize AHCI: remove DPRINTF macro AHCI: pretty-print FIS to buffer instead of stderr AHCI: Rework IRQ constants AHCI: Replace DPRINTF with trace-events IDE: replace DEBUG_AIO with trace events ATAPI: Replace DEBUG_IDE_ATAPI with tracing events IDE: add tracing for data ports IDE: Add register hints to tracing IDE: replace DEBUG_IDE with tracing system hw/ide/microdrive: Mark the dscm1xxxx device with user_creatable = false ide: ahci: unparent children buses before freeing their memory Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/ide/internal.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h
index 482a9512be..7dd0db488e 100644
--- a/include/hw/ide/internal.h
+++ b/include/hw/ide/internal.h
@@ -12,11 +12,9 @@
#include "sysemu/sysemu.h"
#include "hw/block/block.h"
#include "block/scsi.h"
+#include "qapi/error.h"
/* debug IDE devices */
-//#define DEBUG_IDE
-//#define DEBUG_IDE_ATAPI
-//#define DEBUG_AIO
#define USE_DMA_CDROM
typedef struct IDEBus IDEBus;
@@ -335,12 +333,16 @@ struct unreported_events {
};
enum ide_dma_cmd {
- IDE_DMA_READ,
+ IDE_DMA__BEGIN = 0,
+ IDE_DMA_READ = IDE_DMA__BEGIN,
IDE_DMA_WRITE,
IDE_DMA_TRIM,
IDE_DMA_ATAPI,
+ IDE_DMA__COUNT
};
+extern const char *IDE_DMA_CMD_lookup[IDE_DMA__COUNT];
+
#define ide_cmd_is_read(s) \
((s)->dma_cmd == IDE_DMA_READ)
@@ -495,7 +497,7 @@ struct IDEBus {
typedef struct IDEDeviceClass {
DeviceClass parent_class;
- int (*init)(IDEDevice *dev);
+ void (*realize)(IDEDevice *dev, Error **errp);
} IDEDeviceClass;
struct IDEDevice {
@@ -605,7 +607,7 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDEDriveKind kind,
const char *version, const char *serial, const char *model,
uint64_t wwn,
uint32_t cylinders, uint32_t heads, uint32_t secs,
- int chs_trans);
+ int chs_trans, Error **errp);
void ide_init2(IDEBus *bus, qemu_irq irq);
void ide_exit(IDEState *s);
void ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2);