Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1436465ybi; Sat, 27 Jul 2019 09:37:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqvthtc7t8ZyR8V9nA4J1RIgGCfrcSY+tQawUK7Wx4m+N1+hwlR7mn/Xr5KZylq/67hlC/ X-Received: by 2002:a17:902:e202:: with SMTP id ce2mr98134363plb.272.1564245420122; Sat, 27 Jul 2019 09:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564245420; cv=none; d=google.com; s=arc-20160816; b=hxmfPWRzdhvJ7ncZGskNJjy5yMVEE+rrsqpiUAc7r/0YkrMSnrt8m3tIvDtily6/PC 2uoQXcklGteStPWKUm7ms88lapSCHxTXyXnKoLqrQYiHw48cof6FPusjZuS9Z1/zjUgM 9rc7nuvQSqAkBJhSfH9FYblkKKZ+3iYODwVmI+j1zXynQb0iX8hDi2VEolfXDtJ1bDyb CpI8uWUb3hA+Zt86q87yInxaTv/WrfoMdxxCnH4A7wLSwbwrPXpymDWMZEAN1EzXhPsk S2rDwnMTNUZi/IM7XE12/FKmywHMeR3HNiBD+K8miMoR46K6U+DYOY/EvPd0uqUjsw+V LVsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=tNnmVh/883ZUCTZK/1kkTFBFB0wB8huhjyuvNEtpGTc=; b=kJgXpmZ7SQfrIXwQoI6UeWEzAiFOJYiLhMdLd6gUglphppPHuUwUWWEYj6gUd2TBzu K/c5E1rcO7DDb7nXWn2O+f8OMmUUeMEcT/OcZ7zaDqCQ3c4nA5/XGL1x+su4ZQcFhaxY gNOH+z2GKJZQtvGmv+5Zw8nJRA2ITnV4VKAuFi78xpBWQkVkB8f3PTvFed7fAM4eppDO kFWbigtV4lhzteQh5wFhojs955Nave0C5wQy44l0O+7SU+wnA1JFGmAoBU7mkowlae32 SfO6Hdj2iVS7+/K3eo7gsOClx97y9/hwPVxwSCH6X2QbKVeDLZ7zlh5TzdOrtrSCdOK1 sXtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9si21228721plb.284.2019.07.27.09.36.10; Sat, 27 Jul 2019 09:37:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387774AbfG0QRk (ORCPT + 99 others); Sat, 27 Jul 2019 12:17:40 -0400 Received: from inva021.nxp.com ([92.121.34.21]:59426 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728856AbfG0QRk (ORCPT ); Sat, 27 Jul 2019 12:17:40 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 67F36200E48; Sat, 27 Jul 2019 18:17:37 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 57CF2200E46; Sat, 27 Jul 2019 18:17:37 +0200 (CEST) Received: from fsr-ub1664-175.ea.freescale.net (fsr-ub1664-175.ea.freescale.net [10.171.82.40]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 2D76220612; Sat, 27 Jul 2019 18:17:37 +0200 (CEST) Date: Sat, 27 Jul 2019 19:17:36 +0300 From: Abel Vesa To: Daniel Baluta Cc: Anson Huang , "rui.zhang@intel.com" , "edubezval@gmail.com" , "daniel.lezcano@linaro.org" , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Lucas Stach , Andrey Smirnov , "Angus Ainslie (Purism)" , Carlo Caione , Guido =?utf-8?Q?G=C3=BCnther?= , Leonard Crestez , "linux-pm@vger.kernel.org" , Devicetree List , Linux Kernel Mailing List , linux-arm-kernel , "linux-clk@vger.kernel.org" , dl-linux-imx Subject: Re: [PATCH 5/6] clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT Message-ID: <20190727161736.4dkfqgwftre67v56@fsr-ub1664-175> References: <20190705045612.27665-1-Anson.Huang@nxp.com> <20190705045612.27665-5-Anson.Huang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180622 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-07-27 09:33:10, Daniel Baluta wrote: > On Sat, Jul 27, 2019 at 9:19 AM Anson Huang wrote: > > > > Hi, Daniel > > > > > Subject: Re: [PATCH 5/6] clk: imx8mq: Remove CLK_IS_CRITICAL flag for > > > IMX8MQ_CLK_TMU_ROOT > > > > > > Hi all, > > > > > > latest linux-next hangs at boot. > > > > > > commit fde50b96be821ac9673a7e00847cc4605bd88f34 (HEAD -> master, tag: > > > next-20190726, origin/master, origin/HEAD) > > > Author: Stephen Rothwell > > > Date: Fri Jul 26 15:18:02 2019 +1000 > > > > > > Add linux-next specific files for 20190726 > > > > > > Signed-off-by: Stephen Rothwell > > > > > > > > > I know this is crazy but reverting commit: > > > > > > commit 431bdd1df48ee2896ea9980d9153e3aeaf0c81ef (refs/bisect/bad) > > > Author: Anson Huang > > > Date: Fri Jul 5 12:56:11 2019 +0800 > > > > > > clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT > > > > > > IMX8MQ_CLK_TMU_ROOT is ONLY used for thermal module, the driver > > > should manage this clock, so no need to have CLK_IS_CRITICAL flag > > > set. > > > > > > > > > > > > makes the boot work again. > > > > > > Any idea? > > > > I just found if disabling SDMA1, then kernel can boot up, it does NOT make sense > > TMU clock is related to SDMA1, I will check with design and get back to you soon. > > > > Hi Anson, > > Applying Abel's patch: > > commit 8816c47db6a82f55bb4d64f62fd9dd3af680f0e4 (HEAD -> master) > Author: Abel Vesa > Date: Tue Jun 25 12:01:56 2019 +0300 > > clk: imx8mq: Mark AHB clock as critical > > Keep the AHB clock always on since there is no driver to control it and > all the other clocks that use it as parent rely on it being always enabled. > > > > The kernel boots up again. > > It make some sense. I don't understand though why having > IMX8MQ_CLK_TMU_ROOT as critical also "unhangs" the kernel. > OK, so this is how it works. By removing the critical flag from TMU, the AHB doesn't stay always on. With my patch the AHB is marked as critical and therefore stays on. The sdma1_clk has as parent the ipg_root which in turn has as parent the ahb clock. And I think what happens is some read from the sdma registers hangs because, for whatever reason, enabling the sdma1_clk doesn't propagate to enable the ahb clock. I might be wrong though. > thanks, > Daniel.