From patchwork Tue Mar 6 04:01:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 10260713 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F2AB460211 for ; Tue, 6 Mar 2018 04:21:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E342528D07 for ; Tue, 6 Mar 2018 04:21:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E211028E6D; Tue, 6 Mar 2018 04:21:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7872828F11 for ; Tue, 6 Mar 2018 04:21:30 +0000 (UTC) Received: from localhost ([::1]:52882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et46T-0002b9-KL for patchwork-qemu-devel@patchwork.kernel.org; Mon, 05 Mar 2018 23:21:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et3nz-0001YM-1v for qemu-devel@nongnu.org; Mon, 05 Mar 2018 23:02:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1et3nx-0004WM-PB for qemu-devel@nongnu.org; Mon, 05 Mar 2018 23:02:23 -0500 Received: from ozlabs.org ([2401:3900:2:1::2]:38943) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1et3nx-0004Uc-A7; Mon, 05 Mar 2018 23:02:21 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zwNQ917kLz9shX; Tue, 6 Mar 2018 15:02:03 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1520308929; bh=DSjkNPE9Ou9yURAt8xu6JHVvHagmKv5nIzszSPiNwhY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bpf7Vi1buIHLalNhp3VUhSeZkfTeNOyFhxs3L65kHijGARkFdQZupMefOrJF7avrG EVEyYWdpfKksp6Vd493ifQiaC8wmCkRxbX349Ah6g3/n0QoL+rcj2FCjIJGYCV7ihH hEMqaLht4brOQuVJrxfAwsaWrm3rl2Bezr//3uBY= From: David Gibson To: peter.maydell@linaro.org, groug@kaod.org Date: Tue, 6 Mar 2018 15:01:43 +1100 Message-Id: <20180306040154.3669-20-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180306040154.3669-1-david@gibson.dropbear.id.au> References: <20180306040154.3669-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 19/30] macio: move setting of CUDA timebase frequency to macio_common_realize() 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: surajjs@au1.ibm.com, Mark Cave-Ayland , qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Mark Cave-Ayland This removes the last of the functionality from macio_init() in preparation for its subsequent removal. Signed-off-by: Mark Cave-Ayland Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/misc/macio/macio.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index e5288f1084..f71ed61819 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -101,6 +101,8 @@ static void macio_common_realize(PCIDevice *d, Error **errp) memory_region_add_subregion(&s->bar, 0x08000, sysbus_mmio_get_region(sysbus_dev, 0)); + qdev_prop_set_uint64(DEVICE(&s->cuda), "timebase-frequency", + s->frequency); object_property_set_bool(OBJECT(&s->cuda), true, "realized", &err); if (err) { error_propagate(errp, err); @@ -444,12 +446,7 @@ type_init(macio_register_types) void macio_init(PCIDevice *d, MemoryRegion *pic_mem) { - MacIOState *macio_state = MACIO(d); - /* Note: this code is strongly inspirated from the corresponding code in PearPC */ - qdev_prop_set_uint64(DEVICE(&macio_state->cuda), "timebase-frequency", - macio_state->frequency); - qdev_init_nofail(DEVICE(d)); }