Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1568867rdb; Mon, 8 Jan 2024 03:41:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQdqijs8adyqLSPYsMGAW2q2so8SStzJEykrimS33joLpkhTTDQM5/8YSOItKhzvzBtSwG X-Received: by 2002:a17:906:61b:b0:a28:abfa:e405 with SMTP id s27-20020a170906061b00b00a28abfae405mr3291599ejb.58.1704714088057; Mon, 08 Jan 2024 03:41:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704714088; cv=pass; d=google.com; s=arc-20160816; b=tI97RafvgSl83i42BO1OSYISQZ1a6/LDQoqmpaicLhZKaN7OadzCGaEHV8NjZUaybz FqFxt5YzKTM5Wzt69Q0Tw9TqHqHqoks3bhNEQbAYtNB3vVevWbAazNQ8ZuoD6FGf3pt7 SGC54Htb/Pcl9FE6ePJ+4TlrvCtSTe/If4m9eXZix2+xRgn8Q2kAfqkkwJ/i+1+bhqAg 5a6ufY+awvZHoXJD4FpYnU7XndIIVO7UBs1EZMTfv0Wcms+2aeu8GPUvzYzKB8TWvJNd upADQKT+8X6l0oP63ih/+Vsxk7izgicwkK3JJkfdvKVDG41pN6LwLCi8Hbubkxe/MxUk Lfmg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from; bh=nkG8h4qt+ikCnMOfDNuKvK03jp9mjC84c+mENU+9eY0=; fh=2Bxzh03UCe+gGoy6PzJXhIx6NDrOamQNShtEzX+UDKU=; b=wvr4n2rNLLY/gpJ/btpopSWcK7vaN2Ap2c38k8V3Fwevvk6j1HDa1kLNuIrrFYUOqf JnmkELD+T2vhaMJ/PSxBDi0r4oSK8e6ucq0E9Y/w5nwNTwxh/CNiDw7/7TjV4sBslJ7W X0wPXj91oOHcZiyyKHuKmCeFs0JZ20Jflo+pQ7Ycejz8egoo3NBwMCElDxYKoLYOixKe LHeQVpy0a1DFomcmmodtxl9HS5jHMOBlUXNABG7Sa68ZnCvRPmyyTEvoexYqSHjTXByi WhaDRD/5jdce8WpK1Sieiz1VoJx2HiztVnqweC4H22dsqavk78218btBBPSbf8cQcBfH 1bkg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=starfivetech.com dkim=pass dkdomain=starfivetech.com dmarc=pass fromdomain=starfivetech.com); spf=pass (google.com: domain of linux-kernel+bounces-19449-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19449-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id yj4-20020a170907708400b00a29bec1ca8asi2329366ejb.296.2024.01.08.03.41.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 03:41:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19449-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=starfivetech.com dkim=pass dkdomain=starfivetech.com dmarc=pass fromdomain=starfivetech.com); spf=pass (google.com: domain of linux-kernel+bounces-19449-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19449-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9FD101F211D6 for ; Mon, 8 Jan 2024 11:41:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6279B21374; Mon, 8 Jan 2024 11:41:17 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from CHN02-BJS-obe.outbound.protection.partner.outlook.cn (mail-bjschn02on2062.outbound.protection.partner.outlook.cn [139.219.17.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 393E02575A; Mon, 8 Jan 2024 11:41:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PZEPKMo6gnsGBfIXXwHZOAR1FgavqhtO8x5OKmCK3LXfKvic4dCUv0C6mPZlmDf/jKF0P3BC+zt0y2FrrBRQmFGxonwlPe/16dTC7we6pFqP8uBvZT16yqo9iDmXMrgcRKskbzFQXdvW16YFrV5jCBcQmpOHkWbDDrezUc0KEkD8A6bq5jqOgb8V9ghaBHKZDRcgFRb5hUkgp/aYjl9YDLkLE+2/IwLn2iX126sOLcDE3v8y6XIm8hATMifj6siA9+si940Po54FVrxyQg0bCOcXnl0ep6A7PilmSNX+wx3r8QG3+rwgyIXW5t8+Z/HQUaNWLQUBEaKRpj89RrJjJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nkG8h4qt+ikCnMOfDNuKvK03jp9mjC84c+mENU+9eY0=; b=R4t5KlfvB22hH1J/QoCrx1Abb4s+cNZYRembb/a63sNmM6Q8WocNl4Jsb6+FQG2Mmnai5tPf9wgi6lXyJVWjBoZIVJg9LabSnQe7rR1GwFxAav7b6RbKZ1W1VT8EMIyBc9I4T2hlxPFg0HHqMn7pU80jQm120o3+7QFqSNPw7/2lYOwczWINi0PRrdwTe9x4Jmq4FXCaBOV2nboHxIMHXM7VnODNeah7sPFZ3IfrgkX4uiNMQZnKuwG/8ttWd0nChGXpYKh4ym2tfHSxIlPemqkArmOWscWjL7oX0AlzfDOeJ8VAsNirb/ReGrZhnJi+lWYXrjJbGG1Ljo6o0Fn/1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) by SHXPR01MB0797.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:26::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.32; Mon, 8 Jan 2024 11:06:48 +0000 Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::e6aa:baea:fd8c:4cd2]) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::e6aa:baea:fd8c:4cd2%7]) with mapi id 15.20.7135.032; Mon, 8 Jan 2024 11:06:48 +0000 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: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-pci@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Mason Huo , Leyfoon Tan , Kevin Xie , Minda Chen Subject: [PATCH v14 13/22] PCI: microchip: Add INTx and MSI event num to struct plda_event Date: Mon, 8 Jan 2024 19:06:03 +0800 Message-Id: <20240108110612.19048-14-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240108110612.19048-1-minda.chen@starfivetech.com> References: <20240108110612.19048-1-minda.chen@starfivetech.com> Content-Type: text/plain X-ClientProxiedBy: ZQ0PR01CA0014.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:5::19) To SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SHXPR01MB0863:EE_|SHXPR01MB0797:EE_ X-MS-Office365-Filtering-Correlation-Id: 7269e5c9-e233-40bd-ce10-08dc1039e86e X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AFncDXgSIhPMe+9mfYBofhNjpJwrumPujnht0XZjJyU6aOgZSawepop0Fa7dJApkQVmt/KxkthMwfxaMPk4yUHFJnItaj4ELhWuVWqOfc7+f6WoU7cUAiR2PBk/v/hYO+Tw6+IiQUH2iUn962/pn7ki0fzr6GdDjZd4oQ8TPY6vuUTJf3HUpEocxZpOgjuZHot7VhCQGkv928Zq0PWpG4WhFlrZ+dyk+wIrFF+WQvRGsUcKwinLm7Xo6z0Ot/kjK4E8ubc1//q9JYp6IqlpvW0sIlI22Xb3VN+laG22+CzB9Tg/dQtbE8uGFcM8h3I+Sm/F8mS3KSUZ3FW2jyfu1r2XXlTn8i5qqX/j/A7ecIMcy11b2UXISLXzx8dGYYfQcgFIq4uKp/48VRHHhoPwqPsRXpjLstUk8EpurKACZbbegC3usjhz37WrUnDpBsjkD5wPLKxBwhRsiXllw0D8wAY8HipgpsOzjs8F2pr+Q9yfGp/9WdL5vADDOdhFE4TboQd3gtbR6QIsvwNjkTMFBIyU/in+ZxrVOr8/ujME2Vq0xdFwesvgk18b580LpWI3o X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230031)(366004)(396003)(136003)(39830400003)(346002)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(8936002)(41320700001)(1076003)(107886003)(26005)(2616005)(83380400001)(44832011)(8676002)(4326008)(86362001)(52116002)(508600001)(66476007)(6666004)(66946007)(66556008)(54906003)(110136005)(40160700002)(38100700002)(38350700005)(2906002)(5660300002)(7416002)(40180700001)(41300700001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?lDELTZ3+VelIhNr7grYYxVwp2bUBxwpJ2rE/WkOhcuMmLH2K4lcOqBbSx/3z?= =?us-ascii?Q?LqAW8BNQV5UTcuVUivZQypLhqP5h2MZERIOcrzaEAgroEFO29q8BFnSBprP4?= =?us-ascii?Q?wzjBkOSSpeSUfQcbysSgl8fSv8kr5nBObYC6BCUCCKsu59UyzM+zw6k1jFnj?= =?us-ascii?Q?zQ7TKqHrVNymN6gAm5uLqdeuqZZB631+BNFpmJp5hUgICWjv7U3O/ejNiIbj?= =?us-ascii?Q?DF8biB79hjqYmlI/6cKt2rpLDz8g1qih55Gq8bQz7avalT0JsRe/2MXD+9Zp?= =?us-ascii?Q?/CrzvfSqZzJycoI7bI6msYJtwcFfjfKLSJn2DhWVN4xPk5RRZAe0kAot6zCQ?= =?us-ascii?Q?Tc34WtRjtmfJ4DZUJm7J4NxTJuNAiFaoMPBb8cxqdkROC+Xbcjqtxo0A9e+N?= =?us-ascii?Q?QKEilHL44eUAGUm/qKB/9o1RWlRHL0UxxBkWytZvQBmE3zp3C/SbF4oM4dzp?= =?us-ascii?Q?92efcCnVcZe1I1474TKktNvAy09GpVS7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ukXB1RFSdGszJORq696E9FM6Ni5MZ6HsiNCev1pO72gGxWhIj?= =?us-ascii?Q?UckWiGDzCMM9zKVmHa19uBBO1zFh6R88CMvbVWCu14yRk1fEEl/0tmUClJRP?= =?us-ascii?Q?Y0Iye+EslGy/hj0BnywcV4oZK9kT2QoFyFdnDEfzFc/zC/4ncpMsstO3+g7N?= =?us-ascii?Q?KlkmwosocF8+6wfS/a/P8pcB9jB5Vzl4npDRSXgDf9OAlkRZKAmVSiYy81VO?= =?us-ascii?Q?JA=3D=3D?= X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7269e5c9-e233-40bd-ce10-08dc1039e86e X-MS-Exchange-CrossTenant-AuthSource: SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2024 11:06:47.9513 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5Hg3acHJr0DoczAsZG2NqSsmutA8k90L5Ou8Un1gmktmcUl5WqiiXsMAgZDJZME+iZL1+n1vqfzs1VrjPfyWYuRZeEDUooEZ+wpEIfJVK0o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SHXPR01MB0797 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 bf5ce33ee275..8a51d3aa7e88 100644 --- a/drivers/pci/controller/plda/pcie-microchip-host.c +++ b/drivers/pci/controller/plda/pcie-microchip-host.c @@ -817,6 +817,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 16b81b23c213..0efe64d5f688 100644 --- a/drivers/pci/controller/plda/pcie-plda.h +++ b/drivers/pci/controller/plda/pcie-plda.h @@ -130,6 +130,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