From: BALATON Zoltan <balaton@eik.bme.hu>
To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Subject: [PATCH v6 07/19] hw/ppc/mac.h: Move newworld specific parts out from shared header
Date: Fri, 28 Oct 2022 13:56:23 +0200 (CEST) [thread overview]
Message-ID: <f3c6862de5b51ef49ae0714cf7ee21828d0502cf.1666957578.git.balaton@eik.bme.hu> (raw)
In-Reply-To: <cover.1666957578.git.balaton@eik.bme.hu>
Move the parts specific to and only used by mac99 out from the shared
mac.h into mac_newworld.c where they better belong.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/ppc/mac.h | 24 ------------------------
hw/ppc/mac_newworld.c | 19 +++++++++++++++++++
hw/ppc/mac_oldworld.c | 1 +
3 files changed, 20 insertions(+), 24 deletions(-)
diff --git a/hw/ppc/mac.h b/hw/ppc/mac.h
index a1fa8f8e41..e97087c7e7 100644
--- a/hw/ppc/mac.h
+++ b/hw/ppc/mac.h
@@ -26,15 +26,8 @@
#ifndef PPC_MAC_H
#define PPC_MAC_H
-#include "qemu/units.h"
#include "exec/memory.h"
-#include "hw/boards.h"
#include "hw/sysbus.h"
-#include "hw/input/adb.h"
-#include "hw/misc/mos6522.h"
-#include "hw/pci/pci_host.h"
-#include "hw/pci-host/uninorth.h"
-#include "qom/object.h"
#define NVRAM_SIZE 0x2000
#define PROM_FILENAME "openbios-ppc"
@@ -65,23 +58,6 @@
#define NEWWORLD_EXTING_GPIO1 0x2f
#define NEWWORLD_EXTING_GPIO9 0x37
-/* Core99 machine */
-#define TYPE_CORE99_MACHINE MACHINE_TYPE_NAME("mac99")
-typedef struct Core99MachineState Core99MachineState;
-DECLARE_INSTANCE_CHECKER(Core99MachineState, CORE99_MACHINE,
- TYPE_CORE99_MACHINE)
-
-#define CORE99_VIA_CONFIG_CUDA 0x0
-#define CORE99_VIA_CONFIG_PMU 0x1
-#define CORE99_VIA_CONFIG_PMU_ADB 0x2
-
-struct Core99MachineState {
- /*< private >*/
- MachineState parent;
-
- uint8_t via_config;
-};
-
/* Grackle PCI */
#define TYPE_GRACKLE_PCI_HOST_BRIDGE "grackle-pcihost"
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 4bfffa586b..873c9f5cb4 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -48,10 +48,13 @@
#include "qemu/osdep.h"
#include "qemu/datadir.h"
+#include "qemu/units.h"
#include "qapi/error.h"
#include "hw/ppc/ppc.h"
#include "hw/qdev-properties.h"
#include "hw/ppc/mac.h"
+#include "hw/boards.h"
+#include "hw/pci-host/uninorth.h"
#include "hw/input/adb.h"
#include "hw/ppc/mac_dbdma.h"
#include "hw/pci/pci.h"
@@ -83,6 +86,22 @@
#define PROM_BASE 0xfff00000
#define PROM_SIZE (1 * MiB)
+#define TYPE_CORE99_MACHINE MACHINE_TYPE_NAME("mac99")
+typedef struct Core99MachineState Core99MachineState;
+DECLARE_INSTANCE_CHECKER(Core99MachineState, CORE99_MACHINE,
+ TYPE_CORE99_MACHINE)
+
+#define CORE99_VIA_CONFIG_CUDA 0x0
+#define CORE99_VIA_CONFIG_PMU 0x1
+#define CORE99_VIA_CONFIG_PMU_ADB 0x2
+
+struct Core99MachineState {
+ /*< private >*/
+ MachineState parent;
+
+ uint8_t via_config;
+};
+
static void fw_cfg_boot_set(void *opaque, const char *boot_device,
Error **errp)
{
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index a497507f1d..f323a49d7a 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -31,6 +31,7 @@
#include "hw/ppc/ppc.h"
#include "hw/qdev-properties.h"
#include "mac.h"
+#include "hw/boards.h"
#include "hw/input/adb.h"
#include "sysemu/sysemu.h"
#include "net/net.h"
--
2.30.6
next prev parent reply other threads:[~2022-10-28 11:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-28 11:56 [PATCH v6 00/19] Misc ppc/mac machines clean up BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 01/19] mac_newworld: Drop some variables BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 02/19] mac_oldworld: Drop some more variables BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 03/19] mac_{old|new}world: Set tbfreq at declaration BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 04/19] mac_{old|new}world: Avoid else branch by setting default value BALATON Zoltan
2022-10-30 21:59 ` Mark Cave-Ayland
2022-10-28 11:56 ` [PATCH v6 05/19] mac_newworld: Clean up creation of Uninorth devices BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 06/19] mac_{old|new}world: Reduce number of QOM casts BALATON Zoltan
2022-10-28 11:56 ` BALATON Zoltan [this message]
2022-10-28 11:56 ` [PATCH v6 08/19] hw/ppc/mac.h: Move macio specific parts out from shared header BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 09/19] hw/ppc/mac.h: Move grackle-pcihost type declaration out to a header BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 10/19] hw/ppc/mac.h: Move PROM and KERNEL defines to board code BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 11/19] hw/ppc/mac.h: Rename to include/hw/nvram/mac_nvram.h BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 12/19] mac_nvram: Use NVRAM_SIZE constant BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 13/19] mac_{old|new}world: Code style fix adding missing braces to if-s BALATON Zoltan
2022-10-29 8:48 ` Mark Cave-Ayland
2022-10-28 11:56 ` [PATCH v6 14/19] mac_newworld: Turn CORE99_VIA_CONFIG defines into an enum BALATON Zoltan
2022-10-29 8:49 ` Mark Cave-Ayland
2022-10-28 11:56 ` [PATCH v6 15/19] mac_newworld: Add machine types for different mac99 configs BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 16/19] mac_newworld: Deprecate mac99 with G5 CPU BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 17/19] mac_newworld: Deprecate mac99 "via" option BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 18/19] mac_newworld: Document deprecation BALATON Zoltan
2022-10-28 11:56 ` [PATCH v6 19/19] mac_{old, new}world: Pass MacOS VGA NDRV in card ROM instead of fw_cfg BALATON Zoltan
2022-10-30 22:03 ` [PATCH v6 00/19] Misc ppc/mac machines clean up Mark Cave-Ayland
2022-10-30 22:23 ` BALATON Zoltan
2022-10-31 20:46 ` Mark Cave-Ayland
2022-10-31 22:09 ` BALATON Zoltan
2022-10-31 22:47 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f3c6862de5b51ef49ae0714cf7ee21828d0502cf.1666957578.git.balaton@eik.bme.hu \
--to=balaton@eik.bme.hu \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).