From patchwork Sun Mar 1 19:05:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 1247354 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; 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=ilande.co.uk Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Vt7G6mRtz9sSL for ; Mon, 2 Mar 2020 06:07:06 +1100 (AEDT) Received: from localhost ([::1]:51172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8Tvc-0002Nl-Te for incoming@patchwork.ozlabs.org; Sun, 01 Mar 2020 14:07:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41983) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8TuC-0000lp-1O for qemu-devel@nongnu.org; Sun, 01 Mar 2020 14:05:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8TuB-0001DW-1V for qemu-devel@nongnu.org; Sun, 01 Mar 2020 14:05:35 -0500 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:53064 helo=mail.default.ilande.uk0.bigv.io) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8TuA-0001DK-SJ for qemu-devel@nongnu.org; Sun, 01 Mar 2020 14:05:34 -0500 Received: from host86-135-55-139.range86-135.btcentralplus.com ([86.135.55.139] helo=kentang.home) by mail.default.ilande.uk0.bigv.io with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1j8TuP-0008Fy-1r; Sun, 01 Mar 2020 19:05:55 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, rth@twiddle.net, jsnow@redhat.com Date: Sun, 1 Mar 2020 19:05:19 +0000 Message-Id: <20200301190520.18520-2-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200301190520.18520-1-mark.cave-ayland@ilande.co.uk> References: <20200301190520.18520-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 86.135.55.139 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 1/2] dp264: use pci_create() to initialise the cmd646 device X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.uk0.bigv.io) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:41c9:1:41f::167 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Remove the call to pci_cmd646_ide_init() since global device init functions are deprecated in preference of using qdev directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- hw/alpha/dp264.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c index 8d71a30617..50e75aeee3 100644 --- a/hw/alpha/dp264.c +++ b/hw/alpha/dp264.c @@ -16,6 +16,7 @@ #include "sysemu/sysemu.h" #include "hw/rtc/mc146818rtc.h" #include "hw/ide.h" +#include "hw/ide/pci.h" #include "hw/timer/i8254.h" #include "hw/isa/superio.h" #include "hw/dma/i8257.h" @@ -100,9 +101,13 @@ static void clipper_init(MachineState *machine) /* IDE disk setup. */ { DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; + PCIDevice *pci_dev; + ide_drive_get(hd, ARRAY_SIZE(hd)); - pci_cmd646_ide_init(pci_bus, hd, 0); + pci_dev = pci_create(pci_bus, -1, "cmd646-ide"); + qdev_init_nofail(DEVICE(pci_dev)); + pci_ide_create_devs(pci_dev, hd); } /* Load PALcode. Given that this is not "real" cpu palcode,