Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1644808pxj; Fri, 18 Jun 2021 11:34:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbne8spIEZlv05LVmKVlAn4lh0ZSCq+J7Z8v2AOtg9ghoWgT7S1hmt/4smY98xwdHvu7Uw X-Received: by 2002:a5d:94d5:: with SMTP id y21mr9081686ior.110.1624041240947; Fri, 18 Jun 2021 11:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624041240; cv=none; d=google.com; s=arc-20160816; b=IrWk6q6ctOqn9kJ5MFLjHu50rOgx4tvZRMPxWws9N0qy6q4BFSVAJtrTClgbqO8IAH choCfwwYP1kfU697lJEYgo9eoDlyafS9dpx2ieQWh/hnvhC5mzq9PKwa4qXI9GeImiqy 4CHAzbWwgVO+eDkDthNW7jZEor2E4dt8UHc5flrCFGQ9PwogFat7MlFjwnrDf8VjS4PN pdhFVzGhT18tYHMnu1+n2teUsvpJYBGmmHinHunTkblhfrxGWFqgxoS3vvTKdzo/8FqY IQeSFDBsCKDsBvHNAO/Njljf7cUOm7PatH5dp4P2Guumzi6jNXnperFzHBGHtH4UXly0 NFLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=s9NOyDN1Emmtcu9gsSsGTxEq1iVk0D7i6S4fpHLEpys=; b=JRDh8WQNRL+s4lO1ZKurV2JiqZdSFrjCBkfcS6gyeE6f3HsMB3XHBHsd2INIBpLKg6 WocDtxsAQSVUDExO2jHz0j9I5w81uiHGm19pljgVb1O6P00uTE1hsXwbrmr2WkUfBl5k ygggt45b/kx6lVd3N7VL5FlVFHcptcINn7ChSYBOiWyiNmBgNs+RP89Dc5p06tbQP4mT 34/dHvIrSzZv6sDXzQ18PUZAnlQnXLASpBhCgQmjkEcydOWsUrB1CM0nG5yNOx2gX8xW htCOkzcnZPKcfULKBDNrSa/u9PNkpBLDxjIo9BLS5x3MAT/iVbX6QuDZ7NC+3mXOXPSt sqWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=B6BYkRWZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=FYzyokFU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si23750ioh.93.2021.06.18.11.33.48; Fri, 18 Jun 2021 11:34:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=B6BYkRWZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=FYzyokFU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235730AbhFRQGF (ORCPT + 99 others); Fri, 18 Jun 2021 12:06:05 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:57418 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233033AbhFRQFv (ORCPT ); Fri, 18 Jun 2021 12:05:51 -0400 Date: Fri, 18 Jun 2021 16:03:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1624032221; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s9NOyDN1Emmtcu9gsSsGTxEq1iVk0D7i6S4fpHLEpys=; b=B6BYkRWZTADpLI500g2/qeElwG3Et+nMivxvRI8zn49j4w9iJCNF2+iiE8/El65lhSbhpv Jzn3LR1/214gLpUdkIgIaAGAIHF4dNFcYzO+7RF6VywmKLGftaWRtjaqsNpE95hARvTRgZ wLBWm2CjZwM+Sw9P9KeWS1Q36tmgDevpVemAVwsBn64ZxSL7cNn81i5s3jwhpnqlaprk2J kbAfI910kdWgPUwrelM0LKKWUbMipIc6HqtKv4gX6xZ9LqzuGuvBRz+0D3eJntMwaq6+dQ JTfBluit37Taj4bswKZzj+bgplLeTbIMpB8ak/yRTSEbFOUwSp8ixztvQ+FguA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1624032221; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s9NOyDN1Emmtcu9gsSsGTxEq1iVk0D7i6S4fpHLEpys=; b=FYzyokFUcUG2FeYJrNnu0H52rTmxqWTyM316WgQRmqT7a4nOPPqsrqN2oZ9oF5TkjZyFpB ouydwUpYKJllP3AQ== From: "tip-bot2 for Tony Lindgren" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/drivers/timer-ti-dm: Save and restore timer TIOCP_CFG Cc: Aaro Koskinen , Adam Ford , Andreas Kemnade , Lokesh Vutla , Peter Ujfalusi , Tony Lindgren , Daniel Lezcano , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210415085506.56828-1-tony@atomide.com> References: <20210415085506.56828-1-tony@atomide.com> MIME-Version: 1.0 Message-ID: <162403222040.19906.12782574837725084275.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the timers/core branch of tip: Commit-ID: 9517c577f9f722270584cfb1a7b4e1354e408658 Gitweb: https://git.kernel.org/tip/9517c577f9f722270584cfb1a7b4e1354e408658 Author: Tony Lindgren AuthorDate: Thu, 15 Apr 2021 11:55:06 +03:00 Committer: Daniel Lezcano CommitterDate: Tue, 15 Jun 2021 14:14:14 +02:00 clocksource/drivers/timer-ti-dm: Save and restore timer TIOCP_CFG As we are using cpu_pm to save and restore context, we must also save and restore the timer sysconfig register TIOCP_CFG. This is needed because we are not calling PM runtime functions at all with cpu_pm. Fixes: b34677b0999a ("clocksource/drivers/timer-ti-dm: Implement cpu_pm notifier for context save and restore") Cc: Aaro Koskinen Cc: Adam Ford Cc: Andreas Kemnade Cc: Lokesh Vutla Cc: Peter Ujfalusi Signed-off-by: Tony Lindgren Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210415085506.56828-1-tony@atomide.com --- drivers/clocksource/timer-ti-dm.c | 6 ++++++ include/clocksource/timer-ti-dm.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c index 33eeabf..e5c631f 100644 --- a/drivers/clocksource/timer-ti-dm.c +++ b/drivers/clocksource/timer-ti-dm.c @@ -78,6 +78,9 @@ static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg, static void omap_timer_restore_context(struct omap_dm_timer *timer) { + __omap_dm_timer_write(timer, OMAP_TIMER_OCP_CFG_OFFSET, + timer->context.ocp_cfg, 0); + omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, timer->context.twer); omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, @@ -95,6 +98,9 @@ static void omap_timer_restore_context(struct omap_dm_timer *timer) static void omap_timer_save_context(struct omap_dm_timer *timer) { + timer->context.ocp_cfg = + __omap_dm_timer_read(timer, OMAP_TIMER_OCP_CFG_OFFSET, 0); + timer->context.tclr = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); timer->context.twer = diff --git a/include/clocksource/timer-ti-dm.h b/include/clocksource/timer-ti-dm.h index 4c61dad..f6da8a1 100644 --- a/include/clocksource/timer-ti-dm.h +++ b/include/clocksource/timer-ti-dm.h @@ -74,6 +74,7 @@ #define OMAP_TIMER_ERRATA_I103_I767 0x80000000 struct timer_regs { + u32 ocp_cfg; u32 tidr; u32 tier; u32 twer;