Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4469199rwb; Tue, 6 Sep 2022 08:00:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Lq9r1mHaTr1/vGYc+54d4rBJ8hFEqCz5v28XBt8YlGTcHgZaQWyh/cvlp/z8rp9gMudob X-Received: by 2002:a17:907:6d11:b0:730:a382:d5ba with SMTP id sa17-20020a1709076d1100b00730a382d5bamr39013286ejc.371.1662476430108; Tue, 06 Sep 2022 08:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662476430; cv=none; d=google.com; s=arc-20160816; b=vxm9IV3S0EP+FyrzKyeHFqo8pj4wM0AA68BqRmJMHMbC1+1IjZHnbnvDRoXmEXn6E3 J03u5FaTM6s8GtVcAhOiui0k9CDTNi++wEFVVlxEaxM+oWEF2FmueSmnRbtL4xrEnqIM kG+w8NR/X59EzqkFJ2Gcfayu5YRSbLHHDXVA/qTZ6zdyX1AnB8Q3RXuTU/VSADZSBVpJ wuYDrkIXsuyzij736BpdN/MToGAG8bf+oHOJPcmgVJeHoS09IQ/vdehrZx3zJTwVc6wv +G5M+GvLO902f0agVLsJ/2GnBDNcYZ2my0u84cJ5x7rnp4HlDmYz0qq8/J1d+wBJFZ4t WiJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CMv8bnu8r8dWj8eSxFUOvdUf0QgdddyN7RV7LveRKxk=; b=sAS+CoQIe7XOCfLzkP/12G2SpvpO6G7XGI8XNfLzYrlhzqPhnKJZjf/VbLexgy0jXT a6wt50qb1MERBG/+FN6wwc8Xo4vqPP6J1BVJbZ1zigrAgzQV615JdvvSJZbhIN4TXwBR s2BlNwfkhqPLoyl6DDe9r14f24OOPd6JhbvqHwj0psNW8PwSoih3U4QtS1xqSEyPnTvq +nIqv+KJOKDfprljNTe0okA2xRMO+lXDfVb6w8yVXgCVmoMWymcH+f40FUZkgic0/cEz +qSCVuB3ir5Hlbihv5LwifnxdYoSYnJXwcVnrdom1toRXarFACUVhZbhgdipmH5qeTzO 0Wog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=m5NvU00k; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l12-20020a056402254c00b0044874cf4c88si11086541edb.430.2022.09.06.07.59.40; Tue, 06 Sep 2022 08:00:30 -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=@linuxfoundation.org header.s=korg header.b=m5NvU00k; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233946AbiIFOIK (ORCPT + 99 others); Tue, 6 Sep 2022 10:08:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239897AbiIFOGb (ORCPT ); Tue, 6 Sep 2022 10:06:31 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 941BD85A96; Tue, 6 Sep 2022 06:45:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EFB5FB818D0; Tue, 6 Sep 2022 13:45:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5997FC433D6; Tue, 6 Sep 2022 13:45:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662471931; bh=OyO5ia0yLYG+hNrNpC20D/QZcITD2qNIV7aN9wgTA18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m5NvU00kwG0gSAZR2lQNj8o4QH/QMAjXE6ngpD3WxxLUa3SSR9trBzcYxNgGqF2kT BEgxCzH8Q4CIbdb4W/IKxEYMJ7edpLS2qMS6vBxBpt/Xzd9E1baKRRoZnrIZ8fq2ZY D+H39HDY0sECfcYreHq5CR0DLqliJ58QkOXBfngI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Stein , Chen-Yu Tsai , Stephen Boyd , Sasha Levin Subject: [PATCH 5.19 088/155] Revert "clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops" Date: Tue, 6 Sep 2022 15:30:36 +0200 Message-Id: <20220906132833.153347560@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220906132829.417117002@linuxfoundation.org> References: <20220906132829.417117002@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Stephen Boyd [ Upstream commit abb5f3f4b1f5f0ad50eb067a00051d3587dec9fb ] This reverts commit 35b0fac808b95eea1212f8860baf6ad25b88b087. Alexander reports that it causes boot failures on i.MX8M Plus based boards (specifically imx8mp-tqma8mpql-mba8mpxl.dts). Reported-by: Alexander Stein Cc: Chen-Yu Tsai Fixes: 35b0fac808b9 ("clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops") Link: https://lore.kernel.org/r/12115951.O9o76ZdvQC@steina-w Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20220831175326.2523912-1-sboyd@kernel.org Signed-off-by: Sasha Levin --- drivers/clk/clk.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 03427e3be727f..f00d4c1158d72 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -196,9 +196,6 @@ static bool clk_core_rate_is_protected(struct clk_core *core) return core->protect_count; } -static int clk_core_prepare_enable(struct clk_core *core); -static void clk_core_disable_unprepare(struct clk_core *core); - static bool clk_core_is_prepared(struct clk_core *core) { bool ret = false; @@ -211,11 +208,7 @@ static bool clk_core_is_prepared(struct clk_core *core) return core->prepare_count; if (!clk_pm_runtime_get(core)) { - if (core->flags & CLK_OPS_PARENT_ENABLE) - clk_core_prepare_enable(core->parent); ret = core->ops->is_prepared(core->hw); - if (core->flags & CLK_OPS_PARENT_ENABLE) - clk_core_disable_unprepare(core->parent); clk_pm_runtime_put(core); } @@ -251,13 +244,7 @@ static bool clk_core_is_enabled(struct clk_core *core) } } - if (core->flags & CLK_OPS_PARENT_ENABLE) - clk_core_prepare_enable(core->parent); - ret = core->ops->is_enabled(core->hw); - - if (core->flags & CLK_OPS_PARENT_ENABLE) - clk_core_disable_unprepare(core->parent); done: if (core->rpm_enabled) pm_runtime_put(core->dev); @@ -825,9 +812,6 @@ int clk_rate_exclusive_get(struct clk *clk) } EXPORT_SYMBOL_GPL(clk_rate_exclusive_get); -static int clk_core_enable_lock(struct clk_core *core); -static void clk_core_disable_lock(struct clk_core *core); - static void clk_core_unprepare(struct clk_core *core) { lockdep_assert_held(&prepare_lock); @@ -851,9 +835,6 @@ static void clk_core_unprepare(struct clk_core *core) WARN(core->enable_count > 0, "Unpreparing enabled %s\n", core->name); - if (core->flags & CLK_OPS_PARENT_ENABLE) - clk_core_enable_lock(core->parent); - trace_clk_unprepare(core); if (core->ops->unprepare) @@ -862,9 +843,6 @@ static void clk_core_unprepare(struct clk_core *core) clk_pm_runtime_put(core); trace_clk_unprepare_complete(core); - - if (core->flags & CLK_OPS_PARENT_ENABLE) - clk_core_disable_lock(core->parent); clk_core_unprepare(core->parent); } @@ -913,9 +891,6 @@ static int clk_core_prepare(struct clk_core *core) if (ret) goto runtime_put; - if (core->flags & CLK_OPS_PARENT_ENABLE) - clk_core_enable_lock(core->parent); - trace_clk_prepare(core); if (core->ops->prepare) @@ -923,9 +898,6 @@ static int clk_core_prepare(struct clk_core *core) trace_clk_prepare_complete(core); - if (core->flags & CLK_OPS_PARENT_ENABLE) - clk_core_disable_lock(core->parent); - if (ret) goto unprepare; } -- 2.35.1