From patchwork Fri Jan 13 15:45:29 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: 641991 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp284842pvb; Fri, 13 Jan 2023 08:04:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXt1klt2HgQYC58+msk21GQ9H87cExI/f5DRhPbfRcTiwJFHJJzzTXTH9N6C+DireDo93wd6 X-Received: by 2002:a05:6214:2f10:b0:534:97cb:af33 with SMTP id od16-20020a0562142f1000b0053497cbaf33mr2154423qvb.30.1673625842035; Fri, 13 Jan 2023 08:04:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673625842; cv=none; d=google.com; s=arc-20160816; b=hVJFWG7Gb4Y4SWqam91LZIP5QYSxNZojXK9LAX2NQTiUbLLK+0AKz2xSGSJfXjS53v UhDmEPc0ZugOD0CrLcx8OP5pdawTyxLHzikVtir1ThJr40KAYFY5KDE+k9dO5JYs4k14 Kdh/89CZlGu8uEyoHvoL6dZC/nnbgMib0xBocqwxAOwBX/vJfevk2L/KYjUH5bfOscSH foaTEB5ZoLGF0QQ9Twhj8mYcTPY59Qna5+pp9zc9W1frCzR9bqqpApnr9FW5Bsx8PiCm 88oixZsd9p8n4Vh9SIOe7tcmhVkvrbTaRFtwCteUJslYKe8+k1zJwLFI0mCiAUJ/jSb8 LXrg== 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=4/Z0sYNWQlA4hQRv8qfSQLZc2MSoaNRQN3fLqjXEQM8=; b=lFDHvWTaVXTItE/LCGHoALesIDFz2/QVKcf+u3Cg31pEB//caQxLsRWGnHbvfSMksM 1GL4ze/O22bERZUQznyIXKoKsavva3h9xfSEElSjUWXmSDQnB/xUX65jj4jXGRxzVlmn eIxnBDQ+3yaeB3ry357bf4fOauvX8soKzD1qLKamNqjGIRTWjqN5h/dIUWpAgy4DsNAV wfgXI8wKHOE2TaE+4b6pN9PPPHuFFba6stZk8ocnK8bkjWU9aTKs4B2/d3uiUwTLn4LO B2fPmfjhN+pQjJ7Xp57H/u4y9ex2XdUXcTcpqIhND0e1bNF7jB4J7vASM9930SMGJ+KE B9PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Miclu+NL; 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 ESMTP id ed3-20020ad44ea3000000b005346c6e83e7si2952473qvb.513.2023.01.13.08.04.01 for ; Fri, 13 Jan 2023 08:04:02 -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=Miclu+NL; 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 1pGMJ0-0003Ua-90; Fri, 13 Jan 2023 10:49:22 -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 1pGMIk-0003HC-Eo for qemu-devel@nongnu.org; Fri, 13 Jan 2023 10:49:06 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGMIi-0006US-4Z for qemu-devel@nongnu.org; Fri, 13 Jan 2023 10:49:06 -0500 Received: by mail-wr1-x42c.google.com with SMTP id q10so2142478wrs.2 for ; Fri, 13 Jan 2023 07:49:02 -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=4/Z0sYNWQlA4hQRv8qfSQLZc2MSoaNRQN3fLqjXEQM8=; b=Miclu+NL3wfxcpiG8jVEou8qFPjS3Vt9SE4o/1zbRppqmlOirFvh8T6ixDQHpyVy9O g9xOMHHaTSKupaysk5PZEzbZfU1cWr5I+ikdKzQjpdZqbGtuBwgsfva2rmQizsT3JqZu E5EqufKnj7du1BD8wnvtae1t3RWx7vw5JPiJFQNwO2nOjKh7CHZAvEOFqgRK7bsRZYZl auYU2KmZlbyKxW0hT6QvaSTCCl1Cqml3Vj3nX2pQtPWmp3pX1xoiBn4hkeK7U4jedXkC wecXKYj0rkRzJBeCxXmod/tP2Zv2C26PB5LTIdgyaPjr9QZmqN9jUsz36AuCDxt9qGpj nMjg== 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=4/Z0sYNWQlA4hQRv8qfSQLZc2MSoaNRQN3fLqjXEQM8=; b=q1C8tEXCCUr9dEDl/qDeB6Yg5EuxYRrHzeEWXr3hKN4w1VSLEGiCJP6oaDq+dksJO7 fhzsqsyU6hnHw5hX14706lh+skSOi7nKdHOMDCZbzjkrXkXuK3Itv9vwp4446j0zPCFB 6S6dTocMdctOY7cvS9SPjTgvHfEV44ImJHIllufMDxfUTFn+cDYVN6FsszJsbhxNjLGG CR0HWSnzF6JWXUW+Q5zTqm0Yhc12gWisFDD8PWM5cKSig9FhUhOyElwfMUtXKWlfgFXL vt67Idtwe8ZdqXcycR8Zn67tRTa4APjNAuWA+t+oHFIMdGGO5fmhfIZxJd6kWcIEeXyU TvEg== X-Gm-Message-State: AFqh2kpmUpByjU6ptvPxZSqgfqGJ93An0aPR78GbnFuWwoU8nKe6/jNB LUeZip8OC1N6qNtsSicwN4RGCd4M4UgU13AB X-Received: by 2002:adf:decc:0:b0:2bd:deaf:6a88 with SMTP id i12-20020adfdecc000000b002bddeaf6a88mr2288942wrn.17.1673624942300; Fri, 13 Jan 2023 07:49:02 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id q11-20020adff50b000000b0027f9f073211sm19488461wro.65.2023.01.13.07.49.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 13 Jan 2023 07:49:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 43/46] hw/pci-host/bonito: Declare TYPE_BONITO_PCI_HOST_BRIDGE in header Date: Fri, 13 Jan 2023 16:45:29 +0100 Message-Id: <20230113154532.49979-44-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230113154532.49979-1-philmd@linaro.org> References: <20230113154532.49979-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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=ham 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 Declare the TYPE_BONITO_PCI_HOST_BRIDGE QOM type in a header to be able to access it from board code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230105130710.49264-8-philmd@linaro.org> --- MAINTAINERS | 1 + hw/pci-host/bonito.c | 4 +--- include/hw/pci-host/bonito.h | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 include/hw/pci-host/bonito.h diff --git a/MAINTAINERS b/MAINTAINERS index a670fbc926..f7f5e9e439 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1262,6 +1262,7 @@ F: hw/isa/vt82c686.c F: hw/pci-host/bonito.c F: hw/usb/vt82c686-uhci-pci.c F: include/hw/isa/vt82c686.h +F: include/hw/pci-host/bonito.h F: tests/avocado/machine_mips_fuloong2e.py Loongson-3 virtual platforms diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 9c26aa2ad9..ac1eebf9de 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -45,6 +45,7 @@ #include "hw/pci/pci_device.h" #include "hw/irq.h" #include "hw/mips/mips.h" +#include "hw/pci-host/bonito.h" #include "hw/pci/pci_host.h" #include "migration/vmstate.h" #include "sysemu/runstate.h" @@ -238,9 +239,6 @@ struct BonitoState { MemoryRegion pci_mem; }; -#define TYPE_BONITO_PCI_HOST_BRIDGE "Bonito-pcihost" -OBJECT_DECLARE_SIMPLE_TYPE(BonitoState, BONITO_PCI_HOST_BRIDGE) - #define TYPE_PCI_BONITO "Bonito" OBJECT_DECLARE_SIMPLE_TYPE(PCIBonitoState, PCI_BONITO) diff --git a/include/hw/pci-host/bonito.h b/include/hw/pci-host/bonito.h new file mode 100644 index 0000000000..b8ecf7870a --- /dev/null +++ b/include/hw/pci-host/bonito.h @@ -0,0 +1,18 @@ +/* + * QEMU Bonito64 north bridge support + * + * Copyright (c) 2008 yajin (yajin@vm-kernel.org) + * Copyright (c) 2010 Huacai Chen (zltjiangshi@gmail.com) + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef HW_PCI_HOST_BONITO_H +#define HW_PCI_HOST_BONITO_H + +#include "qom/object.h" + +#define TYPE_BONITO_PCI_HOST_BRIDGE "Bonito-pcihost" +OBJECT_DECLARE_SIMPLE_TYPE(BonitoState, BONITO_PCI_HOST_BRIDGE) + +#endif