Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp184470rdb; Tue, 31 Oct 2023 04:56:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFwuznlseQAAIIVEm91jgUsqMa5Jrc4esOqsmYDFeoqnja+BeGev9dNOVC7vwj/rtcCccTp X-Received: by 2002:a05:6a20:e686:b0:17b:4f43:afe1 with SMTP id mz6-20020a056a20e68600b0017b4f43afe1mr9646708pzb.55.1698753377097; Tue, 31 Oct 2023 04:56:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698753377; cv=none; d=google.com; s=arc-20160816; b=J1xbJr5p4+38gcjmZeKTuEdEE0zfRL+NHebRU6uDrOxbHKhFziKGwCuruCk3Qln+Ea eKYa+axOIj1MZvFQpXrAhX9X8D2F16J3c+73LThQHNOYHZFOjCX8/TT1xImW5q9fTtqT lITo8INErG7fxZ51q/WZF/7KTHLOgzPGo/4uQvGBxRkbTW9p17K2w2KqerdJGpzHz1Z7 PKasuxPI5ThMKX0h4sRM+4zNiVOyasNI23c7oHYMdcWgJjrYis5ikvY7TtZ2/xmWMEII mW//as7t5kfS8WKKumalU6hoFqtABAqDqIMq0mS6VzGkzEtHJOE0NKLbbTYLYDbROFcp dIwQ== 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=4E7jLlyNWDykg4K0Hs29SedYGWNS9nQGvx9EcIrgOUQ=; fh=ld3UXb1S5Y4IkunPfuj6e9Ppmc+fy6ncC+eQtrVLfK8=; b=QstdsFbNtH4+e3pgHgh2FnSXIU0V7SOZGUH6kEowNU/ZlhY85PFyYNlTAkkTcd0Wyj E0lpW3wM5N5WjBksvdsV6Lx6+YvasmEi0fSjNDkQ3WewW0ueJpMN0M3CRFvD+FtDbsIe ubEW3VQGiKYi6RadMpfZV34dmfqVBuRnsrPqixsuaFRbwTqjYffVR11hkJbJ9WjvkbuA LsMYexBqvzxLs4tyzxoxraIxPtPYpAeGTyXO+re0nPq97N7OtCiy6oMFCFq446QYUOQT 6KeVOKY3MC0/e6UP9tOtR/dHJDav290AbD2dWwV7FxxzjtXqy+iDMf5nEXx1Hr3KGsVK TEbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id a12-20020a63e84c000000b005ab1fd6fbc1si910323pgk.847.2023.10.31.04.56.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 04:56:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 2D6ED802FA24; Tue, 31 Oct 2023 04:56:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344163AbjJaLzY (ORCPT + 99 others); Tue, 31 Oct 2023 07:55:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344068AbjJaLys (ORCPT ); Tue, 31 Oct 2023 07:54:48 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7D4797; Tue, 31 Oct 2023 04:54:45 -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 fd01.gateway.ufhost.com (Postfix) with ESMTP id 4B57B8139; Tue, 31 Oct 2023 19:54:44 +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:44 +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:43 +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 13/20] PCI: microchip: Add INTx and MSI event num to struct plda_event Date: Tue, 31 Oct 2023 19:54:23 +0800 Message-ID: <20231031115430.113586-14-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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 31 Oct 2023 04:56:01 -0700 (PDT) The INTx and MSI interrupt event num is different in Microchip and StarFive platform. 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 | 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 f89d102f4979..2c03b0354f15 100644 --- a/drivers/pci/controller/plda/pcie-microchip-host.c +++ b/drivers/pci/controller/plda/pcie-microchip-host.c @@ -818,6 +818,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) @@ -960,7 +962,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; @@ -970,7 +972,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 28ed1374e1de..fba7343f9a96 100644 --- a/drivers/pci/controller/plda/pcie-plda.h +++ b/drivers/pci/controller/plda/pcie-plda.h @@ -124,6 +124,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; }; void plda_pcie_setup_window(void __iomem *bridge_base_addr, u32 index, -- 2.17.1