Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp402946rdb; Tue, 23 Jan 2024 03:26:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8ePUmSucIwBxrXrcWuZFQhxPkJd+z3fRakoZ4q/vwkQR4Ui1bwdrCxMZJsKkBs85YSByg X-Received: by 2002:a05:6870:20b:b0:204:308f:cecc with SMTP id j11-20020a056870020b00b00204308fceccmr1433100oad.116.1706009174598; Tue, 23 Jan 2024 03:26:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706009174; cv=pass; d=google.com; s=arc-20160816; b=TdMEM3KZwu1f/1sEU5rQlQtZIBqKjNp8r4ibTsuZKx3EUK2padFq8OH4ktKwu+0Mmi OWKznly3Fs1bbLWizaGO+XEPgFwhMwMgYhDMhCguZcflnEwjLyxWkbu/T8cJfW3x13fv c7hfXAjwXNLAYm4eFThXE9Uv0s1kWMO6BSKnSoDbmwsxrRA94vBzau7rEc2WQeK1tyPJ Euw2Xa2RW3rNeWvwLT5NI5dBVA87dW7PR5d8Zhu4vKASrWAB6Ow5t2eshgo0gbSFnvtS pGANBt6o6CJs+t6k7+/k3G4tr7A9pDtY1zGXMGofia2Xrus6UEI9drYIS/cIXVw4MlVo zztg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=dvvKsA/eewz8L5j7bONqf4tbZ89+fEiAIMldzOjWHx4=; fh=d2xgj6x5l1RCxfR2WNtHU7ge3weu/DJ+2R35NXaYBY8=; b=zHlThbUZ9MFErAOZSDuv9uMU+qsuiFqU12tBGxWM4LX9pwev6UBgsMIE8jHext9mXV 3Kh0LJwBdghZxoV/leVyXBt7xazco9IQ5mxdZL+3GmZSCiaF3IU5UvikaOwBE/lSSXzK o0zfb65tjZtV92xCBTBzlYFT8x+kW/HzguLxCPeFhLYRkPYTkMH8mAnTCa0RiNJsjlE1 VL6kGLYoYkIVVjZ/CIWBL3Dr8Z5kKrzf+YFKEZSuU6J5YowEKVhx5Vs4hEjtbq7011wF 9DsvKTYojcXSVj1l2hQutD7Xwp7xJlSAw1urHU/6cXjBxENkQdDcjjfplb69NvBFLyAt TSEA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-35174-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35174-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u4-20020a63ef04000000b005c701bf0e27si9615124pgh.79.2024.01.23.03.26.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 03:26:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35174-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-35174-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35174-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8B0B5B28B07 for ; Tue, 23 Jan 2024 11:13:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4077F5D730; Tue, 23 Jan 2024 11:13:23 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E45E85C91A; Tue, 23 Jan 2024 11:13:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008402; cv=none; b=r/cYTnmBuOVT53uKwAHiIKUodmWQ+QcbOh26htJ4AYbA7A+iz7XiSh2o6W2QJw+lnj7Vo7V2BWW7f6GkKS8l2D/p5Mr0ExEbg+4d3Bzd4Mcrx8+YzwmtzlNPyxmyYBE9EsYWEEUfyfZ5hcB2q3vSvvJqL+EHC6nWTlQQFT8f2aI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706008402; c=relaxed/simple; bh=UYWReQW9UpugO0v/i1SILTLzGmv7pXpZJGlihgITteM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=G0gDPUs4NUGvosOz/64KTnZsgBrP5C8sP3XofV+0ZMMoxKbu56lQ1nFu9SRFwIZrYQn0rWaqGUHgLn/jw4M/IHQh2/bPEd7jszns+8mBT5dVFxaMuhkxtYSqFdOZXN8mGYYak2kD704aGgJCZYzj1sTnLlxxK/9r5FtOqvLTYbs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C32AF1FB; Tue, 23 Jan 2024 03:14:05 -0800 (PST) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 360543F762; Tue, 23 Jan 2024 03:13:19 -0800 (PST) Date: Tue, 23 Jan 2024 11:13:16 +0000 From: Sudeep Holla To: "Peng Fan (OSS)" , sboyd@kernel.org Cc: cristian.marussi@arm.com, mturquette@baylibre.com, Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Peng Fan Subject: Re: [PATCH V4 2/2] clk: scmi: support state_ctrl_forbidden Message-ID: References: <20240121110901.1414856-1-peng.fan@oss.nxp.com> <20240121110901.1414856-2-peng.fan@oss.nxp.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240121110901.1414856-2-peng.fan@oss.nxp.com> On Sun, Jan 21, 2024 at 07:09:01PM +0800, Peng Fan (OSS) wrote: > From: Peng Fan > > Some clocks may exported to linux, while those clocks are not allowed > to configure by Linux. For example: > > SYS_CLK1----- > \ > --MUX--->MMC1_CLK > / > SYS_CLK2----- > > MMC1 needs set parent, so SYS_CLK1 and SYS_CLK2 are exported to Linux, > then the clk propagation will touch SYS_CLK1 or SYS_CLK2. > So we need bypass the failure for SYS_CLK1 or SYS_CLK2 when enable > the clock of MMC1, adding scmi_no_state_ctrl_clk_ops to use software > enable counter, while not calling scmi api. > I would rewrite the commit message something like: " clk: scmi: Add support for forbidden clock state controls Some clocks may be exported to OS agent, while certain configurations/ access to those clocks are restricted to the OS agent by the SCMI platform firmware. For example: SYS_CLK1----- \ --MUX--->MMC1_CLK / SYS_CLK2----- MMC1_CLK needs to set parent as part of it initialisation and enabling. SYS_CLK1 and SYS_CLK2 are exported to the OS agent. The clk propagation will access SYS_CLK1 or SYS_CLK2 based on the configuration. However, we need bypass the failure to access SYS_CLK1 or SYS_CLK2 when MMC1_CLK is accessed and enabled. Add a separate scmi_no_state_ctrl clk_ops where the calls to the SCMI platform firmware are avoided if the access is not permitted. " No need to repost. I need Stephen's ack to take this together with scmi clk changes. -- Regards, Sudeep