Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5447080imm; Tue, 16 Oct 2018 10:21:06 -0700 (PDT) X-Google-Smtp-Source: ACcGV61P8jl3q5JX8H09k6j+0SF1uODKEpgWX0R0QSyMZTWzTHSdfYE5yvSAk4nW7Xvn2IAd5Sql X-Received: by 2002:a17:902:9693:: with SMTP id n19-v6mr10709966plp.20.1539710466940; Tue, 16 Oct 2018 10:21:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539710466; cv=none; d=google.com; s=arc-20160816; b=BQWpdnZUXYU2MJyIvh26f/ARHwtHnyHn9p7J2ufdKVDsjflfyABzD0GYSagF9wWLgP oW+6gqG47hcpculBQtEuiWmnIgBaG3Xo9cA3gz0QmFQ/8aYSLCkSOSfkf4F0JJRkOt7W zJaoWHRXo9B7ESCFXJcjV1uGPsEQ324ynhYi8QtGSTMhN8E2Wezan/KN+XzfWP198FSr pMO3+iEBmoeYs8gw3+bIF55ZsdtCQF8V0VWwJkTJ5EiegRI8AtpuR9tQiluToFkURhC3 jjjwmKA6b2uiPS3XWh+hn0h7vHJWM4hl6SRXqNiFspVgloEJHfi+l0t0uTTOiz6tTnYD 0TnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zKhJvJqJqVWAU1phTaKdS4WQcV+AQ5cXOnmz7SZY6fo=; b=zWAinR22t4VRp5gw9pMKwemBtsGJEE2yOg9QzU62/jOAmp/O1dsgeUOt+YYBJ4OG8k Plmm03VYryLinN1v5ccsNRzUkvdwqVWTNIuyhIUFvhJBSOFA+2oIucpGv/M/ttWIMo7J f4I4P1Y/tkO5FY0+vW+fxDmyIMbQ1ScpH/MJGbdElkRmu0akVjqigEnMNv75rWSEyoRj qoaADS0I/y8XXmhcCzhjw2ZILDF+CCOFpBTSdHTcVpUZU5mqgf83bzafe/U8t24tUUVi RjjJEWo1+qgLs1chhV1Bs989bwKiHYTmlX2ADiRpO+UzNIwGHte3qRdwEnPDYKheca7d /+Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pGw3QCrY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12-v6si15176682pla.70.2018.10.16.10.20.50; Tue, 16 Oct 2018 10:21:06 -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; dkim=pass header.i=@kernel.org header.s=default header.b=pGw3QCrY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730436AbeJQBLG (ORCPT + 99 others); Tue, 16 Oct 2018 21:11:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:56304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729960AbeJQBLG (ORCPT ); Tue, 16 Oct 2018 21:11:06 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1DE0F20866; Tue, 16 Oct 2018 17:19:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539710381; bh=0LgoxV3DZTXOqDL5poIHIMj5jx5bKQgJcGA/yzT7uGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pGw3QCrY0cxtRhYBD3e+m4aFtrUH00qzco+HM+RAjSC+m4Xti4UswfHJRfylW224J ToZB4YutscpEI++PWSWZMRRE4/UzYJSTz4kv0CsmJQXqPGqOEdnVJoTPUr7/b2Dlzo 3NUnPrchUnU4HXE5pUPCruD9hFFf+FZ71bXi2O80= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Stezenbach , Carlo Caione , Andy Shevchenko , Stephen Boyd , Hans de Goede , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 058/109] clk: x86: Stop marking clocks as CLK_IS_CRITICAL Date: Tue, 16 Oct 2018 19:05:26 +0200 Message-Id: <20181016170528.054298478@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016170524.530541524@linuxfoundation.org> References: <20181016170524.530541524@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Hans de Goede [ Upstream commit 648e921888ad96ea3dc922739e96716ad3225d7f ] Commit d31fd43c0f9a ("clk: x86: Do not gate clocks enabled by the firmware"), which added the code to mark clocks as CLK_IS_CRITICAL, causes all unclaimed PMC clocks on Cherry Trail devices to be on all the time, resulting on the device not being able to reach S0i3 when suspended. The reason for this commit is that on some Bay Trail / Cherry Trail devices the r8169 ethernet controller uses pmc_plt_clk_4. Now that the clk-pmc-atom driver exports an "ether_clk" alias for pmc_plt_clk_4 and the r8169 driver has been modified to get and enable this clock (if present) the marking of the clocks as CLK_IS_CRITICAL is no longer necessary. This commit removes the CLK_IS_CRITICAL marking, fixing Cherry Trail devices not being able to reach S0i3 greatly decreasing their battery drain when suspended. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=193891#c102 Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=196861 Cc: Johannes Stezenbach Cc: Carlo Caione Reported-by: Johannes Stezenbach Reviewed-by: Andy Shevchenko Acked-by: Stephen Boyd Signed-off-by: Hans de Goede Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/clk/x86/clk-pmc-atom.c | 7 ------- 1 file changed, 7 deletions(-) --- a/drivers/clk/x86/clk-pmc-atom.c +++ b/drivers/clk/x86/clk-pmc-atom.c @@ -187,13 +187,6 @@ static struct clk_plt *plt_clk_register( pclk->reg = base + PMC_CLK_CTL_OFFSET + id * PMC_CLK_CTL_SIZE; spin_lock_init(&pclk->lock); - /* - * If the clock was already enabled by the firmware mark it as critical - * to avoid it being gated by the clock framework if no driver owns it. - */ - if (plt_clk_is_enabled(&pclk->hw)) - init.flags |= CLK_IS_CRITICAL; - ret = devm_clk_hw_register(&pdev->dev, &pclk->hw); if (ret) { pclk = ERR_PTR(ret);