Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1720341rwb; Wed, 5 Oct 2022 03:58:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5BZxiIK3njdetHUEP+G0/bdWhoRgfEOWPDIM3BKkUg1paR0y/aD+ORJLiap+QabvszFwdV X-Received: by 2002:a17:907:75dc:b0:783:9c71:5e20 with SMTP id jl28-20020a17090775dc00b007839c715e20mr23264486ejc.125.1664967532344; Wed, 05 Oct 2022 03:58:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664967532; cv=none; d=google.com; s=arc-20160816; b=wBMF4ZZPEnk6cG5Zi10zIOr0bC03WZcY7pah7eEeRwL1sN3VEXCSCITbzRqhByCSw0 7uxgRxq9/BD5J+DdXm7VjlbTbnAfcMxZLc0d5JZn7xLeZPoTQphoy9EdEIF29JN4z/Cr GEFUb3IhWk+Ej5mSu5l28mV83kab15RdcCYkyTkfGwxdbTrlZVn9XbuJmYfQ/hVgT/nq 140Jgu1NzRA7V1HrhmxNavZRNL4o+IJW72VMZP2lAPZ3twr3oH+NM4t1Wq9NMe/Ry608 FQk2t0aOW5EUtkdaI63Xh2SX3fRsdRm7Y7b1jSSh0Zzpl5i7DqBfLS8cAkv1G5Gd6CdF Vnrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:references:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=cocJeKQ/JBBWRheWXPA0r5UfM37A0LKBsDlyCE3nnZQ=; b=DA9l1AKG5r1b2aQYOAZFia/1Mn2LWSscMqsRkTDrlEixV5HsIywRaN+ZY3FEzTo+pO Sm2a2pLysqldKuSgDNYFnc5CIPlZc4JO3RUEDGZigx81L7l04LrIyHYuPJiiKez+pUrF g8ZzS2j/T3xBtUMZcwPRKpv5xdswcVtmtPZkt1j7crinpRjxtADS2sHi7kYD/Ecyfv+I 02rbgdEfvEGhFH5ePaAm+G6aoAyhZfmdBAT6m/fm8DwHURby4mM2LTDaWFsAbq6gZbwr altxF5MjPoMXSVASa+9mKfGg2xJlrNPpzzBIv3aUHyZpfbO7hLcIzYyJuIlAGJC6Mbrc S1GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maxlinear.com header.s=selector header.b=KtOWHDk0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=maxlinear.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw4-20020a1709066a0400b0078d39e310e0si164460ejc.701.2022.10.05.03.58.24; Wed, 05 Oct 2022 03:58:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@maxlinear.com header.s=selector header.b=KtOWHDk0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=maxlinear.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229671AbiJEKwe (ORCPT + 99 others); Wed, 5 Oct 2022 06:52:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbiJEKwc (ORCPT ); Wed, 5 Oct 2022 06:52:32 -0400 Received: from us-smtp-delivery-115.mimecast.com (us-smtp-delivery-115.mimecast.com [170.10.133.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 486445AA38 for ; Wed, 5 Oct 2022 03:52:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maxlinear.com; s=selector; t=1664967150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=cocJeKQ/JBBWRheWXPA0r5UfM37A0LKBsDlyCE3nnZQ=; b=KtOWHDk0S9ZPT88+v9ROo7ctyppxOzMeVG8lmBfO+8Cngmjsfz3PWAVhwGqFQf+p6XnM87 a3xDivM+AK+LripuXVG1y6ImDM+7F5dsmJkZSVLzaaDH0t43+grB1Y480sfQ7V3DUCw651 FcXJpXrMZf72akEX35e2heVwFBTpFGfL/pMhYU8GTXnOHjUb8Jy2IWb4Tj58xb4GOq3pRy IeOaNE8bu86t4t03YbV4081rQmzlQtgj5LgRppveb4nsY7J1sq53PlsBiNNL3nd2qUMaYp TjI9W+hy4JSuf+85ZKzrLkMYyufxzhmj12tSBsaSW32TVp6YsT7dh0pKzL2lpw== Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-58-Mks1x5IbN9iz2dnQqsOCsw-1; Wed, 05 Oct 2022 06:52:28 -0400 X-MC-Unique: Mks1x5IbN9iz2dnQqsOCsw-1 Received: from MN2PR19MB3693.namprd19.prod.outlook.com (2603:10b6:208:18a::19) by DM6PR19MB4247.namprd19.prod.outlook.com (2603:10b6:5:2b8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.32; Wed, 5 Oct 2022 10:52:24 +0000 Received: from MN2PR19MB3693.namprd19.prod.outlook.com ([fe80::4d61:1edd:74f5:342c]) by MN2PR19MB3693.namprd19.prod.outlook.com ([fe80::4d61:1edd:74f5:342c%6]) with mapi id 15.20.5676.031; Wed, 5 Oct 2022 10:52:24 +0000 From: Rahul Tanwar To: Stephen Boyd , "linux-clk@vger.kernel.org" , "mturquette@baylibre.com" CC: linux-lgm-soc , Yi xin Zhu , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH RESEND v2 3/5] clk: mxl: Avoid disabling gate clocks from clk driver Thread-Topic: [PATCH RESEND v2 3/5] clk: mxl: Avoid disabling gate clocks from clk driver Thread-Index: AQHYzkwFrQSJjUImDUOzXbBrfYxegA== Date: Wed, 5 Oct 2022 10:52:24 +0000 Message-ID: References: <5a88bd5a9e93cc6e794080e5cac821ae0c27ec56.1663827071.git.rtanwar@maxlinear.com> <20220929001745.A4F9FC433B5@smtp.kernel.org> <20220930010123.38984C4347C@smtp.kernel.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR19MB3693:EE_|DM6PR19MB4247:EE_ x-ms-office365-filtering-correlation-id: 0247c3a1-217c-4cb5-6a19-08daa6bfafbc x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0 x-microsoft-antispam-message-info: OtHK3ZeEk50EY2XciqG89mnkV0XCQEr9aPfu0b1kRIA9X6CJBZ9VbwJZHP1sOrlWHOEXOl9r+dwmXsiDNCpUZjLhqP74iLd29g/bjhnkdxxXhEa6qsgFtpGVqZmwiKosvmn5qo/nS+bgCQILMb203WhmZmIXVPkJ5Ix8anMMF1SXZbnWtgxcz3bF2ogd6oCdT67e19vZjCiyEV4l76/LWxnaLM9GXVa1jv0s+snjLLl6xOz9OR8nViM2+uQytAkDhNbA8+fb4J3pL9U20nrOZtTlpSPkgT6YPVr02o+4HKCvnqVF99pQMwVqthBgDOEKOrBgqZ+BwEOH/WijaOR5wd+rHm6ZX2jK/0Fl5gOmRPxhjbvaYEH8cOScDaJQTmlg8aYtPP2dpoK5ErXpdmjqhgxLGxEU7i4lkw0U6FfdReXl9OONXb1CDpupAopEsotSeVAeXgdJHC8P9gmqrNOS/llUk2RdBt+JBjWT5tMovy3rvl1zZN3uj5uCIBUw5FBkzMjBb5voitzGoXEynUuJsKMI04326EoUkbG10GAlf7FSQCB031sJMILlQeZXaOdzaxjluRneEbjRgW7JRQHtE7U9qnx63EVzyxF+qhQiXDi8lA1nI9sowIG/n1qb35qH3TB5aZ/yFGaHl5LhWON5956B5+H7KzjkCjidmu4bP31r1+UgsSvhgJ+52XjVZnfFE1rQ05UHkdtRgmOxb5vkBnLy5sbwd5ePptiwTRgaa3sre+qTmfC4ky47Hyw83GIc6Z1P+KGFSTYUFkHQvRF7kA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR19MB3693.namprd19.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(346002)(396003)(39850400004)(136003)(376002)(451199015)(83380400001)(186003)(5660300002)(316002)(52536014)(9686003)(26005)(8936002)(54906003)(110136005)(91956017)(76116006)(66946007)(66556008)(66476007)(66446008)(64756008)(6506007)(7696005)(53546011)(4326008)(8676002)(2906002)(122000001)(38100700002)(41300700001)(478600001)(71200400001)(86362001)(38070700005)(55016003)(33656002);DIR:OUT;SFP:1102 x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?usPp1yH0jIIIxffqcRKcYH3AuBAp2v/S03V6eDpQKIYFlaBSWbE30F9leicE?= =?us-ascii?Q?S1X4Vmxnlke57/i2AJqfyJHsk0reo0QHizpgDZrdM/zLm63DqEqTZ9Lg3mvG?= =?us-ascii?Q?mktIHhuX290twUnT8pfpZwKXpLHDEvu6F3dHgjLMtQMjNsTKszzFyIUbf26R?= =?us-ascii?Q?+69f27OdvJLo+OYMs0DSzOxGgANs/R4zynqQ3TWM4WmbxWBVvbfPN2UUKTgM?= =?us-ascii?Q?wh6IQuSD+Viy5LqaR/h+AZgh1mv1bx6zf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-ascii?Q?OLqO84qt1mATmtkR+uFv5z8VUFLPSqsqrKnazsdXjbnNd9BIsD7ih6QqWZFO?= =?us-ascii?Q?j/bm0BQBhdjoBAxr+mxiM9MfNfd1yRz18hnlnVuvD/0OIc4ljgGJzqYkD+lz?= =?us-ascii?Q?I/ZA+F3oEt0tbhrOcltoe4x8FqHHSsZ4uMKz/AavjMXF+MNPuD7tx4wHRLA4?= =?us-ascii?Q?dQyKMBCD+Yov9ZDLmo+TQDqbChIDUhZWrZ9imaqLDcD8/ODk08q6lbpjkHD4?= =?us-ascii?Q?c1kNH7BmXJ5ThO6UYFBvxfGbJqXHQ1doHf6mnUIQCHgK1nA1sB3u2mC9QVWO?= =?us-ascii?Q?sX1Z+oiWE8gat77cxtE0G70FgR+GKGPVLcIxJ5ExszlnfhtOGAjhwiCoX3MF?= =?us-ascii?Q?32S8YxblFUOfWFbRX6ZVHVyOdcw6yum92/bsFCOFbX2MSe77azKrz0XojdJi?= =?us-ascii?Q?EnEJcMNUgqgRdOj3B4P0X8b07i6cNSie2TIW0Su3EJa6QnoYz/7+qo33+1bk?= =?us-ascii?Q?uQ=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: maxlinear.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR19MB3693.namprd19.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0247c3a1-217c-4cb5-6a19-08daa6bfafbc X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2022 10:52:24.3046 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: dac28005-13e0-41b8-8280-7663835f2b1d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LbOy63rv2H08ug7i/3jJSAJflEpaKxfoaoN9GzLFtLRXkRe4xSwt97zQcXRFRfkQOEmIFz9iP/TeILiuXmqoxw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR19MB4247 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: maxlinear.com Content-Language: en-US Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Resend due to mail delivery failure in earlier reply - one email id got=20= =0Acorrupted somehow in earlier reply]=0A=0AHi Stephen,=0A=0A=0AOn 30/9/202= 2 9:01 am, Stephen Boyd wrote:=0A> This email was sent from outside of MaxL= inear.=0A>=20=0A>=20=0A> Quoting Rahul Tanwar (2022-09-28 22:45:59)=0A>> On= 29/9/2022 8:17 am, Stephen Boyd wrote:=0A>>> This email was sent from outs= ide of MaxLinear.=0A>>>=0A>>>=0A>>> Quoting Rahul Tanwar (2022-09-21 23:24:= 26)=0A>>>> In MxL's LGM SoC, gate clocks are supposed to be enabled or disa= bled=0A>>>> from EPU (power management IP) in certain power saving modes. I= f gate=0A>>>> clocks are allowed to be enabled/disabled from CGU clk driver= , then=0A>>>> there arises a conflict where in case clk driver disables a g= ate clk,=0A>>>> and then EPU tries to disable the same gate clk, then it wi= ll hang=0A>>>> polling for the clk gated successful status.=0A>>>=0A>>> Is = there any point in registering these clks when they're not supposed=0A>>> t= o be controlled from Linux?=0A>>=0A>>=0A>> As mentioned in the full commit = log, only reason to register these clks=0A>> is to be backward compatible w= ith older versions of similar SoC's which=0A>> reuse the same clk CGU IP bu= t do not use same power management IP. Such=0A>> older SoCs also use the sa= me clk driver and for them these clks are=0A>> required to be controlled by= clk ops from Linux.=0A>>=0A>=20=0A> Why is the clk driver probing on the n= ew SoCs? Is it providing=0A> something? Can we detect that the power manage= ment IP exists and not=0A> register these clks?=0A>=20=0A=0AWe discussed in= the team about not registering gate clks at all as you=0Amentioned. But if= we do that, all peripheral drivers that use these clks=0Awould need modifi= cations so their probe does not fail due to failure=0Areturns of clk relate= d standard calls for e.g devm_clk_get(),=0Aclk_prepare_enable(). These are = standard calls in probe for all the=0Adrivers and a lot of them use gate cl= ks. So this would need a lot of=0Achanges with possibility of breaking work= ing functionalities.=0A=0AAlso, i incorrectly mentioned about the reason be= ing backward=0Acompatibility with older SoCs. Main reason is to support dif= ferent power=0Aprofiles use cases as per end product requirements some of w= hich might=0Acontrol it from clk framework i.e. this driver. We keep a inte= rnal=0Adriver flag just for this purpose to provide this flexibility depend= ing=0Aon the use case which is what we have used here.=0A=0AI am sending v3= with more clear & correct description about it to=0Ajustify the need for t= hese changes.=0A=0AThanks,=0ARahul=0A=0A=0A>=20=0A