[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 26/29] ide: qidl_declare BMDMAState + PCIIDEState
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 26/29] ide: qidl_declare BMDMAState + PCIIDEState |
Date: |
Thu, 1 Nov 2012 08:04:28 -0500 |
Signed-off-by: Michael Roth <address@hidden>
---
hw/ide/pci.h | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/hw/ide/pci.h b/hw/ide/pci.h
index a694e54..b54ea26 100644
--- a/hw/ide/pci.h
+++ b/hw/ide/pci.h
@@ -2,33 +2,36 @@
#define HW_IDE_PCI_H
#include <hw/ide/internal.h>
+#include "qidl.h"
-typedef struct BMDMAState {
- IDEDMA dma;
+typedef struct BMDMAState BMDMAState;
+
+QIDL_DECLARE_PUBLIC(BMDMAState) {
+ IDEDMA q_immutable dma;
uint8_t cmd;
uint8_t status;
uint32_t addr;
- IDEBus *bus;
+ IDEBus q_elsewhere *bus; /* via parent's corresponding bus */
/* current transfer state */
uint32_t cur_addr;
uint32_t cur_prd_last;
uint32_t cur_prd_addr;
uint32_t cur_prd_len;
uint8_t unit;
- BlockDriverCompletionFunc *dma_cb;
+ BlockDriverCompletionFunc q_immutable *dma_cb;
int64_t sector_num;
uint32_t nsector;
MemoryRegion addr_ioport;
MemoryRegion extra_io;
- QEMUBH *bh;
+ QEMUBH q_immutable *bh;
qemu_irq irq;
/* Bit 0-2 and 7: BM status register
* Bit 3-6: bus->error_status */
uint8_t migration_compat_status;
- struct PCIIDEState *pci_dev;
-} BMDMAState;
+ struct PCIIDEState q_elsewhere *pci_dev; /* via parent */
+};
typedef struct CMD646BAR {
MemoryRegion cmd;
@@ -37,15 +40,16 @@ typedef struct CMD646BAR {
struct PCIIDEState *pci_dev;
} CMD646BAR;
-typedef struct PCIIDEState {
+typedef struct PCIIDEState PCIIDEState;
+
+QIDL_DECLARE_PUBLIC(PCIIDEState) {
PCIDevice dev;
IDEBus bus[2];
BMDMAState bmdma[2];
- uint32_t secondary; /* used only for cmd646 */
+ uint32_t q_immutable secondary; /* used only for cmd646 */
MemoryRegion bmdma_bar;
- CMD646BAR cmd646_bar[2]; /* used only for cmd646 */
-} PCIIDEState;
-
+ CMD646BAR q_immutable cmd646_bar[2]; /* used only for cmd646 */
+};
static inline IDEState *bmdma_active_if(BMDMAState *bmdma)
{
--
1.7.9.5
- [Qemu-devel] [PATCH 22/29] pci_bridge_dev: add qom property for pci-bridge state, (continued)
- [Qemu-devel] [PATCH 22/29] pci_bridge_dev: add qom property for pci-bridge state, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 23/29] ide: qidl_declare IDEBus + IDEState + IDEDevice, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 09/29] pci: add qom property for PCIBus instances, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 07/29] pci: qidl_declare PCIDevice + PCIBus, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 05/29] rtc: use qidl-generated properties, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 21/29] pci_bridge_dev: qidl_declare PCIBridgeDev, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 17/29] piix3: qidl_declare PIIX3State, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 25/29] ide: add qom property for isa-ide state, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 18/29] piix3: add qom property for PIIX3 state, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 19/29] shpc: qidl_declare SHPCDevice, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 26/29] ide: qidl_declare BMDMAState + PCIIDEState,
Michael Roth <=
- [Qemu-devel] [PATCH 24/29] ide: qidl_declare ISAIDEState, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 16/29] i440fx: a qom property for i440FX state, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 12/29] cirrus: add qom property for cirrus-vga state, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 20/29] pci_bridge: qidl_declare PCIBridge, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 11/29] cirrus: qidl_declare PCICirrusVGAState + CirrusVGAState, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 28/29] hpet: qidl_declare HPETState + HPETTimer, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 03/29] isa: qidl_declare ISADevice, Michael Roth, 2012/11/01
- [Qemu-devel] [PATCH 08/29] pci: use qidl_declare'd properties for TYPE_PCI_DEVICE, Michael Roth, 2012/11/01