Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1838564rdb; Mon, 9 Oct 2023 04:54:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEmQ3ozdgef7tYjRgW9aDxcekLMXsbMk4scrlGie/OZK3Hjn5ug00WbF3tHD1/OIRufTiF0 X-Received: by 2002:a05:6a21:7892:b0:12c:2dc7:74bc with SMTP id bf18-20020a056a21789200b0012c2dc774bcmr18462085pzc.46.1696852467925; Mon, 09 Oct 2023 04:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696852467; cv=none; d=google.com; s=arc-20160816; b=WZaqFuJJ1gwvZEmWmAc3jCKs6WrRyuC+v0zzgsxhHzxPzcgLU+uvfvOjU4nqYMDw36 vicJIe2xbwIIpkdz8T6T5PK7A08i0myMjKvRpnV3TUSTEifh9ryTxba6h2TLi/O+BGho e8E9DSlo+Gz6rW+4XB9gbSzgaV8zNsgpQIRK8xfBcdqWNf6gjUBLgOZ+FsitgDRu1w9Y OzdC4BvsU+jGDx1lwcJaAcLivmc4sKslgKjxXoo4RYjnpXk5MgB2hN0PXHI5GZG7SlT4 k6AdIXOKCU3cL3qiDyM0HfffckJhsjyVYOZWTjoKoANBBLTV6OYL1Xfqd9B7L0t86Mk5 RIGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=DdLkNC7pZjog7HHK4Yf2GUW7vbfYmQYFSGir0sUFmhU=; fh=hyq4/cg3cyJPG9FkRgjIyOYkSEIcnpnz+ZVQCGwZFFw=; b=gLqv6QObI6ap8M5rjS6diSLtaQZbWc/askL8Wwv9JlFIlHg4fUpo4BOQEzcxO7iHDZ lJm9dDRJmwnFdmm66e3GymjlOD1GbkwQSU/Xj7C54m+sfGnJ4ZGBsF4kCWEZG6mO4Ybk 47BfpwYhM6X0AguterVNPIA+Ph2htAhchM2vHcrh533UtGgQe6Y7ZydTDzD4vE7wtH0E 61L5bac5HGQ24x/p0/hWoARaz4UXHNMAihhesHMXJkWgF7637p0QUYnkEwktS1nzQsaY aBGiBFZRfAwBOaQdd8iOvk1/gRlv5v5JdDek9wpq3JCzzKNH+I+gIAC/xc/RTko+C1iD fBDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id f20-20020a63f114000000b005644a9be955si9344300pgi.179.2023.10.09.04.54.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 04:54:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5D6AF8021779; Mon, 9 Oct 2023 04:54:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346334AbjJILyP convert rfc822-to-8bit (ORCPT + 99 others); Mon, 9 Oct 2023 07:54:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346281AbjJILyN (ORCPT ); Mon, 9 Oct 2023 07:54:13 -0400 Received: from mail-yw1-f172.google.com (mail-yw1-f172.google.com [209.85.128.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE1FFA6; Mon, 9 Oct 2023 04:54:11 -0700 (PDT) Received: by mail-yw1-f172.google.com with SMTP id 00721157ae682-5a505762c9dso54479987b3.2; Mon, 09 Oct 2023 04:54:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696852450; x=1697457250; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kqRLvJ9E18i5qflSJgpevFkrZOvSMrfws5EIbB8TTXc=; b=Mby2FKqfdTwst4svNa34Bfyu3nxCAJ8vXdd1M+GjRpQaMIBPUeKyDq4Pr2agBnGd2x Wk6fzqfo/Uk3D1+YuFvVCNhRfIIz5a98hjEgR6OwpOf0YNff/n3xMI+NXJBW2Qfu1Psm lMZD84eeGfJI93htpp1aTGEpE3kpJsOkGOPvuUfAvmwRz3rmutJwztuCk50+3SmOhONG 72EDlCPmyZW4ouGI4Ll9EDnF+gD6iOsYHSiwCqcQl3Rc9aWX0M3FRjvz2LVXMiQ7Zj/S poHnmiR+sD4msDdi3voW4iTlpNRtNGurkD2rTJ6QUZEpvQufgdj3mdPurjHVTPggPgOW oF+A== X-Gm-Message-State: AOJu0YzTjWFU7tprlncYt0oNCYXDbn5OzWmHVjUGhFU3tpp+tNsGQ3yo waX3kXPwCvcwiCMZJvnagcZnm/oUrZJxWA== X-Received: by 2002:a05:690c:a08:b0:5a7:af51:e274 with SMTP id cg8-20020a05690c0a0800b005a7af51e274mr109825ywb.18.1696852450604; Mon, 09 Oct 2023 04:54:10 -0700 (PDT) Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com. [209.85.219.181]) by smtp.gmail.com with ESMTPSA id r7-20020a815d07000000b00583b144fe51sm3648088ywb.118.2023.10.09.04.54.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Oct 2023 04:54:10 -0700 (PDT) Received: by mail-yb1-f181.google.com with SMTP id 3f1490d57ef6-d91a7999d50so4894362276.3; Mon, 09 Oct 2023 04:54:10 -0700 (PDT) X-Received: by 2002:a05:6902:1890:b0:d89:4368:aa1 with SMTP id cj16-20020a056902189000b00d8943680aa1mr18075370ybb.53.1696852450080; Mon, 09 Oct 2023 04:54:10 -0700 (PDT) MIME-Version: 1.0 References: <20231006103959.197485-1-claudiu.beznea.uj@bp.renesas.com> <20231006103959.197485-4-claudiu.beznea.uj@bp.renesas.com> In-Reply-To: <20231006103959.197485-4-claudiu.beznea.uj@bp.renesas.com> From: Geert Uytterhoeven Date: Mon, 9 Oct 2023 13:53:58 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 3/4] clk: renesas: rzg2l: add a divider clock for RZ/G3S To: Claudiu Cc: mturquette@baylibre.com, sboyd@kernel.org, gregkh@linuxfoundation.org, jirislaby@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, magnus.damm@gmail.com, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Claudiu Beznea Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 09 Oct 2023 04:54:23 -0700 (PDT) X-Spam-Level: ** On Fri, Oct 6, 2023 at 12:40 PM Claudiu wrote: > From: Claudiu Beznea > > Add a divider clock driver for RZ/G3S. This will be used in RZ/G3S > by SDHI, SPI, OCTA, I, I2, I3, P0, P1, P2, P3 core clocks. > The divider has some limitation for SDHI, OCTA and SPI clocks: > - SDHI div cannot be 1 if parent rate is 800MHz > - OCTA, SPI div cannot be 1 if parent rate is 400MHz > For these clocks a notifier could be registered from platform specific > clock driver and proper actions are taken before clock rate is changed, > if needed. > > Signed-off-by: Claudiu Beznea > --- > > Changes in v3: > - adjusted commit message to specifies that divider has limitations also > for SPI clock > - s/SD div/SDHI div in commit message > - return proper code from notifier > - used CPG_WEN_BIT where possible notifier and set explicitily 1 in div > notifier > - removed rzg3s_div_clk_is_rate_valid() and all its occurencies: it was > not needed in rzg3s_div_clk_set_rate() > - .round_rate was replaced by .determine_rate for the introduced divider > - initialized max variable in rzg3s_cpg_div_clk_register() > - introduced struct div_hw_data::max_rate to specify from the SoC-specific > drivers the maximum available rate for divider that will be requested > when a rate higher than this one is requested > - removed bitmask variable from notifier and rzg3s_div_clk_set_rate() > - added max_rate to DEF_G3S_DIV() macro > - tested on RZ/G2L and RZ/G3S Reviewed-by: Geert Uytterhoeven i.e. will queue in renesas-clk-for-v6.7. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds