From patchwork Mon Oct 30 13:04:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 117464 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2563306qgn; Mon, 30 Oct 2017 06:05:24 -0700 (PDT) X-Google-Smtp-Source: ABhQp+T1DbOxpQWII2neiqKPw7SrSksd0t1YOcBdwHUtaQXFWE4CsRCF9z60yRELj2KgKa2wPhn4 X-Received: by 10.99.95.216 with SMTP id t207mr7853647pgb.185.1509368724439; Mon, 30 Oct 2017 06:05:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509368724; cv=none; d=google.com; s=arc-20160816; b=N7fFw3TUim8hwNWDmhU+dfJs4cmYxSgSIvtWjc3YvP4o3vo9z3KLgaEHKx/1O+FyNN 8x28+IlvTpsCM5oGIVNP29DfnI9Y4+YKbasHClChHjGNk5BjxqF84npdo8vTx39rhDdS cA/25BxLS4kgVYXTHgvDI12vZU+wOf2eyQ2IRMuoxV1wqMun3cH7G64JZ1WpyDDt7wql mWiSvkEF7hHXj4o6soi2w2Vv+SlBfcYzOQQ79ZsMoRPv+r8tOKljnqEAL18OPtJiO7WT i2gvmuSn5udkOHhZUL3V/SmcodsiRQIW1fk1lee9vDUlcMiuH4QwhdHW7vYdR3NJWmFN lQmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Rx/gvx5pw3wb/ux26Wgl6vbOcr5P/NLq3eaGwNVZqAg=; b=ovZHpR8oKfQuIoj9KPdK4Hz2HUDa0ISPON74jdXHmR0pjLCONSkv2QwZrNW9KdwtfV qO8dBLqDyEwaNgTNI5HREpYjfJpQNauKWgFG/bCzSxwsfhbAhaanJOt+Ug0Kd58hKotN pIJkznTxOwW7rnpqAB1SCsH6afpON6/N5zhd2eu/7hNszAb4kEKKWmtGPFP9ndXvjOFs l0ksa5xUuhVTCJY8Q0+DIy852hpmoGBA5zUUkHawG9AEqLJ5gQQcMkIzGyw6wuw2GxcQ 67bVw/gBGIEbIWyRj/04TlBIyZM8eMEnQfnyMy0IrJl6Xmo/sQ/ATE6fNIkX74Nz+Vnn aiKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=veE378qq; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h9si10891364pfe.573.2017.10.30.06.05.24; Mon, 30 Oct 2017 06:05:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=veE378qq; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751944AbdJ3NFX (ORCPT + 4 others); Mon, 30 Oct 2017 09:05:23 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:21613 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751705AbdJ3NFW (ORCPT ); Mon, 30 Oct 2017 09:05:22 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v9UD5ELI013273; Mon, 30 Oct 2017 08:05:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1509368714; bh=Ap7OBR7BR56HXDGPUVf/SlssFEai3WSMaRNUTK3uDjU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=veE378qqM55i61SbL0fjptd3Z4w8YqP4LEXv3/AnO44pcZHO8N2Oe7665+QDSxyzj xsbjsPw1NH2wzmi0ZBZLg3zVZTVVbJcEPqdBkiBm1cz3yUGYSTRfAzz4SuSyWwotbc L65lOOhJSL4sBY6ra/9QK6+GtJaq55CKKsVTWk/M= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9UD5Efm004853; Mon, 30 Oct 2017 08:05:14 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Mon, 30 Oct 2017 08:05:14 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Mon, 30 Oct 2017 08:05:14 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v9UD54wt005221; Mon, 30 Oct 2017 08:05:12 -0500 From: Tero Kristo To: , , CC: , Subject: [PATCH 04/27] clk: ti: clkctrl: use fallback udelay approach if timekeeping is suspended Date: Mon, 30 Oct 2017 15:04:22 +0200 Message-ID: <1509368685-29112-5-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1509368685-29112-1-git-send-email-t-kristo@ti.com> References: <1509368685-29112-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org This will happen on certain platforms when entering / leaving suspend and the system attempts to disable certain clocks at very early/late phase, burping out a warning from timekeeping core. Avoid the issue by checking if the timekeeping is suspended and using the fallback udelay approach for checking timeouts. Signed-off-by: Tero Kristo --- drivers/clk/ti/clkctrl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.9.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c index 284ba449..91ddc92 100644 --- a/drivers/clk/ti/clkctrl.c +++ b/drivers/clk/ti/clkctrl.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "clock.h" #define NO_IDLEST 0x1 @@ -90,7 +91,7 @@ static bool _omap4_is_ready(u32 val) static bool _omap4_is_timeout(union omap4_timeout *time, u32 timeout) { - if (unlikely(_early_timeout)) { + if (unlikely(_early_timeout || timekeeping_suspended)) { if (time->cycles++ < timeout) { udelay(1); return false;