From patchwork Fri Dec 9 15:47:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 31851 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp851296wrr; Fri, 9 Dec 2022 07:51:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf4rLfgxc9/kvzCI9i3Zr1abWOcE8b/uwsEKF2arov86gjwWE423nJqVmSFplSuR3XuilAuK X-Received: by 2002:a17:907:8c0c:b0:7c0:8e62:56d3 with SMTP id ta12-20020a1709078c0c00b007c08e6256d3mr6324533ejc.50.1670601090690; Fri, 09 Dec 2022 07:51:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670601090; cv=none; d=google.com; s=arc-20160816; b=Oj3KKnc83WOH8yzHGyW2JeHpqwnIG03xXVSU1byerD0mS721OKGT5EnXOtHEisa0ZH a3BNPNP7NBphZI2s5jH9OGCY/s63H8XNQT07yT8fwCVcshX72/8IFS+Hvqj7ueikf1jK kSv5XjkwDPX/HPhMiOET1vI248733CtI+VvUANdWETvE4k7yMWYBaRmY5cqQFKKdMMdB Q4WxysUDo0RX+No14Cpx9Tu/wYMvnp3UIa0fuxGsQHtdqBOKESeE8m8acleflHNioMJG gTn8ax03n3xMR2MVVEhbyAxPFAoQVKAupSTfMtUwx0mh1JilDpa5VTFlBL5PgAjhYczE ywEw== 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=Ugvbu8bCpnbC5DCNpRmOEBr77QelCxeP+aizsD30U6E=; b=dAgNEdJm4fjDZPtX+UqIw6wuYN97ijWFZ9OZq9OH+irG9m9O9/3rAQ4Sux5/SPfz35 EY63YNsNgyJpHsXZFnO7tHFydnqhKUV65rOAB7h696wu5kyWWI1WaJkgfWwLK62MxNaZ +/0H60nFbhyeoF6fu5WOMGPvJJFJNjpNpTYAmwkpo0+foHXs6JjVJ9XXB6p+hYPbhTVM MuyXQF6Zgeq1ipWCDMVDcL5rnLnmQZCgbBgis/+yTz3clLCO+JX2XnTRXVSx0Zq/ZI90 q40mf9a/QqaMYwjz3SskBI1JsFCXnrdnMaud6GGeK8DMeyf5bV5i8MkFZnW5mX+QPc0Y Zc4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=oZChamJc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=yg81Hsia; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm22-20020a170907949600b007a31138203asi67347ejc.669.2022.12.09.07.51.05; Fri, 09 Dec 2022 07:51:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=oZChamJc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=yg81Hsia; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230432AbiLIPr4 (ORCPT + 99 others); Fri, 9 Dec 2022 10:47:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230265AbiLIPr1 (ORCPT ); Fri, 9 Dec 2022 10:47:27 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B56A37FB2; Fri, 9 Dec 2022 07:47:26 -0800 (PST) Date: Fri, 09 Dec 2022 15:47:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670600843; 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=Ugvbu8bCpnbC5DCNpRmOEBr77QelCxeP+aizsD30U6E=; b=oZChamJcEAwxolx+mBxIAccQGI9H/XacibJqyqzlI2QFP2AV47wVneBfoXS01SHbl6wZQp CtQQrW261XLC186KvFd6m4oAJNxEcRcE8cXGxwGmdCQzgtm74yKCPVS6QOxIRep1QneUBU byh4l1EuW9GV1VT3z8xCV5rIZfmJdAo+zGnQ1oncJKUNzXtSQ7cThCos6saQ5WpJ34c91j P97tOHyIG31StDKN5/C4b/z7PYAhqY3AJ/cbD7jAX2Ry2hAyv2+5JTLRmMU538qwt/9FQd mA2IIue/d+4UcA3npe6AnbQvUdJXLPpRe5w51xZcTH/vfdbE0wUv1V8LOZYEOQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670600843; 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=Ugvbu8bCpnbC5DCNpRmOEBr77QelCxeP+aizsD30U6E=; b=yg81HsiaPMRRzk2LrPmlso7UOy7PcCnQK62Z0bnt8CmsDsY9MHCd942/cJj2x6nnaZo9uR 7yrMnJF+/kDp/9AQ== From: tip-bot2 for Jonathan =?utf-8?q?Neusch=C3=A4fer?= 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-npcm7xx: Enable timer 1 clock before use Cc: j.neuschaefer@gmx.net, Joel Stanley , Daniel Lezcano , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221104161850.2889894-3-j.neuschaefer@gmx.net> References: <20221104161850.2889894-3-j.neuschaefer@gmx.net> MIME-Version: 1.0 Message-ID: <167060084346.4906.1652754113589535961.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751752209249030872?= X-GMAIL-MSGID: =?utf-8?q?1751752209249030872?= The following commit has been merged into the timers/core branch of tip: Commit-ID: db78539fc95cf62b0b8f274368fcd8202eac91f9 Gitweb: https://git.kernel.org/tip/db78539fc95cf62b0b8f274368fcd8202eac91f9 Author: Jonathan Neuschäfer AuthorDate: Fri, 04 Nov 2022 17:18:46 +01:00 Committer: Daniel Lezcano CommitterDate: Fri, 02 Dec 2022 12:48:28 +01:00 clocksource/drivers/timer-npcm7xx: Enable timer 1 clock before use In the WPCM450 SoC, the clocks for each timer can be gated individually. To prevent the timer 1 clock from being gated, enable it explicitly. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20221104161850.2889894-3-j.neuschaefer@gmx.net Signed-off-by: Daniel Lezcano --- drivers/clocksource/timer-npcm7xx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/clocksource/timer-npcm7xx.c b/drivers/clocksource/timer-npcm7xx.c index a00520c..9af30af 100644 --- a/drivers/clocksource/timer-npcm7xx.c +++ b/drivers/clocksource/timer-npcm7xx.c @@ -188,6 +188,7 @@ static void __init npcm7xx_clocksource_init(void) static int __init npcm7xx_timer_init(struct device_node *np) { + struct clk *clk; int ret; ret = timer_of_init(np, &npcm7xx_to); @@ -199,6 +200,15 @@ static int __init npcm7xx_timer_init(struct device_node *np) npcm7xx_to.of_clk.rate = npcm7xx_to.of_clk.rate / (NPCM7XX_Tx_MIN_PRESCALE + 1); + /* Enable the clock for timer1, if it exists */ + clk = of_clk_get(np, 1); + if (clk) { + if (!IS_ERR(clk)) + clk_prepare_enable(clk); + else + pr_warn("%pOF: Failed to get clock for timer1: %pe", np, clk); + } + npcm7xx_clocksource_init(); npcm7xx_clockevents_init();