aboutsummaryrefslogtreecommitdiff
path: root/include/hw/misc/sifive_u_prci.h
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-08-31 17:07:30 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-18 13:49:48 -0400
commitac900edeed585a8e50766c4bd6f370d8bcac3b0e (patch)
tree11f51ab7e82362b8252f0cd0ef93509a5ba75edf /include/hw/misc/sifive_u_prci.h
parent13b8c354188359e2c0bef909d82ad2c0dcae693a (diff)
downloadqemu-ac900edeed585a8e50766c4bd6f370d8bcac3b0e.zip
qemu-ac900edeed585a8e50766c4bd6f370d8bcac3b0e.tar.gz
qemu-ac900edeed585a8e50766c4bd6f370d8bcac3b0e.tar.bz2
sifive: Move QOM typedefs and add missing includes
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 Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200831210740.126168-9-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/hw/misc/sifive_u_prci.h')
-rw-r--r--include/hw/misc/sifive_u_prci.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/hw/misc/sifive_u_prci.h b/include/hw/misc/sifive_u_prci.h
index 0a531fd..83eab43 100644
--- a/include/hw/misc/sifive_u_prci.h
+++ b/include/hw/misc/sifive_u_prci.h
@@ -18,6 +18,7 @@
#ifndef HW_SIFIVE_U_PRCI_H
#define HW_SIFIVE_U_PRCI_H
+#include "qom/object.h"
#define SIFIVE_U_PRCI_HFXOSCCFG 0x00
#define SIFIVE_U_PRCI_COREPLLCFG0 0x04
@@ -58,10 +59,11 @@
#define TYPE_SIFIVE_U_PRCI "riscv.sifive.u.prci"
+typedef struct SiFiveUPRCIState SiFiveUPRCIState;
#define SIFIVE_U_PRCI(obj) \
OBJECT_CHECK(SiFiveUPRCIState, (obj), TYPE_SIFIVE_U_PRCI)
-typedef struct SiFiveUPRCIState {
+struct SiFiveUPRCIState {
/*< private >*/
SysBusDevice parent_obj;
@@ -76,7 +78,7 @@ typedef struct SiFiveUPRCIState {
uint32_t coreclksel;
uint32_t devicesreset;
uint32_t clkmuxstatus;
-} SiFiveUPRCIState;
+};
/*
* Clock indexes for use by Device Tree data and the PRCI driver.