From patchwork Wed May 17 14:05:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 99974 Delivered-To: patch@linaro.org Received: by 10.182.142.97 with SMTP id rv1csp229753obb; Wed, 17 May 2017 07:06:39 -0700 (PDT) X-Received: by 10.84.168.69 with SMTP id e63mr4555096plb.124.1495029999605; Wed, 17 May 2017 07:06:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495029999; cv=none; d=google.com; s=arc-20160816; b=WZgkN9tgaUs5yTCFEiF1W9tZS7oNwdL02Xlg7qsScDHyUu+EI1On1jyCPSgH737p/u LQ7b39RdjgaqzyR47O5oVip/I24eOrwzOReXxV8e3I+/u7OxGh80K2WH7P0DRrV8ALF9 U8Wpk2jLDBqMAftaLAmL6CzQSZ07mvJhjQJW7Azcclk9MEXQZkj+gCJG9M3cxf5njDqM NZUihplQYzdIj9UMOZhncyPiG+DXhfYOcTe/rguaKOlBf94QOfbowZqMHIN1mC1jsxHd VaGJ1WylNh7Ir7Gsg+vFVRiVBvjSDC8IkzewJl0aW2+9anpTup7Oy4GFADMbfmAXqeA5 XYJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=jHUdXhVocUVSGXP6caGWqSZtGoTqmI5BEAI2CP5qbq8=; b=B+CkYgFQWhiMzPstnVN4Kksy1nXCBf1PwKHlUOszesKuSQn4uEHlMJ/cuITfl3qRtE EzPrPyDYjVV5foaCFqiUJaNQ7d6W0iglp/T3K0F0n8hJLbrICcXCoUwdGnN/kFiox8Ef cnMLEsKrQ2qQXdLQBbQgvbncrZJVlbaQrCL/xV/h9Kh8bGhGsVFIY22zmsAndcU6W1Vi TyrDQ6jdp2a/70+z7WVaEsXkViJFElRv9aUwKQNOUzxQtv51fOoGgj0KRP37VOS5sXLD fQv5J6FOaiZz6OwB9uSa8k2VDp1FhHWoLokcK7y2QeoH9XZ9foamoh9TQkK6zuJGNyCl OZjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x16si2196184pge.318.2017.05.17.07.06.39; Wed, 17 May 2017 07:06:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754542AbdEQOG0 (ORCPT + 25 others); Wed, 17 May 2017 10:06:26 -0400 Received: from mail-wr0-f179.google.com ([209.85.128.179]:33142 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754107AbdEQOGY (ORCPT ); Wed, 17 May 2017 10:06:24 -0400 Received: by mail-wr0-f179.google.com with SMTP id w50so10962734wrc.0 for ; Wed, 17 May 2017 07:06:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jHUdXhVocUVSGXP6caGWqSZtGoTqmI5BEAI2CP5qbq8=; b=SJnrZqYVnqhUhntE19WQCEkEuzun2y8jRIPOojyKwobJyEjEpjGT2wezv0IyyUWMFa YI9oDJLcBaT5EijxDu9N7WmuZ0DHU3avf4M2Zqer1v+R5zsVQ0nIvJ8X0EuETB6Q/Pm7 aUqPDJapyXJ4cm4GhAJL0T7I9PishP/Y1YFOk= 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=jHUdXhVocUVSGXP6caGWqSZtGoTqmI5BEAI2CP5qbq8=; b=Quuy/qPVRAYl1tzFtPwuYOAyBpquVfzTsB1E4WOCCNm5mQADuqRVyxl+46cSA3NL95 Chu69O7iGsC45ORKiVMNRhXnQCdoRKnr+Z4jA2u1LeNQwbReUIBjHzbSlyS/Yk9eWhjo c4q1AVABHIdPOVEBAt8omMKYBKMbH8MaitMVW0SJ9L5pGI1X3h5j8Cdjg3RHDYxhVAcj uPsI4NC7DWS/qug4TVebyW4OOS8IcKP+rx6zOTj6z98wQkr8OCspT2Yre/x6qKLk21w3 ZTRjLJM8dyCAt3acsSxc5pqSzwYhthB1ideYzTgGABRSPnzDrehEGvCN+OMFIHsKOygT hZkg== X-Gm-Message-State: AODbwcDxPGWk5THDw+3D2/52JuTeeHu9WKSrsO/15RoR5kmqfzX0+h0q VJ1pLRHQN/xkV2wh X-Received: by 10.46.32.66 with SMTP id g63mr983717ljg.51.1495029982699; Wed, 17 May 2017 07:06:22 -0700 (PDT) Received: from fabina.bredbandsbolaget.se (c-3c94db54.014-348-6c756e10.cust.bredbandsbolaget.se. [84.219.148.60]) by smtp.gmail.com with ESMTPSA id 139sm409680ljj.16.2017.05.17.07.06.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 May 2017 07:06:21 -0700 (PDT) From: Linus Walleij To: Daniel Lezcano , Thomas Gleixner , Joel Stanley , Jonas Jensen Cc: Janos Laube , Paulius Zaleckas , linux-arm-kernel@lists.infradead.org, Hans Ulli Kroll , Florian Fainelli , linux-kernel@vger.kernel.org, Linus Walleij Subject: [PATCH 1/8] clocksource/drivers/fttmr010: Fix the clock handling Date: Wed, 17 May 2017 16:05:35 +0200 Message-Id: <20170517140542.20016-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170517140542.20016-1-linus.walleij@linaro.org> References: <20170517140542.20016-1-linus.walleij@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need to also prepare and enable the clock we are using to get the right reference count and avoid it being shut off. Signed-off-by: Linus Walleij --- drivers/clocksource/timer-fttmr010.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 2.9.3 diff --git a/drivers/clocksource/timer-fttmr010.c b/drivers/clocksource/timer-fttmr010.c index b4a6f1e4bc54..58ce017e4a65 100644 --- a/drivers/clocksource/timer-fttmr010.c +++ b/drivers/clocksource/timer-fttmr010.c @@ -238,12 +238,18 @@ static int __init fttmr010_timer_of_init(struct device_node *np) * and using EXTCLK is not supported in the driver. */ struct clk *clk; + int ret; clk = of_clk_get_by_name(np, "PCLK"); if (IS_ERR(clk)) { - pr_err("could not get PCLK"); + pr_err("could not get PCLK\n"); return PTR_ERR(clk); } + ret = clk_prepare_enable(clk); + if (ret) { + pr_err("failed to enable PCLK\n"); + return ret; + } tick_rate = clk_get_rate(clk); return fttmr010_timer_common_init(np);