Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp927379rdb; Fri, 20 Oct 2023 03:46:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHD7Fwx9p/+zRI/fo5XVx7LVMoi7Wjnz6ZHKi2fx8bpesYnqbyLRPOGCbTH1l4Io/0IhNtM X-Received: by 2002:a17:90a:b309:b0:27d:1972:136c with SMTP id d9-20020a17090ab30900b0027d1972136cmr1572240pjr.38.1697798788046; Fri, 20 Oct 2023 03:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697798788; cv=none; d=google.com; s=arc-20160816; b=oQiQHz3q2cBucvJvxhtuP0/q6U8uH/4BDhITWiKY2yhxOBMCQ+UJoEBeQwdeNi90qV QO+J6bgkOM2Aa51FcZigIp9m1yjGVAyNbOx1dpaBsUWXbBHTCW1e7NJYIeZuUCIb5g2u u9UpihGsiF6mUyyIIy05SsoIx+RjWrhqD5mfEgFjPCYdFY7zVOhWcdOijlksE0iW4zTz gBoK3yzRGGBrzpI+0JV+bL9qN2aeFpY/FpU73DCiCeadh9dFqkqJlvWoVVUoNU+K0yo5 AH/wgUzfODZcgLmysX4lNZNayEXmFBdDjrjockFUMb7AxDOeAuW4uBBLrgW+0F2sfQbd fTqw== 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=W5Gx9b4vDhRsyrxh8GhfZWV2JU2KVLh9qX55Vgk0d1U=; fh=ld3UXb1S5Y4IkunPfuj6e9Ppmc+fy6ncC+eQtrVLfK8=; b=1JIDzGJ+pV1y1sCq5G9KyNazQLNFqfE7PaSNbtmQwOfoCEBSLd7ToEopWaO8ZPHX0m Vy5VuKvYeCOdlCGEjE9hjI/CMk+GV9JOxZVogdG/R52yxL5R8TOswiTW1UBEcVk8Ekn1 ptYJflxLTU6Bcwb7YjVuye3vbCsUTDpEpAbAWcFyKpERh50ArzFqt7IjMbFr/I/LUcIc FR2ZGU3nxFFG4/U9A9rIMpzwHKdkakkZRRINvaWPGn3t8JC3CtrBLBTpJL4OyrNkVAGC 43ljWB4qmBStK3F2rA9C9UMGaZ1mHXD+O+qdqwURkjVyMWjyCyaUqekmQLMGYnmsuZEA V8Xg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id x2-20020a17090a6c0200b002790e0af4aasi1613353pjj.174.2023.10.20.03.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 03:46:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id B5D9B8348D97; Fri, 20 Oct 2023 03:46:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377140AbjJTKom (ORCPT + 99 others); Fri, 20 Oct 2023 06:44:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377075AbjJTKn7 (ORCPT ); Fri, 20 Oct 2023 06:43:59 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1347114; Fri, 20 Oct 2023 03:43:56 -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 C624D24E374; Fri, 20 Oct 2023 18:43:55 +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; Fri, 20 Oct 2023 18:43:56 +0800 Received: from ubuntu.localdomain (183.27.99.123) by EXMBX171.cuchost.com (172.16.6.91) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 20 Oct 2023 18:43:54 +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 v9 15/20] PCI: microchip: Add event IRQ domain ops to struct plda_event Date: Fri, 20 Oct 2023 18:43:36 +0800 Message-ID: <20231020104341.63157-16-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231020104341.63157-1-minda.chen@starfivetech.com> References: <20231020104341.63157-1-minda.chen@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [183.27.99.123] 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Fri, 20 Oct 2023 03:46:15 -0700 (PDT) For PLDA lack of an MSI controller, The new added PCIe interrupts can not be added to MSI.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 | 9 ++++++--- drivers/pci/controller/plda/pcie-plda.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/plda/pcie-microchip-host.c b/drivers/pci/controller/plda/pcie-microchip-host.c index 5a8c134bf643..4765a596a517 100644 --- a/drivers/pci/controller/plda/pcie-microchip-host.c +++ b/drivers/pci/controller/plda/pcie-microchip-host.c @@ -816,13 +816,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; @@ -836,7 +838,8 @@ static int plda_pcie_init_irq_domains(struct plda_pcie_rp *port) } port->event_domain = irq_domain_add_linear(pcie_intc_node, port->num_events, - &mc_event_domain_ops, port); + ops, port); + if (!port->event_domain) { dev_err(dev, "failed to get event domain\n"); of_node_put(pcie_intc_node); @@ -935,7 +938,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