From patchwork Mon Feb 20 09:13:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 655056 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp1294401wrc; Mon, 20 Feb 2023 01:23:46 -0800 (PST) X-Google-Smtp-Source: AK7set84i2AmqzGUR+X5xY8+0wvO8Jot8WjUJwY3D+11MK1DpETAW3SZrpv0GASCIc/gmf/HwlW1 X-Received: by 2002:a05:622a:1a89:b0:3b9:bc8c:c202 with SMTP id s9-20020a05622a1a8900b003b9bc8cc202mr909052qtc.13.1676885025802; Mon, 20 Feb 2023 01:23:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676885025; cv=none; d=google.com; s=arc-20160816; b=LiffM1Bey6jHOKZtXFD5blMs21z051eNg0XI5uHeEP3UTp+3n2XDhjAsoszejpVeH1 RV9Yr3Yi1ls0GXn8ArG/gtwhvxnC7aObg+JRzkhs0nVZdyurNJ8GtEVhRNmwssBidMZS HTMon4R6yuzvUgOQusfN3D59eDZ9NN1hb/HQw3VEtTu25Fm/geL4xsgAdPe9tMUshw3F doTfsYSl23fZNI9k4AjRKr/Sig1FfWykSkhlc9aJYuxQHo+ssL2RSGVlWLKFMR3cDg/s dSbPZVxRn5yhgVfUQnlE4izauJ7hyr8kWuq9Y42EEyifzNrAaSUsEJEK0BfxL6gjfwGb i2pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=E77XlEnytCyG4QoXBmNn9MQ2dbYmUXZ7dARQ+ik57vE=; b=EUi/VmLWkHSkoHXTwihAUfSOdUaJN05GoSKvK1D1xEf24+be72mDOngYQ1e/POfj3G uEjWIqraOHZpMjx/W5uiiUdh3M53GaoYM4md6+OqyIqWeU78CDTXYKOC0XtNF9sLTSni VO3bYc/EoRMj1Iy3q+/LZl5TEJVNSokVF3wOgG13C7qe3LglUZNMAReWlDxceVFnTeDM 2tlap2STq/JTEMj+iKFRwYi1fvDUj0THg/uZIrKSTVxfMTtFS98jAidKhwlJRGbYdKMZ PY0p3n7Oh75IsommgP/z/kBSypxqSCxH4tsDlWV1oer6M3cBEEKwJQEt//P7q6YzAlBc n65w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XCDUjcHu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a62-20020a379841000000b0073bb0dc724dsi6646045qke.466.2023.02.20.01.23.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2023 01:23:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XCDUjcHu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU2Fk-0005kr-CZ; Mon, 20 Feb 2023 04:14:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU2Fi-0005jR-3P for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:30 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pU2Ff-0003kI-GP for qemu-devel@nongnu.org; Mon, 20 Feb 2023 04:14:29 -0500 Received: by mail-wr1-x434.google.com with SMTP id c12so335618wrw.1 for ; Mon, 20 Feb 2023 01:14:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=E77XlEnytCyG4QoXBmNn9MQ2dbYmUXZ7dARQ+ik57vE=; b=XCDUjcHuEbgCSljkHsgBVm/zGTIHWv+GsfReiRoxG6rvFyhyPO083Lj0aEEvaLeBcA Xn9jtHnoqxEaN4H5qsKzqpS+oVWMfuxmL7b+jnhciZn7OQrPCFpQ5u1UfGsG26GGgCKS TQo2NrXbnSeS26JG5oTxfury4UNvl7tIU56ulgq3IUJ3uTbmSYOC85htlTYtub8ZdDuN 2TzVRNyIuyX5NKGILlPxJZoi85Mck7ETDYSIe4+VElDscQxV0G8tt/6nXIKBPiL9S9/x svJbnmJDU2CoSOkCwyCnvTNzzA6rW/W4TaGpSw0+i/YNlyppuevuAWMObVk517f1bzxd RV0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=E77XlEnytCyG4QoXBmNn9MQ2dbYmUXZ7dARQ+ik57vE=; b=s2sxemjZM4xP/xDQ3/uH0RZYbF5oN1qPX+6UffbyO6rkZrviUIsH9fi541VyHK0eJG K+DPqVPCwipDw0lU6LePVUJ+hhbI4el/TD3aWF9e8zyh4qnT340lFo/kgalOYSOqa4ey A1GV1aqOLYRtbQFfOsXkWtMqmd36iuxxq1jmdX7joqP47nAyiBL9kyrIYlhGM+uQhfnj mTbOA3GqMwBuSTAQ75d+f9nwhi697fvX6DH29RSAgXvXiHHEqV3dTNPlC3bkEdjSTcUz WTKlXu19q18JxyIjuSBObBUwW6HpVQOx6RbVnO1bcsiwISQD7hBtWsMm2m7LVd6zSeav McDg== X-Gm-Message-State: AO0yUKWveSY2HzfhJXBRYczR3vmLSa98YfyyNbmMRjsgYfJPDXqRy9HO ae22QkJkVphriN5t1TNDlm12iJKe9fvCzOVa X-Received: by 2002:a5d:66cf:0:b0:2c6:e824:7a5e with SMTP id k15-20020a5d66cf000000b002c6e8247a5emr2183303wrw.34.1676884466560; Mon, 20 Feb 2023 01:14:26 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t18-20020a5d42d2000000b002c6e84cadcbsm3269545wrr.72.2023.02.20.01.14.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 01:14:25 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, John Snow , qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Bernhard Beschow , Paolo Bonzini , Eduardo Habkost , "Michael S. Tsirkin" , Marcel Apfelbaum Subject: [PATCH v2 05/24] hw/ide/isa: Extract TYPE_ISA_IDE declarations to 'hw/ide/isa.h' Date: Mon, 20 Feb 2023 10:13:39 +0100 Message-Id: <20230220091358.17038-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230220091358.17038-1-philmd@linaro.org> References: <20230220091358.17038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org "hw/ide.h" is a mixed bag of lost IDE declarations. Extract isa_ide_init() and the TYPE_ISA_IDE QOM declarations to a new "hw/ide/isa.h" header. Message-Id: <20230215112712.23110-5-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Bernhard Beschow Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 1 + hw/ide/isa.c | 4 +--- include/hw/ide.h | 5 ----- include/hw/ide/isa.h | 20 ++++++++++++++++++++ 4 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 include/hw/ide/isa.h diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index df64dd8dcc..7085b4bc58 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -39,6 +39,7 @@ #include "hw/pci/pci_ids.h" #include "hw/usb.h" #include "net/net.h" +#include "hw/ide/isa.h" #include "hw/ide/pci.h" #include "hw/ide/piix.h" #include "hw/irq.h" diff --git a/hw/ide/isa.c b/hw/ide/isa.c index b434cbd0e9..5c3e83a0fc 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -31,15 +31,13 @@ #include "qemu/module.h" #include "sysemu/dma.h" +#include "hw/ide/isa.h" #include "hw/ide/internal.h" #include "qom/object.h" /***********************************************************/ /* ISA IDE definitions */ -#define TYPE_ISA_IDE "isa-ide" -OBJECT_DECLARE_SIMPLE_TYPE(ISAIDEState, ISA_IDE) - struct ISAIDEState { ISADevice parent_obj; diff --git a/include/hw/ide.h b/include/hw/ide.h index 09fe169ebb..24a7aa2925 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -1,13 +1,8 @@ #ifndef HW_IDE_H #define HW_IDE_H -#include "hw/isa/isa.h" #include "exec/memory.h" -/* ide-isa.c */ -ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, - DriveInfo *hd0, DriveInfo *hd1); - int ide_get_geometry(BusState *bus, int unit, int16_t *cyls, int8_t *heads, int8_t *secs); int ide_get_bios_chs_trans(BusState *bus, int unit); diff --git a/include/hw/ide/isa.h b/include/hw/ide/isa.h new file mode 100644 index 0000000000..1cd0ff1fa6 --- /dev/null +++ b/include/hw/ide/isa.h @@ -0,0 +1,20 @@ +/* + * QEMU IDE Emulation: ISA Bus support. + * + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2006 Openedhand Ltd. + * + * SPDX-License-Identifier: MIT + */ +#ifndef HW_IDE_ISA_H +#define HW_IDE_ISA_H + +#include "qom/object.h" + +#define TYPE_ISA_IDE "isa-ide" +OBJECT_DECLARE_SIMPLE_TYPE(ISAIDEState, ISA_IDE) + +ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, + DriveInfo *hd0, DriveInfo *hd1); + +#endif