From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=148.163.150.75 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796220259; b=knxKqk3UBBF3KfJYOWdU1iNpIHIh65RhYkAtLw2O+c51cl9ttjKEW4rOZWz8RFGn6NT7 DzLXFBSjakzgYV8sOXwZTaVgc52EB4HYLWAbpumEbwh1xNAnelrqrDZztyVTvhZBV+AIY bFRvcLUco/O0gMLtajeBApVWVnutTh44PghjlLaprmXAv37TqDLzW0OCEDvTeGga+8sJt 0gy4eo2pfXnBmez6wxpm9SKKTjroVPU59x5e7sWfyJomQ4mlvR7yFmNFX4yvBj9UUHuK6 Jzal0kMXV5OeKxzGDfToBe0Y3wPKhjXmTQV5TNkbR70HRK7SgoOVpDkY3aTwfYZTcIQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796220259; h=DMARC-Filter:Received:DKIM-Signature:Received:DKIM-Signature: Received:Received:X-MS-Exchange-Authentication-Results:Received-SPF: Received:Received:Received:Received:Received:Message-ID:Date: MIME-Version:User-Agent:Subject:To:CC:References:Content-Language: From:In-Reply-To:Content-Type:Content-Transfer-Encoding: X-EOPAttributedMessage:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-Exchange-RoutingPolicyChecked: X-OriginatorOrg:X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-Id: X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-Transport-CrossTenantHeadersStamped: X-Proofpoint-Spam-Details-Enc:X-Authority-Analysis: X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID:X-Proofpoint-Spam-Info: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=CzuyVB/zqbpBo3jphvx+fB0hafvA91DK2fKZUewGoYU=; b=JDieUYPx85YMK5FpDu7nE8GP6mlBqn/grrgB+5SFgnYsZpL4PIJPiobEiC/BP8yAmYl3 NSi2SMKvTDrIkLgDBx6aiSRFgezwnRzp1BxehPWwdMWFq5QV8hN/TWvtntc/po1Zbayip xpQ5epaESK9GZe95YYMy8WSKPcBVTg3swMOf+M5lkiU8zPQHIQSq+d/+XZxtq+GzVtFMj 9xxaikq9y/UiU3WZspP9uOr9/4A//BSrpV9zh3iJkj33g2gH1IdZ2F2/Cvp2gFXm6r6uT 4VBrVjAbdmwGY6Nif78m0KPnbazowGrmFyaxgckJTQATYEAu/LzYl43YplnzWyb/WAg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=proofpoint-05-2026 header.b=QAIYtQv2; dkim=pass header.d=ticloud.onmicrosoft.com header.i=@ticloud.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-ticloud-onmicrosoft-com header.b=SxEMnFDA; arc=pass header.oldest-pass=0 smtp.remote-ip=148.163.150.75 Received: from mx0a-0002e601.pphosted.com (mx0a-0002e601.pphosted.com [148.163.150.75]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D1B8606A31A for ; Wed, 2 Dec 2026 14:04:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7D1B8606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=proofpoint-05-2026 header.b=QAIYtQv2; dkim=pass (1024-bit key) header.d=ticloud.onmicrosoft.com header.i=@ticloud.onmicrosoft.com header.a=rsa-sha256 header.s=selector1-ticloud-onmicrosoft-com header.b=SxEMnFDA Received: from pps.filterd (m0380145.ppops.net [127.0.0.1]) by m0380145.ppops.net (8.18.1.11/8.18.1.11) with ESMTP id 6B2DuvAe3256438; Wed, 2 Dec 2026 08:04:07 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= proofpoint-05-2026; bh=CzuyVB/zqbpBo3jphvx+fB0hafvA91DK2fKZUewGo YU=; b=QAIYtQv2sFFrhFXA/qi/bd19WwVwPdrsE/5DSLzbhKQXqYtra5Yy0vDuQ wyAhQNKV4tvXaqg/6PVdRwngPh0TlYlPKojBZ2LZqcRWUvYVahfxBteTwN+07EJZ Z5hexWwlKjsgOJ+Q9B98RMu081rRPRgvIFEmwzIFjFibf9e/mU18Nqae/R2Jsc/1 fuatZ0/c6zDaIKyaYOLcMp+QOuI6/l9ParuRlqGOEj2FTZ9m1T3fSWnBE5OLaLij NwjadX5gavKl5WW0HpGFJ5UWxre2JER24Hw9gTfd+NaERYvloXiZZxexkKO4mw5D Ov1z22sUttjRsVtUVIHsfaxNFgJew== Received: from mw6pr02cu001.outbound.protection.outlook.com (mail-westus2azon11012009.outbound.protection.outlook.com [52.101.48.9]) by m0380145.ppops.net (PPS) with ESMTPS id 4ja9adumbs-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 02 Dec 2026 08:04:07 -0600 (CST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gcfjrDmo68ESA3E2Xkjx59s6ZNAKl1zJPM5wRnCuU4tykwFXm5o2cxFNW+HUofZZkbkBHyJvEOjxlQzRKCQObEyMcNuHPbZyztmokMYZ0Yk86jTtMoZ8DBeh1hkSgq7aZyBZqxRNKvxHp/5ezHE759dJUUUh2RaO9H6rJou1C4+Dx9W46l1AmBfG0rbXtUIDQv109ZJghwdHcnzg+zlKWapCjm5v1F1iOU9/mLkqnUvFPOLx1aAc2/OPRa8byaIMq81v/pj+rUCQxpy2RzmaXOGrsrwAh4ID8TMfjc31vPPkfoOWiXCJe23OxJinjz4FEvOhCD5n1JuZLazO3cv2Sw== 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=CzuyVB/zqbpBo3jphvx+fB0hafvA91DK2fKZUewGoYU=; b=xfjxmuhcdfJc5p2/KzzVWUNyEBsw13NJOy7AWG5AFlIcZN7KmmPIEZ0wTucQWxCaTS043er2NHZbfkF5wgtCBZgjhnk2UbLb/Kjp/PgZOBqq8CcE57tR3Uxp5zrxBmH9SGAwafz0AVTWHWEZ8V8aO987vUGWQ+YC1F1ocN8Y1UOt4q+8m7RQwx1bwEJooQr6pf6NFTpljD4He2ImPuHDYC2+asHEmSxo665rsVmNOGNmR1sSjTbW29nKoCtaTTM0pOAxzBuB82AwSSDWM9mm6vTk9h1dQgkPPsJf+QkNuVN8Q0XqzDmY1+1/FxFaZDUcEMQM37JFxnjx1YrraHbp4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.21.194) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ticloud.onmicrosoft.com; s=selector1-ticloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CzuyVB/zqbpBo3jphvx+fB0hafvA91DK2fKZUewGoYU=; b=SxEMnFDA72aRVKz5nJ6ZgXQ7sUP9zKdvqgQGp9bBgSbYnBlFb92i3N0QmrlI49G5w5AfrvvnXojtpy+dnr0E8WIb0OHxuYHYqXb05FmelqLqTVGTeno0M82AoD30OLq/YVp3QM/HeszBtbLqBtWUEfSst0KUCtMPXwGxmnIWDn8= Received: from BLAPR03CA0155.namprd03.prod.outlook.com (2603:10b6:208:32f::13) by MN2PR10MB4350.namprd10.prod.outlook.com (2603:10b6:208:1da::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.13; Wed, 2 Dec 2026 14:04:04 +0000 Received: from BN2PEPF0000A992.namprd04.prod.outlook.com (2603:10b6:208:32f:cafe::6e) by BLAPR03CA0155.outlook.office365.com (2603:10b6:208:32f::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.10 via Frontend Transport; Wed, 2 Dec 2026 14:04:04 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 198.47.21.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.21.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.21.194; helo=flwvzet200.ext.ti.com; pr=C Received: from flwvzet200.ext.ti.com (198.47.21.194) by BN2PEPF0000A992.mail.protection.outlook.com (10.167.248.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.5 via Frontend Transport; Wed, 2 Dec 2026 14:04:03 +0000 Received: from DFLE206.ent.ti.com (10.64.6.64) by flwvzet200.ext.ti.com (10.248.192.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Wed, 2 Dec 2026 08:03:02 -0600 Received: from DFLE215.ent.ti.com (10.64.6.73) by DFLE206.ent.ti.com (10.64.6.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Wed, 2 Dec 2026 08:03:02 -0600 Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DFLE215.ent.ti.com (10.64.6.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45 via Frontend Transport; Wed, 2 Dec 2026 08:03:02 -0600 Received: from [10.24.50.209] (uda0490799.dhcp.ti.com [10.24.50.209]) by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 6B2E2wWB1536630; Wed, 2 Dec 2026 08:02:59 -0600 Message-ID: <7fc623bb-8c16-4b3f-be7b-d4cbfdad64f4@ti.com> Date: Wed, 2 Dec 2026 19:32:58 +0530 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 19/22] firmware: ti: ti_sci_clock: Move clock ops into its own file To: Beleswar Padhi , , , , , , CC: , , Praneeth Bajjuri References: <20261029181147.266771-1-b-padhi@ti.com> <20261029181147.266771-20-b-padhi@ti.com> Content-Language: en-US From: Sebin Francis In-Reply-To: <20261029181147.266771-20-b-padhi@ti.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF0000A992:EE_|MN2PR10MB4350:EE_ X-MS-Office365-Filtering-Correlation-Id: 065cbf03-4c75-40ec-c24a-08df507d1f35 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|23010399003|36860700016|82310400026|376014|56012099006|10067099003|261022113327099003|261026140227099003|261026121527099003|261028144727099003|261021121427099003|261021123027099003|261102123227099003|261022105027099003|261009223027099003|261009221227099003|18002099003|22082099003|4143699003|6133799003|3023799007; X-Microsoft-Antispam-Message-Info: /nL7HRoFv2jmYY5VgO7638F94N3R+FNu5hrOOWTHeHJhfsO0gw0ypIHon2SDCvxYUzTvh/ShFZoBsxAQYNa/+lmrKpkOn57xiokFztBNsR36NsQAR0nKTsdVimQUCnoZua0HgKl5yNORIBzuycwV7VI6VEzHb6YXe4+veXJej70mZFWADbHZegW1aMYe9s/IUftg/fHFcfBGMNpMaVn5XpuiV8O2QqopfhlV/8NHNT+MhEWHjphAgbfm07APc1saQfMQYOYS277RnFTDhxK6aszvqgcGOj5snZJIOYXlncPkpGWMsHQLWIvze1fV1TfEhqbJ3HbF5uocwtgoOLHrGipBsbmRFhtRl7LCZlvhEycMw/FEFyJpRiie6y5tnztn/I1obgE2zohslrPp6UjR0p/q1PzBvjSkPrHm9sn1EwfbWcEge2BXXWpN+pAbydVtNHLWqP4g5bd6G548dnkztFYfCU+ebAGV3cxUA0lHgBwJlqQ5Q9dCVtxm0Fpn3MSIMChwnHaXi31a8YuG7FcfmQG1KBJnDlOhCc+HKjdV3us58ZWwMNGJwptVogspIlB38CD7bqdIN11wUN5zq1HEOj6ZSlVqkavY3J2z7yEU7XBVp8s6zPHW+PgkI8w5x0UFA3RZ8x0TfCXhZNFCkKr4mg== X-Forefront-Antispam-Report: CIP:198.47.21.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:flwvzet200.ext.ti.com;PTR:ErrorRetry;CAT:NONE;SFS:(13230040)(1800799024)(23010399003)(36860700016)(82310400026)(376014)(56012099006)(10067099003)(261022113327099003)(261026140227099003)(261026121527099003)(261028144727099003)(261021121427099003)(261021123027099003)(261102123227099003)(261022105027099003)(261009223027099003)(261009221227099003)(18002099003)(22082099003)(4143699003)(6133799003)(3023799007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: IVgY+vNobMX3YDKdNaxjHJm/FrPNPAug3hZ/F1sffv6xuNvFh2+A5io+q03x+OYdtLDFADfCCASvt3N7+PEAc0pfFjpC7QwAa84Duy9R3e9pFvsWnODKX0kM6VbNmyWNlz/ZrfAdhsKtKjkyOdYDenosYNpdNYt2UPZq9Wxhz6OPxQhmMpu78Vms/XNrhkdDdlWP/TRzArIzd6p2/fn1++DON0Fwgu8cSc4IyyegX38CwUe5phxRs8TiFmwoBaAFmpUzTLMbJO26ozV4T7Fv4J0uMNJf5NMbqwB2v7fXQzNOzc8RBJ+sPg77GoT1XLIWwkejVhWsTur6SH5TeNkmecQFfLShi2+H/ppF8QM+4oloOLn0tRR+oXsiTvRzU5HgNEvuZbfr/ZkrQBM4xJlfYzTe/V3lQwia3fmbi6CXKWXHbHHYc1EFjRlSDvWgZ1hj X-Exchange-RoutingPolicyChecked: buQHAP3W2I5CJNuAfqKS30VFuQ665JDP+HFBbx3dInsovG2MbcZYZhIsf9fm+Owm1NoiV1OVkx/MzFe2NkTnBUK9Oaq8C3AMjoTT9FnmBdsVjvQHVzKGIJgaK4SiWB1dUeHtRo9qB/sNpIQoZP+HZwxlZXRMwfCHdM0bZnQfz2SJdhVYA6KwXsbX47tTJ+tkgtZaD+caoCnkh3liB/GhGH8F3LRSzObTH9RU7Jng58Sb/+BOYBGctznvcmJYITgABQgUzgeGO9VbEthuX70WKmShr1rjKbUUEjZFVF21wxRi1tNYzEmVvQt7SShJUxbMgeEvuktpTQvBwDZCz2OeTw== X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2026 14:04:03.4051 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 065cbf03-4c75-40ec-c24a-08df507d1f35 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.21.194];Helo=[flwvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF0000A992.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4350 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAyMDA1NSBTYWx0ZWRfX6Br7yhUfl0Yj y2v2E2pK5rWYHP8v+imVYu6MfsFK43K9ZoDHj3OITEx9h93et54psUoU63TAWEFreVPnKY4TMfG az4nPWaXaTdQHhBMue6KIaiR4LAvdiIvcjhAhQP4EvjlN+VpKjnlsoX8y6Gi4memAewnRjMG2bY zSzpa7vK4k3DlOxE/Ri+BJgjEEgwL3QBSaD+ACAIZ++4vEUAH1Tgk3no7gh1qrb7BlgdgbBgcgk /v3MDdpeJnUk9+6l/SNAULOUJooLW1G/hbtcfkbbBrbLJzyeJnLWndJmeSz1bGiuPIEzAQlvEgJ yEjInNRl5h7DzrMJGjakxLieFsKyzUzgURGp7P+OCTCq04dAw6ZRu2Hmh0USHAiKPdy/T0F41xN vQSdUoHVqr/XoqCMUUiS+KQVbNgz7vJ4xeQcJBSYqrcerM0sQSzpN+i/8k02JdgHIZ69nhe+tp9 SuWdvSCsI0NDp3UfcGQ== X-Authority-Analysis: v=2.4 cv=XdgcX455 c=1 sm=1 tr=0 ts=6b102557 cx=c_pps a=zrdfMquBAX+f6GZXohoIpQ==:117 a=iwqwCZQqcuTv3JOpYdM7/Q==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=AlMIdn_sM9wA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Z8NIEmU8O1QQgoT56wFK:22 a=gO1vWkAQAl3rybz1DQOp:22 a=VwQbUJbxAAAA:8 a=sozttTNsAAAA:8 a=wYjItBa3kHYsCME_8GUA:9 a=QEXdDO2ut3YA:10 X-Proofpoint-ORIG-GUID: 7W-6Lhw4FBqb7Lrp4wlFKfWa0m_HlzsC X-Proofpoint-GUID: 7W-6Lhw4FBqb7Lrp4wlFKfWa0m_HlzsC X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAyMDA1NSBTYWx0ZWRfX0qjglRHygBXB eDzHd1oVcXmPferJFOpk0H8Bn8gZaCEcLXBYItReV2wKrjPVbKdK1qIO1iddDTbrELxsU5xdnAx 2oiaxXfazJmWR3LCDpdGz4Tidjv3Bx4= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-02_02,2026-12-01_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 phishscore=0 malwarescore=0 bulkscore=0 suspectscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612020055 Hi Beleswar, On 29/10/26 23:41, Beleswar Padhi wrote: > From: Andrew Davis > > Extract the clock operations related functions and services from > ti_sci_core.c into its own file. This breaks down the single large > file into smaller logical files for better readability and maintenance. > > Signed-off-by: Andrew Davis > Signed-off-by: Beleswar Padhi > --- > v3: Changelog: > 1. None to this patch. > > Link to v2: > https://lore.kernel.org/all/20260930160607.2674980-20-b-padhi@ti.com/ > > v2: Changelog: > 1. None to this patch. > > Link to v1: > https://lore.kernel.org/all/20260929201746.4078803-20-b-padhi@ti.com/ > > drivers/firmware/ti/Makefile | 1 + > drivers/firmware/ti/ti_sci.h | 1 + > drivers/firmware/ti/ti_sci_clock.c | 553 +++++++++++++++++++++++++++++ > drivers/firmware/ti/ti_sci_core.c | 535 +--------------------------- > 4 files changed, 556 insertions(+), 534 deletions(-) > create mode 100644 drivers/firmware/ti/ti_sci_clock.c > > diff --git a/drivers/firmware/ti/Makefile b/drivers/firmware/ti/Makefile > index a3a056eedd9a5..c4233542ad57d 100644 > --- a/drivers/firmware/ti/Makefile > +++ b/drivers/firmware/ti/Makefile > @@ -1,5 +1,6 @@ > # SPDX-License-Identifier: GPL-2.0-only > > ti_sci-y := ti_sci_core.o > +ti_sci-y += ti_sci_clock.o > ti_sci-y += ti_sci_device.o > obj-$(CONFIG_TI_SCI_PROTOCOL) += ti_sci.o > diff --git a/drivers/firmware/ti/ti_sci.h b/drivers/firmware/ti/ti_sci.h > index 79f56699faf29..cce59cac35ed6 100644 > --- a/drivers/firmware/ti/ti_sci.h > +++ b/drivers/firmware/ti/ti_sci.h > @@ -1566,5 +1566,6 @@ int ti_sci_do_xfer(const struct ti_sci_handle *handle, > void *rx_message, size_t rx_message_size); > > void ti_sci_setup_device_ops(struct ti_sci_dev_ops *dops); > +void ti_sci_setup_clock_ops(struct ti_sci_clk_ops *cops); > > #endif /* __TI_SCI_H */ > diff --git a/drivers/firmware/ti/ti_sci_clock.c b/drivers/firmware/ti/ti_sci_clock.c > new file mode 100644 > index 0000000000000..f266522fb7d08 > --- /dev/null > +++ b/drivers/firmware/ti/ti_sci_clock.c > @@ -0,0 +1,553 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Texas Instruments System Control Interface Protocol Driver > + * > + * Copyright (C) 2015-2026 Texas Instruments Incorporated - https://www.ti.com/ > + * Nishanth Menon > + */ > + > +#include > +#include > + > +#include "ti_sci.h" > + > +/** > + * ti_sci_set_clock_state() - Set clock state helper > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * @flags: Header flags as needed > + * @state: State to request for the clock. > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_set_clock_state(const struct ti_sci_handle *handle, > + u32 dev_id, u32 clk_id, > + u32 flags, u8 state) > +{ > + struct ti_sci_msg_req_set_clock_state req; > + struct ti_sci_msg_hdr resp; > + int ret = 0; > + > + req.dev_id = dev_id; > + if (clk_id < 255) { > + req.clk_id = clk_id; > + } else { > + req.clk_id = 255; > + req.clk_id_32 = clk_id; > + } > + req.request_state = state; > + > + ret = ti_sci_do_xfer(handle, TI_SCI_MSG_SET_CLOCK_STATE, > + flags | TI_SCI_FLAG_REQ_ACK_ON_PROCESSED, > + &req, sizeof(req), > + &resp, sizeof(resp)); > + if (ret) > + return ret; > + > + return 0; > +} > + > +/** > + * ti_sci_cmd_get_clock_state() - Get clock state helper > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * @programmed_state: State requested for clock to move to > + * @current_state: State that the clock is currently in > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_cmd_get_clock_state(const struct ti_sci_handle *handle, > + u32 dev_id, u32 clk_id, > + u8 *programmed_state, u8 *current_state) > +{ > + struct ti_sci_msg_req_get_clock_state req; > + struct ti_sci_msg_resp_get_clock_state resp; > + int ret = 0; > + > + if (!programmed_state && !current_state) > + return -EINVAL; > + > + req.dev_id = dev_id; > + if (clk_id < 255) { > + req.clk_id = clk_id; > + } else { > + req.clk_id = 255; > + req.clk_id_32 = clk_id; > + } > + > + ret = ti_sci_do_xfer(handle, TI_SCI_MSG_GET_CLOCK_STATE, > + TI_SCI_FLAG_REQ_ACK_ON_PROCESSED, > + &req, sizeof(req), > + &resp, sizeof(resp)); > + if (ret) > + return ret; > + > + if (programmed_state) > + *programmed_state = resp.programmed_state; > + if (current_state) > + *current_state = resp.current_state; > + > + return 0; > +} > + > +/** > + * ti_sci_cmd_get_clock() - Get control of a clock from TI SCI > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * @needs_ssc: 'true' if Spread Spectrum clock is desired, else 'false' > + * @can_change_freq: 'true' if frequency change is desired, else 'false' > + * @enable_input_term: 'true' if input termination is desired, else 'false' > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_cmd_get_clock(const struct ti_sci_handle *handle, u32 dev_id, > + u32 clk_id, bool needs_ssc, > + bool can_change_freq, bool enable_input_term) > +{ > + u32 flags = 0; > + > + flags |= needs_ssc ? MSG_FLAG_CLOCK_ALLOW_SSC : 0; > + flags |= can_change_freq ? MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE : 0; > + flags |= enable_input_term ? MSG_FLAG_CLOCK_INPUT_TERM : 0; > + > + return ti_sci_set_clock_state(handle, dev_id, clk_id, flags, > + MSG_CLOCK_SW_STATE_REQ); > +} > + > +/** > + * ti_sci_cmd_idle_clock() - Idle a clock which is in our control > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * > + * NOTE: This clock must have been requested by get_clock previously. > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_cmd_idle_clock(const struct ti_sci_handle *handle, > + u32 dev_id, u32 clk_id) > +{ > + return ti_sci_set_clock_state(handle, dev_id, clk_id, > + MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE, > + MSG_CLOCK_SW_STATE_UNREQ); > +} > + > +/** > + * ti_sci_cmd_put_clock() - Release a clock from our control back to TISCI > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * > + * NOTE: This clock must have been requested by get_clock previously. > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_cmd_put_clock(const struct ti_sci_handle *handle, > + u32 dev_id, u32 clk_id) > +{ > + return ti_sci_set_clock_state(handle, dev_id, clk_id, > + MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE, > + MSG_CLOCK_SW_STATE_AUTO); > +} > + > +/** > + * ti_sci_cmd_clk_is_auto() - Is the clock being auto managed > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * @req_state: state indicating if the clock is auto managed > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_cmd_clk_is_auto(const struct ti_sci_handle *handle, > + u32 dev_id, u32 clk_id, bool *req_state) > +{ > + u8 state = 0; > + int ret; > + > + if (!req_state) > + return -EINVAL; > + > + ret = ti_sci_cmd_get_clock_state(handle, dev_id, clk_id, &state, NULL); > + if (ret) > + return ret; > + > + *req_state = (state == MSG_CLOCK_SW_STATE_AUTO); > + return 0; > +} > + > +/** > + * ti_sci_cmd_clk_is_on() - Is the clock ON > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * @req_state: state indicating if the clock is managed by us and enabled > + * @curr_state: state indicating if the clock is ready for operation > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_cmd_clk_is_on(const struct ti_sci_handle *handle, u32 dev_id, > + u32 clk_id, bool *req_state, bool *curr_state) > +{ > + u8 c_state = 0, r_state = 0; > + int ret; > + > + if (!req_state && !curr_state) > + return -EINVAL; > + > + ret = ti_sci_cmd_get_clock_state(handle, dev_id, clk_id, > + &r_state, &c_state); > + if (ret) > + return ret; > + > + if (req_state) > + *req_state = (r_state == MSG_CLOCK_SW_STATE_REQ); > + if (curr_state) > + *curr_state = (c_state == MSG_CLOCK_HW_STATE_READY); > + return 0; > +} > + > +/** > + * ti_sci_cmd_clk_is_off() - Is the clock OFF > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * @req_state: state indicating if the clock is managed by us and disabled > + * @curr_state: state indicating if the clock is NOT ready for operation > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_cmd_clk_is_off(const struct ti_sci_handle *handle, u32 dev_id, > + u32 clk_id, bool *req_state, bool *curr_state) > +{ > + u8 c_state = 0, r_state = 0; > + int ret; > + > + if (!req_state && !curr_state) > + return -EINVAL; > + > + ret = ti_sci_cmd_get_clock_state(handle, dev_id, clk_id, > + &r_state, &c_state); > + if (ret) > + return ret; > + > + if (req_state) > + *req_state = (r_state == MSG_CLOCK_SW_STATE_UNREQ); > + if (curr_state) > + *curr_state = (c_state == MSG_CLOCK_HW_STATE_NOT_READY); > + return 0; > +} > + > +/** > + * ti_sci_cmd_clk_set_parent() - Set the clock source of a specific device clock > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * @parent_id: Parent clock identifier to set > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_cmd_clk_set_parent(const struct ti_sci_handle *handle, > + u32 dev_id, u32 clk_id, u32 parent_id) > +{ > + struct ti_sci_msg_req_set_clock_parent req; > + struct ti_sci_msg_hdr resp; > + int ret = 0; > + > + req.dev_id = dev_id; > + if (clk_id < 255) { > + req.clk_id = clk_id; > + } else { > + req.clk_id = 255; > + req.clk_id_32 = clk_id; > + } > + if (parent_id < 255) { > + req.parent_id = parent_id; > + } else { > + req.parent_id = 255; > + req.parent_id_32 = parent_id; > + } > + > + ret = ti_sci_do_xfer(handle, TI_SCI_MSG_SET_CLOCK_PARENT, > + TI_SCI_FLAG_REQ_ACK_ON_PROCESSED, > + &req, sizeof(req), > + &resp, sizeof(resp)); > + if (ret) > + return ret; > + > + return 0; > +} > + > +/** > + * ti_sci_cmd_clk_get_parent() - Get current parent clock source > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * @parent_id: Current clock parent > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_cmd_clk_get_parent(const struct ti_sci_handle *handle, > + u32 dev_id, u32 clk_id, u32 *parent_id) > +{ > + struct ti_sci_msg_req_get_clock_parent req; > + struct ti_sci_msg_resp_get_clock_parent resp; > + int ret = 0; > + > + if (!parent_id) > + return -EINVAL; > + > + req.dev_id = dev_id; > + if (clk_id < 255) { > + req.clk_id = clk_id; > + } else { > + req.clk_id = 255; > + req.clk_id_32 = clk_id; > + } > + > + ret = ti_sci_do_xfer(handle, TI_SCI_MSG_GET_CLOCK_PARENT, > + TI_SCI_FLAG_REQ_ACK_ON_PROCESSED, > + &req, sizeof(req), > + &resp, sizeof(resp)); > + if (ret) > + return ret; > + > + if (resp.parent_id < 255) > + *parent_id = resp.parent_id; > + else > + *parent_id = resp.parent_id_32; > + > + return 0; > +} > + > +/** > + * ti_sci_cmd_clk_get_num_parents() - Get num parents of the current clk source > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * @num_parents: Returns he number of parents to the current clock. Minor: there is a typo on the above line `Returns the number of parents to the current clock` > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_cmd_clk_get_num_parents(const struct ti_sci_handle *handle, > + u32 dev_id, u32 clk_id, > + u32 *num_parents) > +{ > + struct ti_sci_msg_req_get_clock_num_parents req; > + struct ti_sci_msg_resp_get_clock_num_parents resp; > + int ret = 0; > + > + if (!num_parents) > + return -EINVAL; > + > + req.dev_id = dev_id; > + if (clk_id < 255) { > + req.clk_id = clk_id; > + } else { > + req.clk_id = 255; > + req.clk_id_32 = clk_id; > + } > + > + ret = ti_sci_do_xfer(handle, TI_SCI_MSG_GET_NUM_CLOCK_PARENTS, > + TI_SCI_FLAG_REQ_ACK_ON_PROCESSED, > + &req, sizeof(req), > + &resp, sizeof(resp)); > + if (ret) > + return ret; > + > + if (resp.num_parents < 255) > + *num_parents = resp.num_parents; > + else > + *num_parents = resp.num_parents_32; > + > + return 0; > +} > + > +/** > + * ti_sci_cmd_clk_get_match_freq() - Find a good match for frequency > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * @min_freq: The minimum allowable frequency in Hz. This is the minimum > + * allowable programmed frequency and does not account for clock > + * tolerances and jitter. > + * @target_freq: The target clock frequency in Hz. A frequency will be > + * processed as close to this target frequency as possible. > + * @max_freq: The maximum allowable frequency in Hz. This is the maximum > + * allowable programmed frequency and does not account for clock > + * tolerances and jitter. > + * @match_freq: Frequency match in Hz response. > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_cmd_clk_get_match_freq(const struct ti_sci_handle *handle, > + u32 dev_id, u32 clk_id, u64 min_freq, > + u64 target_freq, u64 max_freq, > + u64 *match_freq) > +{ > + struct ti_sci_msg_req_query_clock_freq req; > + struct ti_sci_msg_resp_query_clock_freq resp; > + int ret = 0; > + > + if (!match_freq) > + return -EINVAL; > + > + req.dev_id = dev_id; > + if (clk_id < 255) { > + req.clk_id = clk_id; > + } else { > + req.clk_id = 255; > + req.clk_id_32 = clk_id; > + } > + req.min_freq_hz = min_freq; > + req.target_freq_hz = target_freq; > + req.max_freq_hz = max_freq; > + > + ret = ti_sci_do_xfer(handle, TI_SCI_MSG_QUERY_CLOCK_FREQ, > + TI_SCI_FLAG_REQ_ACK_ON_PROCESSED, > + &req, sizeof(req), > + &resp, sizeof(resp)); > + if (ret) > + return ret; > + > + *match_freq = resp.freq_hz; > + > + return 0; > +} > + > +/** > + * ti_sci_cmd_clk_set_freq() - Set a frequency for clock > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * @min_freq: The minimum allowable frequency in Hz. This is the minimum > + * allowable programmed frequency and does not account for clock > + * tolerances and jitter. > + * @target_freq: The target clock frequency in Hz. A frequency will be > + * processed as close to this target frequency as possible. > + * @max_freq: The maximum allowable frequency in Hz. This is the maximum > + * allowable programmed frequency and does not account for clock > + * tolerances and jitter. > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_cmd_clk_set_freq(const struct ti_sci_handle *handle, > + u32 dev_id, u32 clk_id, u64 min_freq, > + u64 target_freq, u64 max_freq) > +{ > + struct ti_sci_msg_req_set_clock_freq req; > + struct ti_sci_msg_hdr resp; > + int ret = 0; > + > + req.dev_id = dev_id; > + if (clk_id < 255) { > + req.clk_id = clk_id; > + } else { > + req.clk_id = 255; > + req.clk_id_32 = clk_id; > + } > + req.min_freq_hz = min_freq; > + req.target_freq_hz = target_freq; > + req.max_freq_hz = max_freq; > + > + ret = ti_sci_do_xfer(handle, TI_SCI_MSG_SET_CLOCK_FREQ, > + TI_SCI_FLAG_REQ_ACK_ON_PROCESSED, > + &req, sizeof(req), > + &resp, sizeof(resp)); > + if (ret) > + return ret; > + > + return 0; > +} > + > +/** > + * ti_sci_cmd_clk_get_freq() - Get current frequency > + * @handle: pointer to TI SCI handle > + * @dev_id: Device identifier this request is for > + * @clk_id: Clock identifier for the device for this request. > + * Each device has it's own set of clock inputs. This indexes > + * which clock input to modify. > + * @freq: Currently frequency in Hz > + * > + * Return: 0 if all went well, else returns appropriate error value. > + */ > +static int ti_sci_cmd_clk_get_freq(const struct ti_sci_handle *handle, > + u32 dev_id, u32 clk_id, u64 *freq) > +{ > + struct ti_sci_msg_req_get_clock_freq req; > + struct ti_sci_msg_resp_get_clock_freq resp; > + int ret = 0; > + > + if (!freq) > + return -EINVAL; > + > + req.dev_id = dev_id; > + if (clk_id < 255) { > + req.clk_id = clk_id; > + } else { > + req.clk_id = 255; > + req.clk_id_32 = clk_id; > + } > + > + ret = ti_sci_do_xfer(handle, TI_SCI_MSG_GET_CLOCK_FREQ, > + TI_SCI_FLAG_REQ_ACK_ON_PROCESSED, > + &req, sizeof(req), > + &resp, sizeof(resp)); > + if (ret) > + return ret; > + > + *freq = resp.freq_hz; > + > + return 0; > +} > + > +/* Very minor /** instead of /* Sebin > + * ti_sci_setup_clock_ops() - Setup the clock operations structures > + * @cops: pointer to TISCI clock operations structure > + */ > +void ti_sci_setup_clock_ops(struct ti_sci_clk_ops *cops) > +{ > + cops->get_clock = ti_sci_cmd_get_clock; > + cops->idle_clock = ti_sci_cmd_idle_clock; > + cops->put_clock = ti_sci_cmd_put_clock; > + cops->is_auto = ti_sci_cmd_clk_is_auto; > + cops->is_on = ti_sci_cmd_clk_is_on; > + cops->is_off = ti_sci_cmd_clk_is_off; > + > + cops->set_parent = ti_sci_cmd_clk_set_parent; > + cops->get_parent = ti_sci_cmd_clk_get_parent; > + cops->get_num_parents = ti_sci_cmd_clk_get_num_parents; > + > + cops->get_best_match_freq = ti_sci_cmd_clk_get_match_freq; > + cops->set_freq = ti_sci_cmd_clk_set_freq; > + cops->get_freq = ti_sci_cmd_clk_get_freq; > +} > diff --git a/drivers/firmware/ti/ti_sci_core.c b/drivers/firmware/ti/ti_sci_core.c > index e98bf3c5f9dc1..848c040f598e0 100644 > --- a/drivers/firmware/ti/ti_sci_core.c > +++ b/drivers/firmware/ti/ti_sci_core.c > @@ -565,525 +565,6 @@ static int ti_sci_cmd_get_revision(struct ti_sci_info *info) > return 0; > } > > -/** > - * ti_sci_set_clock_state() - Set clock state helper > - * @handle: pointer to TI SCI handle > - * @dev_id: Device identifier this request is for > - * @clk_id: Clock identifier for the device for this request. > - * Each device has it's own set of clock inputs. This indexes > - * which clock input to modify. > - * @flags: Header flags as needed > - * @state: State to request for the clock. > - * > - * Return: 0 if all went well, else returns appropriate error value. > - */ > -static int ti_sci_set_clock_state(const struct ti_sci_handle *handle, > - u32 dev_id, u32 clk_id, > - u32 flags, u8 state) > -{ > - struct ti_sci_msg_req_set_clock_state req; > - struct ti_sci_msg_hdr resp; > - int ret = 0; > - > - req.dev_id = dev_id; > - if (clk_id < 255) { > - req.clk_id = clk_id; > - } else { > - req.clk_id = 255; > - req.clk_id_32 = clk_id; > - } > - req.request_state = state; > - > - ret = ti_sci_do_xfer(handle, TI_SCI_MSG_SET_CLOCK_STATE, > - flags | TI_SCI_FLAG_REQ_ACK_ON_PROCESSED, > - &req, sizeof(req), > - &resp, sizeof(resp)); > - if (ret) > - return ret; > - > - return 0; > -} > - > -/** > - * ti_sci_cmd_get_clock_state() - Get clock state helper > - * @handle: pointer to TI SCI handle > - * @dev_id: Device identifier this request is for > - * @clk_id: Clock identifier for the device for this request. > - * Each device has it's own set of clock inputs. This indexes > - * which clock input to modify. > - * @programmed_state: State requested for clock to move to > - * @current_state: State that the clock is currently in > - * > - * Return: 0 if all went well, else returns appropriate error value. > - */ > -static int ti_sci_cmd_get_clock_state(const struct ti_sci_handle *handle, > - u32 dev_id, u32 clk_id, > - u8 *programmed_state, u8 *current_state) ---