[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 39/58] pxa2xx: Move QOM macros to header
From: |
Eduardo Habkost |
Subject: |
[PATCH v2 39/58] pxa2xx: Move QOM macros to header |
Date: |
Wed, 19 Aug 2020 20:12:17 -0400 |
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: Andrzej Zaborowski <balrogg@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org
Cc: qemu-devel@nongnu.org
---
include/hw/arm/pxa.h | 13 +++++++++++++
hw/arm/pxa2xx.c | 7 -------
hw/pcmcia/pxa2xx.c | 4 ----
hw/sd/pxa2xx_mmci.c | 3 ---
4 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/include/hw/arm/pxa.h b/include/hw/arm/pxa.h
index 8843e5f910..f6359fe7c9 100644
--- a/include/hw/arm/pxa.h
+++ b/include/hw/arm/pxa.h
@@ -86,7 +86,10 @@ PXA2xxLCDState *pxa2xx_lcdc_init(MemoryRegion *sysmem,
void pxa2xx_lcd_vsync_notifier(PXA2xxLCDState *s, qemu_irq handler);
/* pxa2xx_mmci.c */
+#define TYPE_PXA2XX_MMCI "pxa2xx-mmci"
typedef struct PXA2xxMMCIState PXA2xxMMCIState;
+#define PXA2XX_MMCI(obj) OBJECT_CHECK(PXA2xxMMCIState, (obj), TYPE_PXA2XX_MMCI)
+
PXA2xxMMCIState *pxa2xx_mmci_init(MemoryRegion *sysmem,
hwaddr base,
BlockBackend *blk, qemu_irq irq,
@@ -95,7 +98,11 @@ void pxa2xx_mmci_handlers(PXA2xxMMCIState *s, qemu_irq
readonly,
qemu_irq coverswitch);
/* pxa2xx_pcmcia.c */
+#define TYPE_PXA2XX_PCMCIA "pxa2xx-pcmcia"
typedef struct PXA2xxPCMCIAState PXA2xxPCMCIAState;
+#define PXA2XX_PCMCIA(obj) \
+ OBJECT_CHECK(PXA2xxPCMCIAState, obj, TYPE_PXA2XX_PCMCIA)
+
PXA2xxPCMCIAState *pxa2xx_pcmcia_init(MemoryRegion *sysmem,
hwaddr base);
int pxa2xx_pcmcia_attach(void *opaque, PCMCIACardState *card);
@@ -120,8 +127,14 @@ PXA2xxI2CState *pxa2xx_i2c_init(hwaddr base,
qemu_irq irq, uint32_t page_size);
I2CBus *pxa2xx_i2c_bus(PXA2xxI2CState *s);
+#define TYPE_PXA2XX_I2C "pxa2xx_i2c"
typedef struct PXA2xxI2SState PXA2xxI2SState;
+#define PXA2XX_I2C(obj) \
+ OBJECT_CHECK(PXA2xxI2CState, (obj), TYPE_PXA2XX_I2C)
+
+#define TYPE_PXA2XX_FIR "pxa2xx-fir"
typedef struct PXA2xxFIrState PXA2xxFIrState;
+#define PXA2XX_FIR(obj) OBJECT_CHECK(PXA2xxFIrState, (obj), TYPE_PXA2XX_FIR)
typedef struct {
ARMCPU *cpu;
diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c
index 6203c4cfe0..037d415498 100644
--- a/hw/arm/pxa2xx.c
+++ b/hw/arm/pxa2xx.c
@@ -1250,10 +1250,6 @@ typedef struct PXA2xxI2CSlaveState {
PXA2xxI2CState *host;
} PXA2xxI2CSlaveState;
-#define TYPE_PXA2XX_I2C "pxa2xx_i2c"
-#define PXA2XX_I2C(obj) \
- OBJECT_CHECK(PXA2xxI2CState, (obj), TYPE_PXA2XX_I2C)
-
struct PXA2xxI2CState {
/*< private >*/
SysBusDevice parent_obj;
@@ -1786,9 +1782,6 @@ static PXA2xxI2SState *pxa2xx_i2s_init(MemoryRegion
*sysmem,
}
/* PXA Fast Infra-red Communications Port */
-#define TYPE_PXA2XX_FIR "pxa2xx-fir"
-#define PXA2XX_FIR(obj) OBJECT_CHECK(PXA2xxFIrState, (obj), TYPE_PXA2XX_FIR)
-
struct PXA2xxFIrState {
/*< private >*/
SysBusDevice parent_obj;
diff --git a/hw/pcmcia/pxa2xx.c b/hw/pcmcia/pxa2xx.c
index 5f4bf22a90..fcca7e571b 100644
--- a/hw/pcmcia/pxa2xx.c
+++ b/hw/pcmcia/pxa2xx.c
@@ -18,10 +18,6 @@
#include "hw/pcmcia.h"
#include "hw/arm/pxa.h"
-#define TYPE_PXA2XX_PCMCIA "pxa2xx-pcmcia"
-#define PXA2XX_PCMCIA(obj) \
- OBJECT_CHECK(PXA2xxPCMCIAState, obj, TYPE_PXA2XX_PCMCIA)
-
struct PXA2xxPCMCIAState {
SysBusDevice parent_obj;
diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c
index 68bed24480..c400197815 100644
--- a/hw/sd/pxa2xx_mmci.c
+++ b/hw/sd/pxa2xx_mmci.c
@@ -22,9 +22,6 @@
#include "qemu/module.h"
#include "trace.h"
-#define TYPE_PXA2XX_MMCI "pxa2xx-mmci"
-#define PXA2XX_MMCI(obj) OBJECT_CHECK(PXA2xxMMCIState, (obj), TYPE_PXA2XX_MMCI)
-
#define TYPE_PXA2XX_MMCI_BUS "pxa2xx-mmci-bus"
#define PXA2XX_MMCI_BUS(obj) OBJECT_CHECK(SDBus, (obj), TYPE_PXA2XX_MMCI_BUS)
--
2.26.2
- Re: [PATCH v2 34/58] vmbus: Move QOM macros to vmbus.h, (continued)
- [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
- [PATCH v2 37/58] auxbus: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 38/58] rocker: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 39/58] pxa2xx: Move QOM macros to header,
Eduardo Habkost <=
- [PATCH v2 40/58] mptsas: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 41/58] kvm: Move QOM macros to kvm.h, Eduardo Habkost, 2020/08/19
- [PATCH v2 42/58] vfio/pci: Move QOM macros to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 43/58] qom: make object_ref/unref use a void * instead of Object *., Eduardo Habkost, 2020/08/19