From patchwork Mon Jun 18 03:53:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 930660 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b="DVKQQGH1"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 418HRk2yrnz9s0W for ; Mon, 18 Jun 2018 14:00:02 +1000 (AEST) Received: from localhost ([::1]:60902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUlKi-00024G-3m for incoming@patchwork.ozlabs.org; Mon, 18 Jun 2018 00:00:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUlEX-0005J8-S0 for qemu-devel@nongnu.org; Sun, 17 Jun 2018 23:53:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUlEW-0003yI-FF for qemu-devel@nongnu.org; Sun, 17 Jun 2018 23:53:37 -0400 Received: from ozlabs.org ([203.11.71.1]:54577) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fUlEW-0003wN-2E; Sun, 17 Jun 2018 23:53:36 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 418HJ91TYGz9s5b; Mon, 18 Jun 2018 13:53:28 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1529294009; bh=pY4Un6Gk5hK1W4R3CgOFLYJrmiVlUXsDtQpbq09oxSY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DVKQQGH1zVd8fuYw0bez64ul9I4V/CrG3j9pK+MBu1+Sm59v28Q57TcXrJ87+DnFL Gl3P1wKThbxqqHVkpDbMX+nxuwOYSemjrMF9fH2bKidPgCc+T20vV3GSJjvW23gWm9 jhfZmwIw7uD2aBCLRmZ/3pGzfe55oX8yDgR0GwLk= From: David Gibson To: peter.maydell@linaro.org Date: Mon, 18 Jun 2018 13:53:01 +1000 Message-Id: <20180618035324.19907-6-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180618035324.19907-1-david@gibson.dropbear.id.au> References: <20180618035324.19907-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 05/28] ppc: introduce Core99MachinesState for the mac99 machine X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: aik@ozlabs.ru, Mark Cave-Ayland , agraf@suse.de, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Mark Cave-Ayland This is in preparation for adding configuration controlled via machine options. Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/ppc/mac.h | 11 +++++++++++ hw/ppc/mac_newworld.c | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/hw/ppc/mac.h b/hw/ppc/mac.h index 89fa8bbed7..8046cd8a2f 100644 --- a/hw/ppc/mac.h +++ b/hw/ppc/mac.h @@ -27,6 +27,7 @@ #define PPC_MAC_H #include "exec/memory.h" +#include "hw/boards.h" #include "hw/sysbus.h" #include "hw/ide/internal.h" #include "hw/input/adb.h" @@ -65,6 +66,16 @@ #define NEWWORLD_IDE1_IRQ 0xe #define NEWWORLD_IDE1_DMA_IRQ 0x3 +/* Core99 machine */ +#define TYPE_CORE99_MACHINE MACHINE_TYPE_NAME("mac99") +#define CORE99_MACHINE(obj) OBJECT_CHECK(Core99MachineState, (obj), \ + TYPE_CORE99_MACHINE) + +typedef struct Core99MachineState { + /*< private >*/ + MachineState parent; +} Core99MachineState; + /* MacIO */ #define TYPE_MACIO_IDE "macio-ide" #define MACIO_IDE(obj) OBJECT_CHECK(MACIOIDEState, (obj), TYPE_MACIO_IDE) diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 744acdfd2e..5331aa002c 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -515,10 +515,17 @@ static void core99_machine_class_init(ObjectClass *oc, void *data) #endif } +static void core99_instance_init(Object *obj) +{ + return; +} + static const TypeInfo core99_machine_info = { .name = MACHINE_TYPE_NAME("mac99"), .parent = TYPE_MACHINE, .class_init = core99_machine_class_init, + .instance_init = core99_instance_init, + .instance_size = sizeof(Core99MachineState) }; static void mac_machine_register_types(void)