Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp184266rdb; Tue, 31 Oct 2023 04:55:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEkJX1mr9pljj2a5tGOaCpNSgjPr2Jz3qfmAuM/lWQNAXnLzQuIYl0HNlDJmGliK7sZqeP2 X-Received: by 2002:a17:902:e88f:b0:1cc:5b5a:62a5 with SMTP id w15-20020a170902e88f00b001cc5b5a62a5mr4104186plg.9.1698753348705; Tue, 31 Oct 2023 04:55:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698753348; cv=none; d=google.com; s=arc-20160816; b=ancoahniB6SLOSr+FaC9QRX2AJMD96MbDnlkyI3FSe7wZ6+x93jUORSZboNzcf1WWM uujJB37LwJasqq9BzwqRW07ivekdbDdMLCRkWIgAcSCXu9lJ68Au+KqWxUGhszF3rYkb +H7Q8+70mofLVIOnx8TKL1yTLtvDhW1DTFx62vbXXS6pc0871ylsQD2wfNIV97mrH886 wxZ10/Bw+6Ch/Jz/SDN+2p45HpT/1rLyiPMkR+ZWBGuPHUJ6z1sPNWTc1seIZsIu1LKH +UC8Qk5MMKsYHRkkEKA8MFEvYfa1IR2OMlvTrsfJitO6nP/IWVMUnu3jS0O9Ms9gcY1g R/zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=lkTKsgEUV7yxE0M8vBXBvFfVWAQxTXpHOwuW1I1v1g4=; fh=ld3UXb1S5Y4IkunPfuj6e9Ppmc+fy6ncC+eQtrVLfK8=; b=gmphRAH2Syf08f0pyhdC4+4kCvOhHsiulUf9OrIalKoDABY3VEPMCPS1FjIqHgIrIL 5Hhfh4zX34h5valo+LCLCDI2/iqR5Xtq+wJmm+L1LmvGPGPJVj4ei+ecftsFjwcKTqG2 4I8z9qp48jN5S6ogflxXJNYu/3XjFIFPX49Hu6hk1EwxEZTimSeAiL1Dt6hOH/t2IphO NfOQ+ENuplQptsycYnpgBj+6VYI5nsT1aSw73XFuB05J34ouOMgDaTDEGO/kxFUFSU5z 124PzOOqDmkiRW9c4xjLVPS/qPdJqv8eVTVsCtJV2oKsaghkvpOJyfuMSEWMcCTUHa0Q iRJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id i13-20020a170902eb4d00b001c9f6df8a7csi915781pli.531.2023.10.31.04.55.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 04:55:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 728F180BEF22; Tue, 31 Oct 2023 04:55:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344137AbjJaLz2 (ORCPT + 99 others); Tue, 31 Oct 2023 07:55:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235726AbjJaLyt (ORCPT ); Tue, 31 Oct 2023 07:54:49 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DDC0101; Tue, 31 Oct 2023 04:54:47 -0700 (PDT) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id EEE2124E314; Tue, 31 Oct 2023 19:54:45 +0800 (CST) Received: from EXMBX171.cuchost.com (172.16.6.91) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 31 Oct 2023 19:54:46 +0800 Received: from ubuntu.localdomain (113.72.146.247) by EXMBX171.cuchost.com (172.16.6.91) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 31 Oct 2023 19:54:44 +0800 From: Minda Chen To: Conor Dooley , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , "Daire McNamara" , Emil Renner Berthing , Krzysztof Kozlowski CC: , , , , Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Mason Huo , Leyfoon Tan , Kevin Xie , Minda Chen Subject: [PATCH v10 15/20] PCI: microchip: Add event IRQ domain ops to struct plda_event Date: Tue, 31 Oct 2023 19:54:25 +0800 Message-ID: <20231031115430.113586-16-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231031115430.113586-1-minda.chen@starfivetech.com> References: <20231031115430.113586-1-minda.chen@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [113.72.146.247] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX171.cuchost.com (172.16.6.91) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 31 Oct 2023 04:55:45 -0700 (PDT) For lack of an MSI controller, The new added PCIe interrupts have to be added to global interrupt event field. PolarFire event domain ops can not be re-used. PLDA event domain ops instances will be implemented in later patch. Signed-off-by: Minda Chen Acked-by: Conor Dooley --- drivers/pci/controller/plda/pcie-microchip-host.c | 6 ++++-- drivers/pci/controller/plda/pcie-plda.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/plda/pcie-microchip-host.c b/drivers/pci/controller/plda/pcie-microchip-host.c index f5e7da242aec..e6dcc572b65b 100644 --- a/drivers/pci/controller/plda/pcie-microchip-host.c +++ b/drivers/pci/controller/plda/pcie-microchip-host.c @@ -821,13 +821,15 @@ static const struct plda_event_ops mc_event_ops = { }; static const struct plda_event mc_event = { + .domain_ops = &mc_event_domain_ops, .event_ops = &mc_event_ops, .request_event_irq = mc_request_event_irq, .intx_event = EVENT_LOCAL_PM_MSI_INT_INTX, .msi_event = EVENT_LOCAL_PM_MSI_INT_MSI, }; -static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port) +static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port, + const struct irq_domain_ops *ops) { struct device *dev = port->dev; struct device_node *node = dev->of_node; @@ -941,7 +943,7 @@ static int plda_init_interrupts(struct platform_device *pdev, return -EINVAL; } - ret = plda_pcie_init_irq_domains(port); + ret = plda_pcie_init_irq_domains(port, event->domain_ops); if (ret) { dev_err(dev, "failed creating IRQ domains\n"); return ret; diff --git a/drivers/pci/controller/plda/pcie-plda.h b/drivers/pci/controller/plda/pcie-plda.h index df1729095952..820ea16855b5 100644 --- a/drivers/pci/controller/plda/pcie-plda.h +++ b/drivers/pci/controller/plda/pcie-plda.h @@ -129,6 +129,7 @@ struct plda_pcie_rp { }; struct plda_event { + const struct irq_domain_ops *domain_ops; const struct plda_event_ops *event_ops; int (*request_event_irq)(struct plda_pcie_rp *pcie, int event_irq, int event); -- 2.17.1