Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2535446rdb; Wed, 15 Nov 2023 03:50:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiC1ZZW0gc41YQ9umW53zk1BnjVHY0iZy8dSESulI5Pn+IwcgdmiH6iw9nslmApUYJBv8B X-Received: by 2002:a17:903:2101:b0:1cc:f60:28b2 with SMTP id o1-20020a170903210100b001cc0f6028b2mr4793321ple.6.1700049047146; Wed, 15 Nov 2023 03:50:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700049047; cv=none; d=google.com; s=arc-20160816; b=aWZJ/q+WatHvdGebvgGcyhJlpwvFx4IcvqMDxzJVxCSl7dsX6/KzP8Xnhf7E084tUb GRn7BaZSROyRs8foQ2+Kyzfq2GWcXD9KiWI/0BQDYjcBwGDivk9xHYmiu2pKsTGcMc2V 32sl3FbjLVHPDBDYo9j1vVI11D/qFe1j6fYQmPKrdNeo4n3exqi3cJlXuyPMNtuTHMo5 B/XmQ9n2R4OtTGdE81A/SK2GWmIM4nkbL8mXkVFLBGCTHziP7zrvj+cS2wGL5csyAWid 8UCfMaAkA/p350kL4BCvSmNJiVYwzFAsmV73aYSDOiRDqn+tppKuSjkBfqVFvtXzgxTi Lvsg== 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=7n0b4yZXTfGBRpewvqDIaz6B16WuBeaaREbUx1bHStU=; fh=ld3UXb1S5Y4IkunPfuj6e9Ppmc+fy6ncC+eQtrVLfK8=; b=QqpTJ2ZUZggJxOH6FXGPq5AoOw5cDxCvVFDs5ON+GLEWgGX5GWB31lKRt+mfXuD9C9 oB7B2WNUxxPOaHTGCn6g6JsXNdQqhH0Gil1rBzOslDIumCAzGlHzzZO+TrahUrNCCfJ4 mpt9yaKxroo2um9whEEpe6yPorFAAaNGtA9v0ZkOU15BKXDRVg3sFzEKu9QeMne2LFZM cwY3QFQXLWisnNJ8GQ4JXRvhC1VgWv65L6PcMkATje38u3Ap/Nyes8nYHJpKB9EZSjae DfdaALL4BPcyFcEAevAapiVw0gJsHYhJYstV+gpEA4ty0ndv1hOt40Jiq0hJBSVCUtHG 1lvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id iw15-20020a170903044f00b001cc3527145bsi9415473plb.29.2023.11.15.03.50.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 03:50:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id ACC628166887; Wed, 15 Nov 2023 03:50:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343702AbjKOLuY (ORCPT + 99 others); Wed, 15 Nov 2023 06:50:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343626AbjKOLtd (ORCPT ); Wed, 15 Nov 2023 06:49:33 -0500 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99CE2181; Wed, 15 Nov 2023 03:49:29 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 6389724E2DC; Wed, 15 Nov 2023 19:49:28 +0800 (CST) Received: from EXMBX171.cuchost.com (172.16.6.91) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 15 Nov 2023 19:49:28 +0800 Received: from ubuntu.localdomain (183.27.97.246) by EXMBX171.cuchost.com (172.16.6.91) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 15 Nov 2023 19:49:27 +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 v11 15/20] PCI: microchip: Add event IRQ domain ops to struct plda_event Date: Wed, 15 Nov 2023 19:49:07 +0800 Message-ID: <20231115114912.71448-16-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231115114912.71448-1-minda.chen@starfivetech.com> References: <20231115114912.71448-1-minda.chen@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [183.27.97.246] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX171.cuchost.com (172.16.6.91) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 15 Nov 2023 03:50:44 -0800 (PST) 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