[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 14/30] hw/arm/bcm2836: Restrict BCM283XClass declaration to C
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 14/30] hw/arm/bcm2836: Restrict BCM283XClass declaration to C source |
Date: |
Thu, 6 Feb 2020 02:17:40 +0100 |
No code out of bcm2836.c uses (or requires) this declarations.
Move it locally to the C source file.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
include/hw/arm/bcm2836.h | 12 ------------
hw/arm/bcm2836.c | 14 ++++++++++++++
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/include/hw/arm/bcm2836.h b/include/hw/arm/bcm2836.h
index 92a6544816..acc75bf553 100644
--- a/include/hw/arm/bcm2836.h
+++ b/include/hw/arm/bcm2836.h
@@ -42,16 +42,4 @@ typedef struct BCM283XState {
BCM2835PeripheralState peripherals;
} BCM283XState;
-typedef struct BCM283XInfo BCM283XInfo;
-
-typedef struct BCM283XClass {
- DeviceClass parent_class;
- const BCM283XInfo *info;
-} BCM283XClass;
-
-#define BCM283X_CLASS(klass) \
- OBJECT_CLASS_CHECK(BCM283XClass, (klass), TYPE_BCM283X)
-#define BCM283X_GET_CLASS(obj) \
- OBJECT_GET_CLASS(BCM283XClass, (obj), TYPE_BCM283X)
-
#endif /* BCM2836_H */
diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c
index 38e2941bab..24109fef1d 100644
--- a/hw/arm/bcm2836.c
+++ b/hw/arm/bcm2836.c
@@ -16,6 +16,15 @@
#include "hw/arm/raspi_platform.h"
#include "hw/sysbus.h"
+typedef struct BCM283XInfo BCM283XInfo;
+
+typedef struct BCM283XClass {
+ /*< private >*/
+ DeviceClass parent_class;
+ /*< public >*/
+ const BCM283XInfo *info;
+} BCM283XClass;
+
struct BCM283XInfo {
const char *name;
const char *cpu_type;
@@ -24,6 +33,11 @@ struct BCM283XInfo {
int clusterid;
};
+#define BCM283X_CLASS(klass) \
+ OBJECT_CLASS_CHECK(BCM283XClass, (klass), TYPE_BCM283X)
+#define BCM283X_GET_CLASS(obj) \
+ OBJECT_GET_CLASS(BCM283XClass, (obj), TYPE_BCM283X)
+
static const BCM283XInfo bcm283x_socs[] = {
{
.name = TYPE_BCM2836,
--
2.21.1
- [PATCH v2 05/30] hw/arm/raspi: Extract the processor type from the board revision, (continued)
- [PATCH v2 05/30] hw/arm/raspi: Extract the processor type from the board revision, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 06/30] hw/arm/raspi: Trivial code movement, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 08/30] hw/arm/raspi: Make board_rev a field of RaspiMachineClass, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 07/30] hw/arm/raspi: Make machines children of abstract RaspiMachineClass, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 09/30] hw/arm/raspi: Let class_init() directly call raspi_machine_init(), Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 10/30] hw/arm/raspi: Set default RAM size to size encoded in board revision, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 11/30] hw/arm/raspi: Extract the board model from the board revision, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 12/30] hw/arm/raspi: Use a unique raspi_machine_class_init() method, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 13/30] hw/arm/raspi: Extract the cores count from the board revision, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 14/30] hw/arm/bcm2836: Restrict BCM283XClass declaration to C source,
Philippe Mathieu-Daudé <=
- [PATCH v2 15/30] hw/arm/bcm2836: QOM'ify more by adding class_init() to each SoC type, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 16/30] hw/arm/bcm2836: Introduce BCM283XClass::core_count, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 17/30] hw/arm/bcm2836: Only provide "enabled-cpus" property to multicore SoCs, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 18/30] hw/arm/bcm2836: Split out common realize() code, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 19/30] hw/arm/bcm2836: Introduce the BCM2835 SoC, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 20/30] hw/arm/raspi: Add the Raspberry Pi Zero machine, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 21/30] hw/arm/raspi: Add the Raspberry Pi B+ machine, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 24/30] tests/acceptance/boot_linux_console: Test the raspi1 console, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 23/30] tests/acceptance/boot_linux_console: Add raspi version=2 parameter, Philippe Mathieu-Daudé, 2020/02/05
- [PATCH v2 22/30] tests/acceptance/boot_linux_console: Use raspi console model as key, Philippe Mathieu-Daudé, 2020/02/05