From patchwork Thu May 7 21:03:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 6360841 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5FBCC9F373 for ; Thu, 7 May 2015 21:08:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7491220351 for ; Thu, 7 May 2015 21:08:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81BD920138 for ; Thu, 7 May 2015 21:08:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YqSy1-0003mx-Ky; Thu, 07 May 2015 21:04:25 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YqSxx-0003kW-NQ for linux-arm-kernel@lists.infradead.org; Thu, 07 May 2015 21:04:23 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 13B1E14032E; Thu, 7 May 2015 21:04:00 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id E89101402EE; Thu, 7 May 2015 21:03:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from [10.134.64.202] (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0C4381402EE; Thu, 7 May 2015 21:03:57 +0000 (UTC) Message-ID: <554BD33D.7050907@codeaurora.org> Date: Thu, 07 May 2015 14:03:57 -0700 From: Stephen Boyd User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Kevin Hilman Subject: Re: [PATCH v3 0/2] clk: improve handling of orphan clocks References: <1429735986-18592-1-git-send-email-heiko@sntech.de> <1981330.kGUrTurMy5@diego> <5543E79F.2080400@codeaurora.org> <22709390.NTAlubMgNB@diego> <55440EDA.4030905@codeaurora.org> In-Reply-To: X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150507_140421_783040_CF13A9A8 X-CRM114-Status: GOOD ( 19.96 ) X-Spam-Score: -0.0 (/) Cc: Ulf Hansson , =?UTF-8?B?SGVpa28gU3TDvGJuZXI=?= , Geert Uytterhoeven , Andrew Bresticker , Tyler Baker , Doug Anderson , Max Filippov , Alexandre Belloni , Sylwester Nawrocki , Robert Jarzmik , linux-clk@vger.kernel.org, Stefan Wahren , Boris Brezillon , Mike Turquette , =?UTF-8?B?RW1pbGlvIEzDs3Bleg==?= , Michal Simek , Alex Elder , Zhangfei Gao , Jason Cooper , Pawel Moll , Stephen Warren , Santosh Shilimkar , Chao Xie , Maxime Ripard , "linux-arm-kernel@lists.infradead.org" , Barry Song , Peter De Sc hrijver , lkml , Gabriel FERNANDEZ , Tero Kristo , Viresh Kumar , Sascha Hauer , Olof Johansson , Dinh Nguyen , Georgi Djakov X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On 05/07/15 08:17, Kevin Hilman wrote: > On Fri, May 1, 2015 at 4:40 PM, Stephen Boyd wrote: >> On 05/01/15 15:07, Heiko Stübner wrote: >>> Am Freitag, 1. Mai 2015, 13:52:47 schrieb Stephen Boyd: >>> >>>>> Instead I guess we could hook it less deep into clk_get_sys, like in the >>>>> following patch? >>>> It looks like it will work at least, but still I'd prefer to keep the >>>> orphan check contained to clk.c. How about this compile tested only patch? >>> I gave this a spin on my rk3288-firefly board. It still boots, the clock tree >>> looks the same and it also still defers nicely in the scenario I needed it >>> for. The implementation also looks nice - and of course much more compact than >>> my check in two places :-) . I don't know if you want to put this as follow-up >>> on top or fold it into the original orphan-check, so in any case >>> >>> Tested-by: Heiko Stuebner >>> Reviewed-by: Heiko Stuebner >> Thanks. I'm leaning towards tossing your patch 2/2 and replacing it with >> my patch and a note that it's based on an earlier patch from you. > It appears this has landed in linux-next in the form of 882667c1fcf1 > clk: prevent orphan clocks from being used. A bunch of boot failures > for sunxi in today's linux-next[1] were bisected down to that patch. > > I confirmed that reverting that commit on top of next/master gets > sunxi booting again. > > Thanks for the report. I've removed the two clk orphan patches from clk-next. Would it be possible to try with next-20150507 and clk_ignore_unused on the command line? Also we can try to see if critical clocks aren't being forced on by applying this patch and looking for clk_get() failures ------8<------ diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index 7e1e2bd189b6..d88585b680bb 100644 --- a/drivers/clk/sunxi/clk-sunxi.c +++ b/drivers/clk/sunxi/clk-sunxi.c @@ -1347,6 +1347,9 @@ static void __init sunxi_init_clocks(const char *clocks[], int nclocks) if (!IS_ERR(clk)) clk_prepare_enable(clk); + else + pr_err("Failed to enable critical clock %s\n", + clocks[i]); } }