From patchwork Sun Feb 10 22:51:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Menefy X-Patchwork-Id: 10804961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7CC0717E6 for ; Sun, 10 Feb 2019 22:51:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CB6829BA7 for ; Sun, 10 Feb 2019 22:51:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 554F729BAC; Sun, 10 Feb 2019 22:51:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0869729BA8 for ; Sun, 10 Feb 2019 22:51:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726101AbfBJWvX (ORCPT ); Sun, 10 Feb 2019 17:51:23 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:50276 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726655AbfBJWvW (ORCPT ); Sun, 10 Feb 2019 17:51:22 -0500 Received: by mail-wm1-f67.google.com with SMTP id z5so13941978wmf.0 for ; Sun, 10 Feb 2019 14:51:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mathembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UxJjrGC7S8wuLmEIVFRAlM1pKLfRQfIve9rD0DYFhcM=; b=poEtcwpA4f2mQKs6qAiivo18iaDEe7zxRU2bldCaLMf7lll0XSdV8/R4+SElYbzZtW 5BRKDLmv64DKuYZbay9tKh1PtL0Vlu2IaR3alSYTR7FFv7/gLpHzrbo1qkVIPewwQ9q0 vpqh/FZ6uMCiCKRXtRq9n2IUtKGpwq6258H2lomwZphLeqQT8zykHM56cj/fg+KiZZ3U iXZKxX1klaswCvgYcApmrli2Iu+kPjvajjjWP4JogvJsgmv7lmb6qThWJgGeJEnBeVq1 wBPeIC9gaqZ+GkmjfPa19skmU5GHkKPBs5v+7o2t3btTsg30yuVY7sKTTXRhwuydTR46 0rRQ== 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; bh=UxJjrGC7S8wuLmEIVFRAlM1pKLfRQfIve9rD0DYFhcM=; b=ak3xuFt2ZBC2sOFLVvw6omIekBA8nQO2lME2WLtTz03R4VOLJTNdLZ6iPFpAhbpgfy PIlzzpcg+kRBV8p4oFFMErzHsA8YP0zf4jVUHnk5CHHsMlq2XCwr3+yOe+agD03gw4A0 e6HGmJj9H2R8a5nvAHfciHUnLJtUdrr9Y1UtY3cC+ykesj0EXtLZH9US9LodcW/SaeNZ s+2WWq4mokrVr9OH0E++e4nzRxz74ZWzl33SeTbdisgnFLMxwh1TDMLKPLizJx2lT8HI L2fFRIwv+11nzW8nMsipD2Vb/PkGA/zk6gTm+fArvPdLpgmYdxs34Bw9Yf3fuffFXTkk 3cjA== X-Gm-Message-State: AHQUAubZDfsVNbfiIAU2xOjfPWqt7YDVojmm+1elJK41NE4UB8q0jY/Y h08FKVR8f/ulcl77TFHMMa+3gdI9yY3K5b2E X-Google-Smtp-Source: AHgI3IZectTBQRReNF8QKgvrBqrQimO7K4hqtf8S/K3t9zoe0a17CHmZfN+pasIL1lTb4VJZ8LxJgA== X-Received: by 2002:a5d:44d1:: with SMTP id z17mr20533185wrr.271.1549839080355; Sun, 10 Feb 2019 14:51:20 -0800 (PST) Received: from localhost.localdomain (host86-176-243-198.range86-176.btcentralplus.com. [86.176.243.198]) by smtp.gmail.com with ESMTPSA id c139sm3904325wmd.13.2019.02.10.14.51.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 10 Feb 2019 14:51:19 -0800 (PST) From: Stuart Menefy To: linux-samsung-soc@vger.kernel.org, Daniel Lezcano , Thomas Gleixner , Kukjin Kim , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Stuart Menefy Subject: [PATCH 2/2] clocksource: exynos_mct: Clear timer interrupt when shutdown Date: Sun, 10 Feb 2019 22:51:14 +0000 Message-Id: <20190210225114.20110-3-stuart.menefy@mathembedded.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20190210225114.20110-1-stuart.menefy@mathembedded.com> References: <20190210225114.20110-1-stuart.menefy@mathembedded.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When shutting down the timer, ensure that after we have stopped the timer any pending interrupts are cleared. This fixes a problem when suspending, as interrupts are disabled before the timer is stopped, so the timer interrupt may still be asserted, preventing the system entering a low power state when the wfi is executed. Signed-off-by: Stuart Menefy Reviewed-by: Krzysztof Kozlowski --- drivers/clocksource/exynos_mct.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 1e325f89d408..d55c30f6981d 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -411,6 +411,7 @@ static int set_state_shutdown(struct clock_event_device *evt) mevt = container_of(evt, struct mct_clock_event_device, evt); exynos4_mct_tick_stop(mevt); + exynos4_mct_tick_clear(mevt); return 0; }