Skip to content

Commit

Permalink
hw/ppc/mac.h: Move newworld specific parts out from shared header
Browse files Browse the repository at this point in the history
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>
Message-Id: <f3c6862de5b51ef49ae0714cf7ee21828d0502cf.1666957578.git.balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  • Loading branch information
zbalaton authored and mcayland committed Oct 31, 2022
1 parent 18e0383 commit cfb47bf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
24 changes: 0 additions & 24 deletions hw/ppc/mac.h
Expand Up @@ -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"
Expand Down Expand Up @@ -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"

Expand Down
19 changes: 19 additions & 0 deletions hw/ppc/mac_newworld.c
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
{
Expand Down
1 change: 1 addition & 0 deletions hw/ppc/mac_oldworld.c
Expand Up @@ -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"
Expand Down

0 comments on commit cfb47bf

Please sign in to comment.