Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4479217rdb; Fri, 15 Sep 2023 03:42:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHFrmkxEFUGeaXXLd8LZndXqY6Vhgg02+OegY8V9ecMkI4KgQHdQHH9oofAXdNUTV/FOVrX X-Received: by 2002:a05:6870:560a:b0:1d6:5561:ea7a with SMTP id m10-20020a056870560a00b001d65561ea7amr1482794oao.18.1694774524548; Fri, 15 Sep 2023 03:42:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694774524; cv=none; d=google.com; s=arc-20160816; b=SsGYGN8/k1Sr+T5h1yPnomdmf8fMrWExMypgCXxbnyjMKeRewfGECBhUZ+SyPXmLB5 j2DMWGnHMKFnLVdRznx/ieIU47vGZn3iM0PSGVMGCsgEsHml+hHbs2jm4R9DnMWghso3 oyaDRYZxC8y3SzTaz6+5m5Gi/ot9bsGhQ+2lXtumVtR8MS0+OPMXneoTopyYDs2nrwpz BmfuXHH7rdiDqPyitSzDv+OrMEXC7+M8GhOunkYaG0vlHpLC0QtIf9vy6NMnKFvaJnLw wta2w4wqTrKixzeUyIZAwZqBc82G3BnpipKSzpWgtzHPs7XKvp1q7QbYwTO/5Ozg5+Gg XJDQ== 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=lOU3lfmVbgPcpNMsb1f8uuE7+bd0Y9RJFlSTwzPAA08=; fh=y8d0C5dLtGb8zs8KQUIJy2R9+5DBPV29N8a8eZxYvuU=; b=b5TZkjs89zPybhV71ywi9RdxIqkSNoJcRXRDGTeu4B5HQrqcbWx+QfJsKZc1Psrod/ QnQUcO0BvtGf6s6upapGirnd7JAtcOgO2VWyM9AKQqoqpYFDwmOzHOOi3XNpSkdbubCq 0rrSmPD5uCekj1mqRxdKskNEvihapLc4zM7xGv02fGEk8j77M8+C/c+WmbcPxek6HsT/ M6+m7t1iIwjq0f+ssOr4t2i9oeojvJAQMA720MseSs9x0o0H/ZHGh3C+U1AYJc9tTOMK VATwQ/HGpShKRSk16oTWQmpyu6edqFYYl1udzLcY+f6qp8awIvC+W8dIcuCQafLvnPwI +PJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id t22-20020a63b256000000b0056944c06855si2994770pgo.88.2023.09.15.03.42.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 03:42:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 43BA28022C0E; Fri, 15 Sep 2023 03:23:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234477AbjIOKXf (ORCPT + 99 others); Fri, 15 Sep 2023 06:23:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234309AbjIOKXE (ORCPT ); Fri, 15 Sep 2023 06:23:04 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED19E1FE0; Fri, 15 Sep 2023 03:22:58 -0700 (PDT) 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 fd01.gateway.ufhost.com (Postfix) with ESMTP id 8CB1281BB; Fri, 15 Sep 2023 18:22:56 +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; Fri, 15 Sep 2023 18:22:56 +0800 Received: from ubuntu.localdomain (113.72.144.67) by EXMBX171.cuchost.com (172.16.6.91) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 15 Sep 2023 18:22:55 +0800 From: Minda Chen To: Daire McNamara , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Bjorn Helgaas , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Emil Renner Berthing CC: , , , , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Mason Huo , Leyfoon Tan , Kevin Xie , Minda Chen Subject: [PATCH v6 12/19] PCI: microchip: Add INTx and MSI event num to struct plda_event Date: Fri, 15 Sep 2023 18:22:36 +0800 Message-ID: <20230915102243.59775-13-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230915102243.59775-1-minda.chen@starfivetech.com> References: <20230915102243.59775-1-minda.chen@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [113.72.144.67] 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 pete.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 (pete.vger.email [0.0.0.0]); Fri, 15 Sep 2023 03:23:41 -0700 (PDT) The INTx and MSI interrupt event num is different in Microchip and StarFive platform. Signed-off-by: Minda Chen --- drivers/pci/controller/plda/pcie-microchip-host.c | 6 ++++-- drivers/pci/controller/plda/pcie-plda.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/plda/pcie-microchip-host.c b/drivers/pci/controller/plda/pcie-microchip-host.c index e3c7d5e66150..fb09b6c34e01 100644 --- a/drivers/pci/controller/plda/pcie-microchip-host.c +++ b/drivers/pci/controller/plda/pcie-microchip-host.c @@ -807,6 +807,8 @@ static int mc_request_event_irq(struct plda_pcie_rp *plda, int event_irq, static const struct plda_event mc_event = { .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) @@ -947,7 +949,7 @@ static int plda_init_interrupts(struct platform_device *pdev, } intx_irq = irq_create_mapping(port->event_domain, - EVENT_LOCAL_PM_MSI_INT_INTX); + event->intx_event); if (!intx_irq) { dev_err(dev, "failed to map INTx interrupt\n"); return -ENXIO; @@ -957,7 +959,7 @@ static int plda_init_interrupts(struct platform_device *pdev, irq_set_chained_handler_and_data(intx_irq, plda_handle_intx, port); msi_irq = irq_create_mapping(port->event_domain, - EVENT_LOCAL_PM_MSI_INT_MSI); + event->msi_event); if (!msi_irq) return -ENXIO; diff --git a/drivers/pci/controller/plda/pcie-plda.h b/drivers/pci/controller/plda/pcie-plda.h index 4e0712c9365e..af5e69718342 100644 --- a/drivers/pci/controller/plda/pcie-plda.h +++ b/drivers/pci/controller/plda/pcie-plda.h @@ -156,6 +156,8 @@ struct plda_pcie_rp { struct plda_event { int (*request_event_irq)(struct plda_pcie_rp *pcie, int event_irq, int event); + int intx_event; + int msi_event; }; irqreturn_t plda_event_handler(int irq, void *dev_id); -- 2.17.1