Message ID | 20250120-scmi-fwdevlink-v2-1-3af2fa37dbac@nxp.com (mailing list archive) |
---|---|
State | New |
Headers | show
Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010046.outbound.protection.outlook.com [52.101.69.46]) (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 5D805145A18 for <imx@lists.linux.dev>; Mon, 20 Jan 2025 07:14:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737357276; cv=fail; b=bIG+zjJUPm2SV9AT7IXUM4ZB3h1NT/okivphykpEmvGXpHg3zYDo5ml+oOfdNfslXsnvCfHqjmIWLvqJXt3s2V8+kz+EBa5VlXZfx2FOEJi/zFqVmQIQUGwmT771BLoEpa17hgX9IU1or6QVB2IY7S0XZ1C0NdkiwRmciphg2Gc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737357276; c=relaxed/simple; bh=1KRQeOaY0NwsChU3zgWJrihWfOJfb3GZxCctaJQQjiA=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=L3QRyfCQ+RRgaEVfF778+6nrIUqqXRlpOfL0atJOeZWb/pFJIwgq6SWkLxCqaBIufK9tazdga22K1lynZVnGFLhq5u7QuzpWlkbrSLdM+XmESUPhunIuj3l7JtYmVxiU+BEu9mqWw1dFEXDgdHkyu+20yNjdtRTBVVjW8gxOSxM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=mtRUcaXs; arc=fail smtp.client-ip=52.101.69.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="mtRUcaXs" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KcKlGYpBVnwrbEOqQddcyWWESD1EpEpPOZYJQL+5aZfTw5EzcDOl7zL4aO9o4wo3QA5IHOqnYFdFhkOenPQuDQJk1TH3HkE6jUhpfPYXaZS+fb+avybi+S/4+6OsV8gEwEzog3cu7Ls5lqoN2fir7ZXcMKKyzQTUJkKrAW8Eyxe5GzlVXQF1Wf4jnMNQzh2+0yjGkWx0B82XZtmIQW++WJkwsWWXTg45yoH9OGyyam6w9gAXSQy73GlrBDNpsDUak12omubUXgU06qjpRPujr9OMYXBgfHG7lwYDaH7HpHRYmCE36FGlzB0LrTG4fLm6Cmg4KCKHxO36Exq2B6bhHA== 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=erx8eVIlp3RSDPcLYTeD6QYzg9uYKWXIG1suoWmMaWI=; b=SKSQ5m3KDF4ej6uLrMC7CvJglp14LVENg3P0R/fVcp8G7uLqrm44FTo9c5sGsCMWsRM2G3mgCa2AWby0KlzeafI2CvjTYRvn6kJ89D9rx0fbuQL3aQA8YHbAyzZvGigABRbye+jk16uxLaJjFdoIYTPSXMQws9ZNfQP+bP206/1CXFLArIOIsYSyd1i32Amt8/pQkvVI5FD51bZmeGZd/xCltxcmckAyCtAgw+0Rt72QEKj1BSug3gDErKzha5BmpOwF8gPkOG/1bS0XDFg0XFPlvcwpCNlLVRl8GTv0KKIsxteD5mjICJy9bQAO5oVcj3eIWPQmziUqQ24qpEwWNw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=erx8eVIlp3RSDPcLYTeD6QYzg9uYKWXIG1suoWmMaWI=; b=mtRUcaXs1Uj2BBDlIuVm+aJkDG2+pSTtajqihR5QXm63XA74uDYEhqO+XLQr+8k3mvjAt8CTYJjFW/i6AMpCAVb4NOySkzTy5kLKcAsQ5UPA/7nkn4QI5u0dOsUUTz+Z4z0Wo5gbWioGR2N2p9dvKTcHvbPU5wvdEHKmxVmuj26chbIBtdpPwRXgMVqL+hL7XhPwkiU2lpr/eknd8zQz9TwlsiHkk+Z8A39ZsQSBANTFb91LfG+di3ywGXOqLjP1dUugJW/jaLPGaBvF/C28wFCwdCDqTDiJOd8WJoTHgb9oJTO93em8gm9zjhY+PJ7zNNVnY9yG/g0YCN0UCbuafQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by AM8PR04MB7442.eurprd04.prod.outlook.com (2603:10a6:20b:1d8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.18; Mon, 20 Jan 2025 07:14:30 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%5]) with mapi id 15.20.8356.020; Mon, 20 Jan 2025 07:14:30 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> Date: Mon, 20 Jan 2025 15:13:29 +0800 Subject: [PATCH v2 1/4] firmware: arm_scmi: Bypass setting fwnode for scmi cpufreq Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250120-scmi-fwdevlink-v2-1-3af2fa37dbac@nxp.com> References: <20250120-scmi-fwdevlink-v2-0-3af2fa37dbac@nxp.com> In-Reply-To: <20250120-scmi-fwdevlink-v2-0-3af2fa37dbac@nxp.com> To: Sudeep Holla <sudeep.holla@arm.com>, Cristian Marussi <cristian.marussi@arm.com>, Saravana Kannan <saravanak@google.com>, Linus Walleij <linus.walleij@linaro.org>, Dong Aisheng <aisheng.dong@nxp.com>, Fabio Estevam <festevam@gmail.com>, Shawn Guo <shawnguo@kernel.org>, Jacky Bai <ping.bai@nxp.com>, Pengutronix Kernel Team <kernel@pengutronix.de>, Sascha Hauer <s.hauer@pengutronix.de> Cc: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, imx@lists.linux.dev, Peng Fan <peng.fan@nxp.com> X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737357232; l=2383; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=TTcs1ka8AGza401JDsGE2qHEBDq+jKflhkDqiuEGx+Q=; b=1btUXnBuoQIXcElwpFmt/LWfmSpOvjKwRqA7P4VwXaKv7QpbsJCY1xXjKxtfoMKw0L1xj9tGs rqA0MRmQE18A7oVFSZgfW07JGdpYijAMYCdc3US6Y819BxGd9RU9x+a X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR01CA0129.apcprd01.prod.exchangelabs.com (2603:1096:4:40::33) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: <imx.lists.linux.dev> List-Subscribe: <mailto:imx+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:imx+unsubscribe@lists.linux.dev> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|AM8PR04MB7442:EE_ X-MS-Office365-Filtering-Correlation-Id: 2886f9c7-c03d-4110-51dd-08dd392214f7 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016|7416014|52116014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?Byj0ipgfDkLPesimIZp+SyLFw/9hLnA?= =?utf-8?q?WFlYh/L0H2Z+X9nHDvX1cAP6rfvPsVsXE8IJqenUNN1wmjeHgvzDaz9EiEJhvOEOn?= =?utf-8?q?xx4BVoc54IegPzxxb00uhNy7PJNyxi2zYryRFk/IX1/ox03g1YwMzpUN5kdVWknTE?= =?utf-8?q?PtD6AMv1117+WZstoxHV921fF1rvZeB4x4kaqdesVbbyDpbHYAh4bDw45rXjqtqQg?= =?utf-8?q?IDdJRQLqrVCrLBK2rHYgYEUnVWQwEe8fFFjy07UbwbDlywKlDMo6cXIkLtxyFGokq?= =?utf-8?q?Zks7ec5HqYSXHbxr3AzUFT/tIrj9I5rt+C/+lrwtUdnqVBCMsVogbuUYvBRM4pLd7?= =?utf-8?q?twALEp4Vnt7QmoWP10NneZ5Q4v29Zs+GF6pfWr4gfrLx3lZdMULIhkycCHadasK1E?= =?utf-8?q?0Xi6HdFTVoF2gGwZ2oZRW5APzYmLjeRiL6XRjtScbiJPo9JHkvjloveKzobutvDrE?= =?utf-8?q?hIQtlJf9PeJfMK2+nWRUumCEzdTFU0y+jbQVtZ1DsdFSwPChB1xHW4hY0jLH3sayL?= =?utf-8?q?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?utf-8?q?JmCvI05dlIGymP5y2IsFBUHuxykWdpk9w=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016)(7416014)(52116014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?VfVUuKBuqwpxmcsVIUEqkaXe0GtD?= =?utf-8?q?vXJim6hL19mPy+elNcNczBm4f6IEy4WgfWdxVKj7Sip+gKrRH6aILMW/849g7myCc?= =?utf-8?q?voF4WLXtn4JpYe2sNuX+WtuGl5SSfJpR8okgh9qs5EzqgGIHf4yqxhy/PW3BIY7Qs?= =?utf-8?q?35zFQ5UWDxIkzGZZEvwglD4bEB05RffyWX0h985YQGW4AO4Tze1loK0HI7AEWx2jj?= =?utf-8?q?PejbI3TDDpuB7Q0v566ExxWBuES4S3RNlWNrfCntz8qMrUbe/YZXdFhy9ekjgxIde?= =?utf-8?q?22xY3+aJBjLFc1liCf6TiNXr/LKHyjo0hr+jqNA9EUwGqG0npZaP1pNkHnTuRwsza?= =?utf-8?q?OrWOvvNuUIPXzy+B0qMg1hCAg6j2+iJWuL7tpjvSxaGH4cAwCXokrOx069uIpla48?= =?utf-8?q?1HAR6V+kHxCqZi/pvcMKAXyW3dZIfljIkSYjFF1QP7D/F2yUSJP+viqkmSQmpLcDg?= =?utf-8?q?nSisxLrkYFAOQGD2v72hgyQ5yxOCWz4HxR7L4dBhsy+O6dmMEdqIJTLRFESqJcNBS?= =?utf-8?q?ZRH7EfAIeKDWCA7phQjhji6FS+QxSFIYYPTiWRQHJz+W22u5W6TOaqrNQyuWqk2Ma?= =?utf-8?q?Mt7YyC7Ym4fZgbAp2wkB559bj3XszuwYRcZBqD9S9EFQVPQQlWr266sEQWv5L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BxQmWz2W?= =?utf-8?q?6rddpyxCI7uZ?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2886f9c7-c03d-4110-51dd-08dd392214f7 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jan 2025 07:14:30.1672 (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: SZJWl8Y2QBWHsU/kTRaI83yyKJCEToKmC2v9xd08BH1L2FQ4MgBg3+NRHD0XcAMC8Ex195IYWjimiK2LfUqbKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7442 |
Series |
scmi: Bypass set fwnode and introduce allow/block list to address devlink issue
|
expand
|
diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c index 2c853c84b58f530898057e4ab274ba76070de05e..7850eb7710f499888d32aebf5d99df63db8bfa26 100644 --- a/drivers/firmware/arm_scmi/bus.c +++ b/drivers/firmware/arm_scmi/bus.c @@ -344,6 +344,21 @@ static void __scmi_device_destroy(struct scmi_device *scmi_dev) device_unregister(&scmi_dev->dev); } +static int +__scmi_device_set_node(struct scmi_device *scmi_dev, struct device_node *np, + int protocol, const char *name) +{ + /* cpufreq device does not need to be supplier from devlink perspective */ + if ((protocol == SCMI_PROTOCOL_PERF) && !strcmp(name, "cpufreq")) { + scmi_dev->dev.of_node = np; + return 0; + } + + device_set_node(&scmi_dev->dev, of_fwnode_handle(np)); + + return 0; +} + static struct scmi_device * __scmi_device_create(struct device_node *np, struct device *parent, int protocol, const char *name) @@ -396,7 +411,7 @@ __scmi_device_create(struct device_node *np, struct device *parent, scmi_dev->id = id; scmi_dev->protocol_id = protocol; scmi_dev->dev.parent = parent; - device_set_node(&scmi_dev->dev, of_fwnode_handle(np)); + __scmi_device_set_node(scmi_dev, np, protocol, name); scmi_dev->dev.bus = &scmi_bus_type; scmi_dev->dev.release = scmi_device_release; dev_set_name(&scmi_dev->dev, "scmi_dev.%d", id);