From patchwork Mon Jan 28 23:06:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Menefy X-Patchwork-Id: 10785043 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 EB57313B4 for ; Mon, 28 Jan 2019 23:07:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB17E2B26C for ; Mon, 28 Jan 2019 23:07:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF5522B505; Mon, 28 Jan 2019 23:07:06 +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 4842A2B4D5 for ; Mon, 28 Jan 2019 23:07:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726678AbfA1XHF (ORCPT ); Mon, 28 Jan 2019 18:07:05 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:36621 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726937AbfA1XHF (ORCPT ); Mon, 28 Jan 2019 18:07:05 -0500 Received: by mail-wr1-f68.google.com with SMTP id u4so20021100wrp.3 for ; Mon, 28 Jan 2019 15:07:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mathembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=LnhuCvA6OBCsc6Z3TyYYS/ECd+d6SFx0/EIU5NWss9Y=; b=MJxexMlC/kk4jtZXRXsP8Mf+uHKo/2Oj0UoMDuRrdB0EN41BZo5UGWfzOz0vKBKu6F GSUUY+0/yJtAjnUEu/piprlmSNXnvsNazQh6kwLkFmyJMIoKs8FA1IP91FMQcYUHVJU/ zQ21RSf/HdA2AhpyUKHhFJz9DqsimPwvdGIuXk76F2mi5WGsJiQz0NRkhb9k4Z/G+jAX 8IrwpzhRvGTtJfDmsR4DXWvlU55Ob+6YPrEVzYJ61soW3UcH+CuER2D33PJ4kF2X6snA LsBDHjZGB+MKibEtpI0hotritOWauk/8RNO3ILvO6WK5N3zwSMM3x2h6oFvCSkzwf077 /Z5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=LnhuCvA6OBCsc6Z3TyYYS/ECd+d6SFx0/EIU5NWss9Y=; b=MZ0MwZ3AdWhLR+jndzi1ApdwkkTSbuNHMM/P7XqWx7IwWsbC7ighp4W4aJ8NIMai0K WVIJh8frCwBvcXfzkZUucYr4pOwhzOSVy20XR6FyFr0seS5BM3vu6V1xWlbRwUg8wSa2 LK+WFLFKgB6KU9g5ylnvJtEGLRLoGRl5FNPNhIk/t/audXm5/Pp2QcLTf3vitTj1Duvd F3kW7g3/drj3A9MNKIeLXEMkuAFDdYPPEXgyR4Evn7SJkiQhyIyvqXvrTgl5YCD5IFuv 8pJUo2PUmxFxo0GuUlEYNHFXNZ6NcnMFmJGhLWRWCB7gBRHu/EEdUyqy9Odm8RkjMU/a Ps4w== X-Gm-Message-State: AJcUukdVFYj0pSfcX0/F/e3P8flaUxEb0z/lvA/o1sds5dn1uhROd87o iNr4jHRTIh0tlwmRImsj9Zde+8OQzz6hvw== X-Google-Smtp-Source: ALg8bN6iLoftyqASt6rwtOWuAlBBHY6zob/DK0D24baBpfu1IIngmBSrN6Z9iwpodNlNXg3wPzf9vQ== X-Received: by 2002:adf:8b83:: with SMTP id o3mr24287502wra.81.1548716823649; Mon, 28 Jan 2019 15:07:03 -0800 (PST) Received: from diamond.mathembedded.com (host86-176-243-190.range86-176.btcentralplus.com. [86.176.243.190]) by smtp.gmail.com with ESMTPSA id o64sm506765wmo.47.2019.01.28.15.07.02 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 15:07:02 -0800 (PST) From: Stuart Menefy To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 01/17] clocksource: exynos_mct: Clear timer interrupt when stopping Date: Mon, 28 Jan 2019 23:06:44 +0000 Message-Id: <20190128230700.7325-2-stuart.menefy@mathembedded.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20190128230700.7325-1-stuart.menefy@mathembedded.com> References: <20190128230700.7325-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 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 --- drivers/clocksource/exynos_mct.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index 7a244b681876..c99d0b6e8b5f 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -398,12 +398,15 @@ static int exynos4_tick_set_next_event(unsigned long cycles, return 0; } +static void exynos4_mct_tick_clear(struct mct_clock_event_device *mevt); + static int set_state_shutdown(struct clock_event_device *evt) { struct mct_clock_event_device *mevt; mevt = container_of(evt, struct mct_clock_event_device, evt); exynos4_mct_tick_stop(mevt); + exynos4_mct_tick_clear(mevt); return 0; }