From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C15CDC433E0 for ; Wed, 20 Jan 2021 17:01:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E6A2233ED for ; Wed, 20 Jan 2021 17:01:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728981AbhATPw1 (ORCPT ); Wed, 20 Jan 2021 10:52:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390967AbhATPuw (ORCPT ); Wed, 20 Jan 2021 10:50:52 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A3CEC061757 for ; Wed, 20 Jan 2021 07:50:12 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2FkA-0004PH-K3; Wed, 20 Jan 2021 16:50:02 +0100 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1l2Fk9-0005Fx-LJ; Wed, 20 Jan 2021 16:50:01 +0100 Date: Wed, 20 Jan 2021 16:50:01 +0100 From: Sascha Hauer To: Abel Vesa Cc: Adam Ford , arm-soc , Adam Ford-BE , Aisheng Dong , Michael Turquette , Stephen Boyd , Shawn Guo , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Linus Walleij , Jerome Brunet , linux-clk , Linux Kernel Mailing List Subject: Re: [PATCH V3] clk: imx: Fix reparenting of UARTs not associated with sdout Message-ID: <20210120155001.GD19063@pengutronix.de> References: <20210115182909.314756-1-aford173@gmail.com> <20210118125204.hxsanoohwvdtdvym@fsr-ub1664-175> <20210120144454.f6b72lnasw4q3bde@fsr-ub1664-175> <20210120151305.GC19063@pengutronix.de> <20210120152813.x2pbs5vprevkly23@fsr-ub1664-175> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210120152813.x2pbs5vprevkly23@fsr-ub1664-175> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 16:48:32 up 49 days, 4:15, 92 users, load average: 0.30, 0.38, 0.23 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-clk@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org On Wed, Jan 20, 2021 at 05:28:13PM +0200, Abel Vesa wrote: > On 21-01-20 16:13:05, Sascha Hauer wrote: > > Hi Abel, > > > > On Wed, Jan 20, 2021 at 04:44:54PM +0200, Abel Vesa wrote: > > > On 21-01-18 08:00:43, Adam Ford wrote: > > > > On Mon, Jan 18, 2021 at 6:52 AM Abel Vesa wrote: > > ... > > > > > > > > > > > > > > > TBH, I'm against the idea of having to call consumer API from a clock provider driver. > > > > > I'm still investigating a way of moving the uart clock control calls in drivers/serial/imx, > > > > > where they belong. > > > > > > > > That makes sense. > > > > > > > > > > Just a thought. The uart clock used for console remains on from u-boot, > > > so maybe it's enough to just add the CLK_IGNORE_UNUSED flag to all the > > > uart root clocks and remove the prepare/enable calls for uart clocks > > > for good. I don't really have a way to test it right now, but maybe > > > you could give it a try. > > > > That would mean that UART clocks will never be disabled, regardless of > > whether they are used for console or not. That doesn't sound very > > appealing. > > AFAIK, the only uart clock that is enabled by u-boot is the one used for > the console. Later on, when the serial driver probes, it will enable it itself. > > Unless I'm missing something, this is exactly what we need. It might enable it, but with CLK_IGNORE_UNUSED the clock won't be disabled again when a port is closed after usage Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A309C433E0 for ; Wed, 20 Jan 2021 15:51:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16F332336D for ; Wed, 20 Jan 2021 15:51:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16F332336D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xG6J18Q3JdnRPDLVmvUTr5xeda0PkSqGVzvgVUzlO7E=; b=00wF7pBWJNg34ZVcKswRqKRb0 M+Maaj3BdOKhmv8jyJ6Uph4SYlJwYsVTVeMP/CqzPn4ELsLLxcG+mh5BdT11s0PAWpiz2sb9g//GE bwYo0yGIK6LOu99sGyJnUEaV5ccr2sSHSVDZLSUSwKZYhv1k6TjLT1CuabTxzvKpN9JrTjjfBIerY 73kcxtfX01CxyTwPiEJd6Hcw5757cDyVKrSuAuShnbRWfgmnCZmyo2ZhLva+vAqautUihG8Zyshmi cYNGtSSLdSdC5cSjzmUbvqoMYJHwx1hPmeCuAm251hxvp7n8jP7XdodHRfonkvoYbbYFbodCi1kx/ 7ydENd2Sg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2FkG-0001Ts-65; Wed, 20 Jan 2021 15:50:08 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2FkD-0001Sf-TU for linux-arm-kernel@lists.infradead.org; Wed, 20 Jan 2021 15:50:06 +0000 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2FkA-0004PH-K3; Wed, 20 Jan 2021 16:50:02 +0100 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1l2Fk9-0005Fx-LJ; Wed, 20 Jan 2021 16:50:01 +0100 Date: Wed, 20 Jan 2021 16:50:01 +0100 From: Sascha Hauer To: Abel Vesa Subject: Re: [PATCH V3] clk: imx: Fix reparenting of UARTs not associated with sdout Message-ID: <20210120155001.GD19063@pengutronix.de> References: <20210115182909.314756-1-aford173@gmail.com> <20210118125204.hxsanoohwvdtdvym@fsr-ub1664-175> <20210120144454.f6b72lnasw4q3bde@fsr-ub1664-175> <20210120151305.GC19063@pengutronix.de> <20210120152813.x2pbs5vprevkly23@fsr-ub1664-175> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210120152813.x2pbs5vprevkly23@fsr-ub1664-175> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 16:48:32 up 49 days, 4:15, 92 users, load average: 0.30, 0.38, 0.23 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210120_105005_982166_912B4320 X-CRM114-Status: GOOD ( 25.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aisheng Dong , Fabio Estevam , Linux Kernel Mailing List , Stephen Boyd , Shawn Guo , Michael Turquette , Adam Ford-BE , linux-clk , NXP Linux Team , Pengutronix Kernel Team , Adam Ford , Linus Walleij , arm-soc , Jerome Brunet Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jan 20, 2021 at 05:28:13PM +0200, Abel Vesa wrote: > On 21-01-20 16:13:05, Sascha Hauer wrote: > > Hi Abel, > > > > On Wed, Jan 20, 2021 at 04:44:54PM +0200, Abel Vesa wrote: > > > On 21-01-18 08:00:43, Adam Ford wrote: > > > > On Mon, Jan 18, 2021 at 6:52 AM Abel Vesa wrote: > > ... > > > > > > > > > > > > > > > TBH, I'm against the idea of having to call consumer API from a clock provider driver. > > > > > I'm still investigating a way of moving the uart clock control calls in drivers/serial/imx, > > > > > where they belong. > > > > > > > > That makes sense. > > > > > > > > > > Just a thought. The uart clock used for console remains on from u-boot, > > > so maybe it's enough to just add the CLK_IGNORE_UNUSED flag to all the > > > uart root clocks and remove the prepare/enable calls for uart clocks > > > for good. I don't really have a way to test it right now, but maybe > > > you could give it a try. > > > > That would mean that UART clocks will never be disabled, regardless of > > whether they are used for console or not. That doesn't sound very > > appealing. > > AFAIK, the only uart clock that is enabled by u-boot is the one used for > the console. Later on, when the serial driver probes, it will enable it itself. > > Unless I'm missing something, this is exactly what we need. It might enable it, but with CLK_IGNORE_UNUSED the clock won't be disabled again when a port is closed after usage Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel