[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 32/58] ahci: Move QOM macro to header
From: |
Eduardo Habkost |
Subject: |
[PATCH v2 32/58] ahci: Move QOM macro to header |
Date: |
Wed, 19 Aug 2020 20:12:10 -0400 |
Move the ALLWINNER_AHCI macro close to the TYPE_ALLWINNER_AHCI
define.
This will make future conversion to OBJECT_DECLARE* easier.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes series v1 -> v2: new patch in series v2
Cc: John Snow <jsnow@redhat.com>
Cc: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org
---
include/hw/ide/ahci.h | 2 ++
hw/ide/ahci-allwinner.c | 3 ---
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h
index ce2bf8a5f8..41bb517047 100644
--- a/include/hw/ide/ahci.h
+++ b/include/hw/ide/ahci.h
@@ -72,6 +72,8 @@ typedef struct SysbusAHCIState {
} SysbusAHCIState;
#define TYPE_ALLWINNER_AHCI "allwinner-ahci"
+#define ALLWINNER_AHCI(obj) \
+ OBJECT_CHECK(AllwinnerAHCIState, (obj), TYPE_ALLWINNER_AHCI)
#define ALLWINNER_AHCI_MMIO_OFF 0x80
#define ALLWINNER_AHCI_MMIO_SIZE 0x80
diff --git a/hw/ide/ahci-allwinner.c b/hw/ide/ahci-allwinner.c
index 8536b9eb5a..227e747ba7 100644
--- a/hw/ide/ahci-allwinner.c
+++ b/hw/ide/ahci-allwinner.c
@@ -25,9 +25,6 @@
#include "trace.h"
-#define ALLWINNER_AHCI(obj) \
- OBJECT_CHECK(AllwinnerAHCIState, (obj), TYPE_ALLWINNER_AHCI)
-
#define ALLWINNER_AHCI_BISTAFR ((0xa0 - ALLWINNER_AHCI_MMIO_OFF) / 4)
#define ALLWINNER_AHCI_BISTCR ((0xa4 - ALLWINNER_AHCI_MMIO_OFF) / 4)
#define ALLWINNER_AHCI_BISTFCTR ((0xa8 - ALLWINNER_AHCI_MMIO_OFF) / 4)
--
2.26.2
- [PATCH v2 28/58] s390x: Move typedef SCLPEventFacility to event-facility.h, (continued)
- [PATCH v2 28/58] s390x: Move typedef SCLPEventFacility to event-facility.h, Eduardo Habkost, 2020/08/19
- [PATCH v2 29/58] vhost-user-gpu: Move QOM macro to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 30/58] ahci: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 31/58] i8257: Move QOM macro to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 32/58] ahci: Move QOM macro to header,
Eduardo Habkost <=
- [PATCH v2 33/58] pckbd: Move QOM macro to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 34/58] vmbus: Move QOM macros to vmbus.h, Eduardo Habkost, 2020/08/19
- [PATCH v2 35/58] virtio-serial-bus: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 36/58] piix: Move QOM macros to header, Eduardo Habkost, 2020/08/19