From patchwork Tue Nov 26 07:56:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 13885542 Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011071.outbound.protection.outlook.com [52.101.70.71]) (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 86CAB1A0BEE; Tue, 26 Nov 2024 07:58:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.71 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732607889; cv=fail; b=dHMFKraZjHjbMbf//4dEAvc0SaM9CUwXvTvpAl/QIP+dMikY+J9NKsy22LhJez6gN8/vA9NACdLdLY1qXwLl4yrqIHl5gy1WRzen6HRonaG0YtHGs6pSZE6YcuHeHQt0YKK/nFYoGI3hrUOHHv+WgJxLYVZ+PMtH9PvezdmZRlQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732607889; c=relaxed/simple; bh=l8tipxD7st+Zs0loZ7tdbLnKwoAyA6ufTH6p6kLta1A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=nMOmtpdlub9z3gHvzmxYheckFS1wus916oldVd8PfFUY1YDJ6VC3MIraW2NgWCLCD2TPoFyK7HraYFx/ZzbZHQbEQAc2fVKdNVdshzPztS9ABDwVpdpOFn1tkF+8LL6rb9IeYO07G3ZEyQoYDh0ow3cHud1HK3ttZpgnJVsgU9E= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=JsgvSODt; arc=fail smtp.client-ip=52.101.70.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="JsgvSODt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DBh1mMwcBqxUKGkXHBLqN670O0KPK9+EUSjpO5xNlVaug1HFoJL3vWVuYE8WiO6fkYUicWcAhwf9ZIVHaQODvC0WGIghguozXIjRxOnGM9HBk17XtqPrVMEBvMGlm3ioegjFto1modXVwiwvJJorA+5qIBP1W+0RFFMra8l3PMEZ0+g9ISsGkBAzkeZKd3DbJqp/EHnPTXMPtFYHkBhhLZHpXDlZAYcQhqGx3Scvi/Ej2j3+Ps12PC8HPVJiOhO53K0SKtCi4zGq46O5496lD+HCOx42p3G/y6UorIltGa22G94FU4OHsQ5lf3TfDuRPkuB9CYCc3TDFWvnTkEggNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=7XGWJCWBN0jVvyzb9wrLpOIdgdDkrMn1+Do6+UNoBvU=; b=dimtL0Bi8i5Yoy4i6ayft9Fv7x+w4uWfC1d0JjSj+CEWZIXpMNhjDgJ1usoZ6jU4qTFfDj+eRn92eDg+ZMJ9uF+b94dtXEss6Sn/BrRDnrEW0/nkx0qynsL19BjNhfk8oh5yZyXqqh5m2y8oFCGl06+LeqMcO15uD/FuJQKmxfKQw0G+8lQM8GMBt8sJLneKsE+wNdNVDsYmXIxoyY3wDGVCOIAxaKTWbFU3FmBt/iX9qUmWyayVLTR/T5UGQSyhZkwnDEaUbcXHQnR5ZyJSLc+OTkZS61aXw+R9f1B9Ox/QwZHBZumvaXncQ6YQfZKEC6q7snE18lxbbl3pixG2/A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7XGWJCWBN0jVvyzb9wrLpOIdgdDkrMn1+Do6+UNoBvU=; b=JsgvSODtgKi9fZtxZSVxVEzmLlr4hR48rndqSH7F/1pVLxMXtKiHTUf1lCUBR935xBGckNd5tB8a+Y8A5Hmr3z9XRk8EbnekgGEFTKiq0Ai9h2NVyovlPvk1NgaG0lar2JwB6OoSapQax4lbivmD/Uw1eFW7GrvkMSOcXhE3mHkab/K2QrtsTarDLZDq000UB2gibYCmQczrVD07L0A5bOPQoeIPMx4DtBm9ilcBHbmq3BUSZDm9dVdRchcTrgCbKd9JF8E1Ao5w6W64S5Pqa+G3zu2rXrrDwpeqjsgw65iLUVYnHXoSUoK+gJzexdidytH29SMZcrvOVAq4R/4kHw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) by PAXPR04MB8489.eurprd04.prod.outlook.com (2603:10a6:102:1dd::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.20; Tue, 26 Nov 2024 07:58:04 +0000 Received: from AS8PR04MB8676.eurprd04.prod.outlook.com ([fe80::28b2:de72:ad25:5d93]) by AS8PR04MB8676.eurprd04.prod.outlook.com ([fe80::28b2:de72:ad25:5d93%4]) with mapi id 15.20.8182.019; Tue, 26 Nov 2024 07:58:03 +0000 From: Richard Zhu To: l.stach@pengutronix.de, bhelgaas@google.com, lpieralisi@kernel.org, kw@linux.com, manivannan.sadhasivam@linaro.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shawnguo@kernel.org, frank.li@nxp.com, s.hauer@pengutronix.de, festevam@gmail.com Cc: imx@lists.linux.dev, kernel@pengutronix.de, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Zhu , Frank Li Subject: [PATCH v7 04/10] PCI: imx6: Correct controller_id generation logic for i.MX7D Date: Tue, 26 Nov 2024 15:56:56 +0800 Message-Id: <20241126075702.4099164-5-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20241126075702.4099164-1-hongxing.zhu@nxp.com> References: <20241126075702.4099164-1-hongxing.zhu@nxp.com> X-ClientProxiedBy: SI1PR02CA0060.apcprd02.prod.outlook.com (2603:1096:4:1f5::17) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|PAXPR04MB8489:EE_ X-MS-Office365-Filtering-Correlation-Id: cbc5ddcc-e95e-409d-9a75-08dd0df00dc9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|1800799024|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: kua0A8k0kUhuoZH5eEan7w8F/m+6WSIjnHWWZRIzE0kgMFude8AWGv5NFKSqfcmenlYS5heqVGbaJEiQTRvUkk4p8fOhOIVhgEZAT7qZ1Gj/QJ9QoKTA1BeYhBjeWK0kT+zB6M1W233miZRKj6YT3d/ys+1fQCTevyE40HDZdMy5PriYzIDsT+Kc3SeOoxlx3TFvVFLUFO/v0quSG72BxAtnA4iLLrj89mKCTkjBW0mUSQuDIvlK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EIPTNBuCkS1+8otJdJNAWdKMBEdVaklVDQyulo84IqMZU7ZvmKbth1re4oVgBLxaKoezMhO+OQw+0Arr4YvRANObHbhMyt4NMiJczlaCOGU= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8676.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(7416014)(376014)(1800799024)(366016)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vwhzQgn9O44x3TrSKzgR/qMWa+chiM3U7ez4UzSe43+MLrbSOqsMbVX3iKxpmAjYvPsFQ/84WLbV/FYh7G6HAfUr2iCu7A18nwyFCLq4FiIklMI43ZcqbABUAx7eq0QPVYUJuDkjTK1o/YBN5zjRT0nplVkZ+KY43Y4EnYFUsRWqz/TM2YYgf7fXojZpMtLVkESOviEeAXAbt5QL0Hdv83PY6Nrkh3CMtL7jratTQ+S4CRr37cEOghc+cdFCEtJWn2qBkbJQyq/0vi3+bjkRmohYxyTrhtroHio5iqrouV9RkJ68HQbK3/XTwqeNc1ehtyLwR36jjSYXhststJaYLLf7W7L4wOaxFzVu4D6EenrPO2t5jYXuUC0yLgyVQnRy0qhh5SiZ6yEyBHHFoQ+mNnbHiDKkHC6I7zvJMlIlQQQZ1lIyHDnIqFABUf5e4/U9Q3ytcRL1GJyR4nFBmLz6nhJLVfRlcNgoTUbZOVX1OLPn8wd30gLA+Jz/sq1RtA8a1PBE/TzoJn1udHeJc4nqZj4am4Ukpnn7p0myk81L6kJGBV/0d3A/QhRA2Dxr7WISSUW/t84oZdHKHuzuaBMg3CmdHNK5XE23vW4v+WrY7H2+jcSsDgRoUo4aJdpTmDZCB/KvN0TOH7B3JQ2vBPUG6+VWB/rlfnRanpIUo7XUGkyXEpakDKJFgHTys/Yeemvgu4fp7Z126FnmFxdmr+hcCMOxQX2GR7i2IDQO/vQlrvTGMiiVEmR56IuryevcFzgqil/vGty8GmSKrLEqaymk1O9zrqujwE9zj0noyBeXmaQcqHU9d8hQ97TYW+/TCWTyFqR+rvnkIQiL0aFT93hu3XTt5ohm8F4UhTccX12L0u8eW2vqNPtMFaH16kPVPcpIt+wFefi8FWhxRoz6hyYnPedpcRq0tbOCMENm0f+KAWocXqJKNyaJPr8nZnqD026UInTgRLm9qL6tO1M8Rz5PnBUG8Q6VmaasJ1LPc4+64fwI6Q/f8e7rZvJeUcLEBPI1KQxzSB/DVLu3+4qPW/vP8cEdz4AAXlbu4jbTeXoo9LVt4L5vegPE60eDQ3SaLqSFzrZs+gA/3uV1dVXEnXDQVo5yp7EVuJmOUeFVJTp7fHOhdTFMwnoMWqbyH1pz+TDjfTn85rFAJzqfsLqhJDCO825kgUPf0smcAjbzoH3plhV/b3Z4ufRjyKFUCyt7JgF8Dwy/+5irWKz5CQqNDW9j6CEzS0SCeRH+YIpcULNXCjWpNknX+wILeMkKdl5abaxBM2SWE4F364Q1rcg3+e90LZl9+Dq5eufxRW0QTGZFjLZikUrNZNQUy8iQfasHDYPd/Whx3BGKTp58XS886nhFyxrVp78K/tZEYHDun09kOa3c9PVR/YOErh22n46rbMTfcNHUqAiP2Nxfal7t6N53Qi8LWZjU9McEyekA6WHS9gA9HJXHfpIbMZCmklVVAXwYPX9jXsA6t9KZ7gaJpYm7X9V1oOvu0/UffyFJfDd0k2BG+3gNhUJE3lsp5L4kW0RW4bpyqN/W7cLDUNnH51rC79tODQNmYWM4NGUNifi/yhLFFZzufQ5h0N8V5Nyu7eXu X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbc5ddcc-e95e-409d-9a75-08dd0df00dc9 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 07:58:03.5035 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1q7rC6o37J6RpUM8uCIgkymZzZDc4xn2ENNRh73Aoke2xhPIMx+SNeHEFAzB8HRBvnLq9wUWV/QjLDcAQzzfYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8489 i.MX7D only has one PCIe controller, so controller_id should always be 0. The previous code is incorrect although yielding the correct result. Fix by removing IMX7D from the switch case branch. Fixes: 2d8ed461dbc9 ("PCI: imx6: Add support for i.MX8MQ") Signed-off-by: Richard Zhu Reviewed-by: Manivannan Sadhasivam Reviewed-by: Frank Li --- drivers/pci/controller/dwc/pci-imx6.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 81f1f68ccc14..3538440601a7 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1367,7 +1367,6 @@ static int imx_pcie_probe(struct platform_device *pdev) switch (imx_pcie->drvdata->variant) { case IMX8MQ: case IMX8MQ_EP: - case IMX7D: if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR) imx_pcie->controller_id = 1; break;