From nobody Sat Jul 12 16:01:17 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1486015754187376.9279981394725; Wed, 1 Feb 2017 22:09:14 -0800 (PST) Received: from localhost ([::1]:54501 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZAa0-0001aY-9F for importer@patchew.org; Thu, 02 Feb 2017 01:09:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZ9js-0007Qj-HM for qemu-devel@nongnu.org; Thu, 02 Feb 2017 00:15:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZ9jn-0003mk-FC for qemu-devel@nongnu.org; Thu, 02 Feb 2017 00:15:20 -0500 Received: from ozlabs.org ([103.22.144.67]:54647) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cZ9jm-0003hx-T6; Thu, 02 Feb 2017 00:15:15 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3vDSqR01XYz9s7t; Thu, 2 Feb 2017 16:14:58 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1486012499; bh=Z5swEkY8jjHX3lnHfJa8m9x6E7q8Y/35yjYRpn/KgBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FxQbItINT4ochz5uLb4w3eEUP+N9/oj/8G97Cprs0jzKTP4KkwgyVOkIRZ+x4JS3v esC3ghqapTfUiqqWaPZy9nc3/WF5i4o8KbeSWRDf8KnCkIG2dDPRJ3V0r4i215ZPnd qS0MXwPiP3+7W6hnJpCBuLApPtgpFRKVgArON+V0= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 2 Feb 2017 16:13:41 +1100 Message-Id: <20170202051445.5735-44-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170202051445.5735-1-david@gibson.dropbear.id.au> References: <20170202051445.5735-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: 103.22.144.67 Subject: [Qemu-devel] [PULL 043/107] hw/ppc: QOM'ify e500.c 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: lvivier@redhat.com, thuth@redhat.com, xiaoqiang zhao , qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, agraf@suse.de, aik@ozlabs.ru, qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: xiaoqiang zhao Drop the old SysBus init function and use instance_init Signed-off-by: xiaoqiang zhao Signed-off-by: David Gibson --- hw/ppc/e500.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index cf8b122..792bd79 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -1049,27 +1049,18 @@ void ppce500_init(MachineState *machine, PPCE500Par= ams *params) boot_info->dt_size =3D dt_size; } =20 -static int e500_ccsr_initfn(SysBusDevice *dev) +static void e500_ccsr_initfn(Object *obj) { - PPCE500CCSRState *ccsr; - - ccsr =3D CCSR(dev); - memory_region_init(&ccsr->ccsr_space, OBJECT(ccsr), "e500-ccsr", + PPCE500CCSRState *ccsr =3D CCSR(obj); + memory_region_init(&ccsr->ccsr_space, obj, "e500-ccsr", MPC8544_CCSRBAR_SIZE); - return 0; -} - -static void e500_ccsr_class_init(ObjectClass *klass, void *data) -{ - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); - k->init =3D e500_ccsr_initfn; } =20 static const TypeInfo e500_ccsr_info =3D { .name =3D TYPE_CCSR, .parent =3D TYPE_SYS_BUS_DEVICE, .instance_size =3D sizeof(PPCE500CCSRState), - .class_init =3D e500_ccsr_class_init, + .instance_init =3D e500_ccsr_initfn, }; =20 static void e500_register_types(void) --=20 2.9.3