Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp351617rwb; Thu, 1 Dec 2022 03:05:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf5/TaDQEUXj4G69o7yiHIwY//ROp7wsTcm2QwmQftuexwrIlpCrbhdlksqqVzvQDOIGAFlB X-Received: by 2002:a17:906:d782:b0:7bc:9d14:a2db with SMTP id pj2-20020a170906d78200b007bc9d14a2dbmr24739550ejb.770.1669892740882; Thu, 01 Dec 2022 03:05:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669892740; cv=none; d=google.com; s=arc-20160816; b=xcaRrhSh9NW2Sv+QBC7tu0Lr/w2iAFUHptguHS9Xusb6364d/mI0qBsmf2fF7v4MDa EhbEaZ7eFX/siBcFYKjl0ysjzvO0liJGh6xqGWfSgzBge4dndvOuUG3A/x+/viCOqTfH l2+iLF8Jdab/M4BqfZxsBSVL89cwpHFkjiD74ruqEvlQs+ldj1zJTqvccTIEs4FnjnXU Re0i27crjGdKBI+Ens9lIf7xhH3IJagoYAaBGqMIIDMsmlyAYGIx1r4w5pzbbsTP8gHP QjElWinZMOhBFx3owi+0AxcQ19ksgJUUJ65iFhUrf7lyYfvtPlmj9CQpDt+zoHoXPV0G bpkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=Td6NWg37tgKK/R89b3W+x5buNn+OHKbKyja18wB8IEw=; b=mqRf652ajTYHAsmlNs9O9E2/I6gFHs0PksDCE2mVw7HoXdw2DAkC+N23l0PHtWU5Wc q1vJahdJ2PS6DoBnLtgOKS1/tB4DGK8V69FMzySW3GmySL4ajYDL7c9lCOtfA3h6dgXv WSFYWfAEmCaPgI90M62o3JEVsscCmu4lU23ueoDiydKG5jNIhIearpJv5f17SMCXfTMx DXbzP9N9vrlcXX4eP/TvOL6Ac/iP92rlWyulV+q2v/8EgM6mRHAvABWmjDvFcZORUpL2 eEjsWUsr9qsDWZZ78jqhI/6TuIh6EOihl4q0o0Vre6qvZ5/UKmZvKHlqQGJW2KkSP8+T bN7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CyhDIS73; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f6-20020a05640214c600b0046c094d9b85si217214edx.348.2022.12.01.03.05.20; Thu, 01 Dec 2022 03:05:40 -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=CyhDIS73; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S230026AbiLAKzp (ORCPT + 82 others); Thu, 1 Dec 2022 05:55:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229568AbiLAKzo (ORCPT ); Thu, 1 Dec 2022 05:55:44 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2892E1DDC2; Thu, 1 Dec 2022 02:55:43 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669892141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Td6NWg37tgKK/R89b3W+x5buNn+OHKbKyja18wB8IEw=; b=CyhDIS73ej6zlgPH/gJ31NA05md2tb69sFvcCindU4QGN0yYsm4sHIQYGpIS26mQ6a+M1U TE8D71NZ15F/T6BljSA+rEaIuWvHtJKIpZVy4RL4d5BfelhmesD7nlYduE4tX+j+3KtEvh lTLkIzUyFV4ub69ITeJfIE//MonhrbADsAwVc9BaQwrxOpX+Cwh3at84oNIwpA6f9AeNCN NxfSqK0uoiP5zJcwiK82sBuzak1DjUqUcZRXVCEfIYZqTYl6lGbLZP9lRiWEo/xPOU8EDL 4nURnwUmsXnCOMLQb2KINb0t1JEW1cXpLRaftBp6QMGGyrE9rWyFh0lmBZviZg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669892141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Td6NWg37tgKK/R89b3W+x5buNn+OHKbKyja18wB8IEw=; b=k5JrKXi2jMVZQKJq9g5O8uCX1UslB1noSmC1Ls05iRD/1JTvZlnuDFxeyfsBTI9HltIQ9m CGoUUjgjF4CMBRCg== To: Wolfram Sang , linux-renesas-soc@vger.kernel.org Cc: Yoshihiro Shimoda , Wolfram Sang , Daniel Lezcano , Laurent Pinchart , linux-kernel@vger.kernel.org Subject: Re: [PATCH] clocksource/drivers/sh_cmt: access registers according to spec In-Reply-To: <20221130210609.7718-1-wsa+renesas@sang-engineering.com> References: <20221130210609.7718-1-wsa+renesas@sang-engineering.com> Date: Thu, 01 Dec 2022 11:55:40 +0100 Message-ID: <87pmd3s89f.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain 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 Wolfram! On Wed, Nov 30 2022 at 22:06, Wolfram Sang wrote: > Documentation for most CMTs say that we need to wait two input clocks > before changes propagate to the timer. This is especially relevant when > we stop the timer to change further settings. Implement the delays > according to the spec. To avoid unnecessary delays in atomic mode, we > also check if the to-be-written value actually differs. CMCNT is a bit > special because testing showed that we need to wait 3 cycles instead. > AFAIU, this is also true for all CMTs. Also, the WRFLAG needs to be > checked before writing. This fixes "cannot clear CMCNT" messages which > occur often on R-Car Gen4 SoCs, but only very rarely on older SoCs for > some reason. https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#changelog I fixed it up for you this time... > Fixes: 81b3b2711072 ("clocksource: sh_cmt: Add support for multiple channels per device") > Signed-off-by: Wolfram Sang > --- > > Changes since RFC v2: > * use DIV_ROUND_UP also for caluclating cmcnt_delay > * remove a FIXME comment > > There were no further comments, so I dropped the RFC status and send > this as a regular patch. Here again the introduction from RFC v1: Instead of quoting, it would have been helpful to have the lore links for RFC v1/v2.... Thanks, tglx