From patchwork Wed Feb 12 23:46:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 212877 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=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 29EC0C352A4 for ; Wed, 12 Feb 2020 23:47:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F19FD206B6 for ; Wed, 12 Feb 2020 23:47:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="conaQ3BW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729403AbgBLXqk (ORCPT ); Wed, 12 Feb 2020 18:46:40 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35605 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729361AbgBLXqj (ORCPT ); Wed, 12 Feb 2020 18:46:39 -0500 Received: by mail-lj1-f194.google.com with SMTP id q8so4438423ljb.2; Wed, 12 Feb 2020 15:46:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kFoQr2efsDjC1sgE/IqBkGYRFbsY8VGMPosKnRKz7po=; b=conaQ3BWIMB1ZG7AlRiS1MwjCKJcLg9S4sW2ZuB6T1kOcyBMB2333AktT036+IHECS fNipirXJVzaRaHGreYYCzN5v6lYakEnF92nTZGO976MqcXFWAOSr3fb0JT2BC752X+tI Tc2MNec/SKHMWmbQ0g9SrWrwaasEN+k2bgFKsoLtJEVQcDtMAtivnTZfJijyi+NwzHnN xHXDsUpkq9nMI8Hil+kBGMOgv8u4uv8UAaqUA5bGITna2WrOUY3eWDxrPsVPDXjxW1X7 u05qxPDmiGoVqg9/NGZtaXdSNZ8TH7c3OjKyNXhtBMz1DFAzlttZcxg9nn0m5k/1yT1P w+zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kFoQr2efsDjC1sgE/IqBkGYRFbsY8VGMPosKnRKz7po=; b=JHpYsDhZLx61BUxGpCWC3PvUxkYtCTae0cjRAVpkajA35KOjHjs28nwIIApIFnNjpU X33fKWpafOYemr+XFSt0VrMgyEM13OUnaCm2b5SD/pZqiqVSDPGLIJ1HVQm1idkS8s08 2YSNAyFKgywGtrXhV2z6AxP5XN5iBPCssHnaSVmZl5L3pLTHCaZVw0qLnaT+32cqaOiM bhfY55B3WrnyiJTGLvn1h3KB5rGozsYozdukggavLs/n7XHpNQqkoxIuSol+NREdLlSy 01vrJy1mqvxUGDVO/pz1L82zSFCAnX0ybMP9+gZgu/MOEMFz6ChfV5Pc1D/gLYjb5o7L sjNA== X-Gm-Message-State: APjAAAVgYaURLp70N+l71w/nzspJrsBnjxDo6oQIP6RrFy4hLHO8veNj WdqQ10rptnBH+YuXd0xwFUs= X-Google-Smtp-Source: APXvYqwkhcXK2XXZFAxC2fq9VgZuSYsR3hMfRl/0FMfAm26yJD4kGM3Ir5AnFGCVNQM/uiqGQTGs9g== X-Received: by 2002:a2e:b610:: with SMTP id r16mr9598528ljn.33.1581551197531; Wed, 12 Feb 2020 15:46:37 -0800 (PST) Received: from localhost.localdomain (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.gmail.com with ESMTPSA id u15sm234453lfl.87.2020.02.12.15.46.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2020 15:46:37 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Peter De Schrijver , Prashant Gaikwad , "Rafael J. Wysocki" , Viresh Kumar , Michael Turquette , Stephen Boyd , Peter Geis , Nicolas Chauvet , Marcel Ziswiler , =?utf-8?b?TWljaGHFgiBN?= =?utf-8?q?iros=C5=82aw?= , Jasper Korten , David Heidelberg Cc: linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 07/12] ARM: tegra: Don't enable PLLX while resuming from LP1 on Tegra30 Date: Thu, 13 Feb 2020 02:46:02 +0300 Message-Id: <20200212234607.11521-8-digetx@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200212234607.11521-1-digetx@gmail.com> References: <20200212234607.11521-1-digetx@gmail.com> MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org PLLX may be kept disabled if cpufreq driver selects some other clock for CPU. In that case PLLX will be disabled later in the resume path by the CLK driver, which also can enable PLLX if necessary by itself. Thus there is no need to enable PLLX early during resume. Tegra114/124 CLK drivers do not manage PLLX on resume and thus they are left untouched by this patch. Acked-by: Peter De Schrijver Tested-by: Peter Geis Tested-by: Marcel Ziswiler Tested-by: Jasper Korten Tested-by: David Heidelberg Signed-off-by: Dmitry Osipenko --- arch/arm/mach-tegra/sleep-tegra30.S | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-tegra/sleep-tegra30.S b/arch/arm/mach-tegra/sleep-tegra30.S index b897d4a433b3..c3946dbd0240 100644 --- a/arch/arm/mach-tegra/sleep-tegra30.S +++ b/arch/arm/mach-tegra/sleep-tegra30.S @@ -361,7 +361,6 @@ _no_pll_iddq_exit: pll_enable r1, r0, CLK_RESET_PLLM_BASE, CLK_RESET_PLLM_MISC pll_enable r1, r0, CLK_RESET_PLLC_BASE, CLK_RESET_PLLC_MISC - pll_enable r1, r0, CLK_RESET_PLLX_BASE, CLK_RESET_PLLX_MISC _pll_m_c_x_done: pll_enable r1, r0, CLK_RESET_PLLP_BASE, CLK_RESET_PLLP_MISC @@ -371,12 +370,18 @@ _pll_m_c_x_done: pll_locked r1, r0, CLK_RESET_PLLP_BASE pll_locked r1, r0, CLK_RESET_PLLA_BASE pll_locked r1, r0, CLK_RESET_PLLC_BASE - pll_locked r1, r0, CLK_RESET_PLLX_BASE + /* + * CPUFreq driver could select other PLL for CPU. PLLX will be + * enabled by the Tegra30 CLK driver on an as-needed basis, see + * tegra30_cpu_clock_resume(). + */ tegra_get_soc_id TEGRA_APB_MISC_BASE, r1 cmp r1, #TEGRA30 beq 1f + pll_locked r1, r0, CLK_RESET_PLLX_BASE + ldr r1, [r0, #CLK_RESET_PLLP_BASE] bic r1, r1, #(1<<31) @ disable PllP bypass str r1, [r0, #CLK_RESET_PLLP_BASE]