mirror of
https://github.com/qemu/qemu.git
synced 2025-07-29 06:26:06 +00:00

Some typedefs and macros are defined after the type check macros. This makes it difficult to automatically replace their definitions with OBJECT_DECLARE_TYPE. Patch generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=QOMStructTypedefSplit $(git grep -l '' -- '*.[ch]') which will split "typdef struct { ... } TypedefName" declarations. Followed by: $ ./scripts/codeconverter/converter.py -i --pattern=MoveSymbols \ $(git grep -l '' -- '*.[ch]') which will: - move the typedefs and #defines above the type check macros - add missing #include "qom/object.h" lines if necessary Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-9-ehabkost@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-10-ehabkost@redhat.com> Message-Id: <20200831210740.126168-11-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
30 lines
582 B
C
30 lines
582 B
C
/*
|
|
* ASPEED Real Time Clock
|
|
* Joel Stanley <joel@jms.id.au>
|
|
*
|
|
* Copyright 2019 IBM Corp
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
#ifndef HW_RTC_ASPEED_RTC_H
|
|
#define HW_RTC_ASPEED_RTC_H
|
|
|
|
#include "hw/sysbus.h"
|
|
#include "qom/object.h"
|
|
|
|
struct AspeedRtcState {
|
|
SysBusDevice parent_obj;
|
|
|
|
MemoryRegion iomem;
|
|
qemu_irq irq;
|
|
|
|
uint32_t reg[0x18];
|
|
int offset;
|
|
|
|
};
|
|
typedef struct AspeedRtcState AspeedRtcState;
|
|
|
|
#define TYPE_ASPEED_RTC "aspeed.rtc"
|
|
#define ASPEED_RTC(obj) OBJECT_CHECK(AspeedRtcState, (obj), TYPE_ASPEED_RTC)
|
|
|
|
#endif /* HW_RTC_ASPEED_RTC_H */
|