Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2468236rdh; Wed, 27 Sep 2023 03:44:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGL9KCGuPZ1nEQP8xlxW0xdWl8apNvIYCmgXGE7KlpLOWvDubCg4lhoZxIcr0e14JneKYHh X-Received: by 2002:a17:902:7682:b0:1b8:2c6f:3248 with SMTP id m2-20020a170902768200b001b82c6f3248mr1356646pll.39.1695811456138; Wed, 27 Sep 2023 03:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695811456; cv=none; d=google.com; s=arc-20160816; b=nkd60cxocFJx+uYTekP8b1PiYi3No5weWhKs9KUzSaveaasxomQLmdRgn9pFcbHhMv tfbg0ELdprW2cmB9bSzMYOrkvbr6H61BGzogQVvEp8RlYVFxewR/NxNX3MRGgG3p3ign KPpx8TLwScNzEBQUYv0SIb8GaoHPPlbgrrw1g1nHaMYkBEux40SsmwXzzfDltFOO/HXj 5GQis74pQHG6lM6p3X9KlkoCOFzOkxdMb/tIVcLRzz28XYJWGodcYGMmGu0JGKPJqWxX JCT4r7HqviRTU7gVTcmXufdV1gVjcVzkafnKdCCiGFU2BUnRIAC5pm/iJ9vfj1kWh37k +tbw== 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=KH/9o+8UBz/NoIGu0llUr0msPOhSsaa+/ATeWBANkvM=; b=fISJKh1GUXGRYVos/Iwg+v7/ymjW7RzBZNRRWkqvR/+nAxQ17efc8HmrADhBBUlzMv jYt3nEwVkBvUOWnZT465zRvgPKNp/6tx32QXvSoezJjAfrfsLknf7f4cbCX7SG1AGWuS JK76zOPM6hm9svHSWDHEj09Dl6xTv+0zBGcjcDOOqSZVQJoTH0SyE5FGPrP7tHfr46b7 elUFDjZ/F008pTp/HM2DB72WZp4VAjLnO4t17ThykmQmn/DIOabuuZ7WbrRxEj0AyoU9 TD/aBnBxWYp5WJvfQ2IwM7xpizjP6ek3I8MdKRQqRG3ek1N1Y2KEpRxrL6pDdqWxKqnT AaEw== 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:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id j4-20020a170903028400b001b9736814b6si9982050plr.309.2023.09.27.03.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 03:44:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id EAC048042C20; Wed, 27 Sep 2023 03:09:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231370AbjI0KI7 (ORCPT + 99 others); Wed, 27 Sep 2023 06:08:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231196AbjI0KIT (ORCPT ); Wed, 27 Sep 2023 06:08:19 -0400 Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E8659F; Wed, 27 Sep 2023 03:08:18 -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 ex01.ufhost.com (Postfix) with ESMTP id 2C1AD24E2A4; Wed, 27 Sep 2023 18:08:17 +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, 27 Sep 2023 18:08:17 +0800 Received: from ubuntu.localdomain (113.72.144.128) by EXMBX171.cuchost.com (172.16.6.91) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 27 Sep 2023 18:08:16 +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: , , , , Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Mason Huo , Leyfoon Tan , Kevin Xie , Minda Chen Subject: [PATCH v7 12/19] PCI: microchip: Add INTx and MSI event num to struct plda_event Date: Wed, 27 Sep 2023 18:07:55 +0800 Message-ID: <20230927100802.46620-13-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230927100802.46620-1-minda.chen@starfivetech.com> References: <20230927100802.46620-1-minda.chen@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [113.72.144.128] 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=-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 morse.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 (morse.vger.email [0.0.0.0]); Wed, 27 Sep 2023 03:09:11 -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