Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2031997rdb; Tue, 3 Oct 2023 08:18:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEiwOOW1gB52EV3sw659oyWSFma84T/eBP6K+NxvBnzodKhbgXjUsZ8IfsPkiY8B1+z6Xph X-Received: by 2002:a05:6e02:ec3:b0:350:f352:4853 with SMTP id i3-20020a056e020ec300b00350f3524853mr13381818ilk.25.1696346315845; Tue, 03 Oct 2023 08:18:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696346315; cv=none; d=google.com; s=arc-20160816; b=u0/PGRuQkhYWIi71byvdMKT/7/1VyjNjZwJtxJXwmTIagRHrURS46pYb78SU/ao0Xf 2w4DnpzYMXCy/+bJc2F8Jp8fgmZO/X603E8l3id5qsj1MGuVQbit758m+CEyp6/LKT4b hxd2oMXwDrOY0F/X+WTHb/DH/wwXe/L7Nc2/qslMBYb1FjeuB3czLvlrhBI3bbSo4064 /Mv4pvjzQ5KAmFpvuzUeBYgNfXXd5cXXEubWoV7TgPbOPaR1p8pSR2or4D8DLW6J5o4h 53DmBMGoZhb2uLIBF2RX4BxKpQi6lRK8ICt0dJj8i10kohWtqGPd1R1BGAtZa8lxFCrG 6PvQ== 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=lev3FMPnmHZRj9CYNS4hHJX59+GUuBlVBjCV2Vsyf4c=; fh=h0ui9ha+9HcYmS9uklzEW0ZJ1j34pDNuxEyPi9+DJts=; b=lynjGW5cRNlS1ayyy9DkIBVAP3RsEoKJ7lUTVLNc9usntwmlnjPhmqqiU5vjY81rP8 xK1BHOjPlkM/8UUruL2EADyrIuyKmohnWQkJXJPH6KKMbYd/9waNJoVqLaIOLkPgC2O3 9qT64mYifvBmKlOh/Hge6LSQbkRk0Q7O90YqCe46tVnNuiTaN8TXpK41c7eOlvFhYn9W G6sgI0kvjA/ZqKnTSVfwYTIYh6kXYDYu2vfcHEzdD4AJ5i5SdllhHxy+n3HYFZz9fWLU uy4O0Ji+VYvPO1JkKcX2mx2Jzx6rY0KPpr19HOR4SJ9acdLV3oQE4fLAqaWm0AgfBYce rVEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id n21-20020a638f15000000b0057760853706si1702016pgd.578.2023.10.03.08.18.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 08:18:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 69EC98135D4B; Tue, 3 Oct 2023 08:18:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231394AbjJCPS1 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 3 Oct 2023 11:18:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbjJCPS0 (ORCPT ); Tue, 3 Oct 2023 11:18:26 -0400 Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 675EBA7; Tue, 3 Oct 2023 08:18:22 -0700 (PDT) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-59c215f2f4aso13103047b3.1; Tue, 03 Oct 2023 08:18:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696346301; x=1696951101; 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=llcysd4Rlfv/obk2nm1Hbq1W0IWft6DG1QN8/F4FkXk=; b=ZIysWZHQTdLUY2BYBdWpcFYrN6Z0YWILUU2hvEuv5XTU7Gslv/iWaOnBdUv5gh3Ip9 KLBWf5LaK+sLeq114VXqz8Rr2uKT7k0EpiAD3YQ3GXhG/xFbDBcP2/rKEPs41puljEnR x0/ybSgTh5bYULdxlH480tjoTb2WCRQcjZhhM4aI8v2g6OszCw72mNk+1ef/N3bGkCGV QcCJr1pdIC0YEu3F/4b4XtOl+ox4nUPC4Cqzh72x/nF15MsPurJnS/WRomuufsgWSMIy 6Anb7N7XZG/WfrsYJI3ZNpqrxJcWqkpof2s56PnFwjqB+20dqFFg85UYfi4EmcGCI8LP ZozQ== X-Gm-Message-State: AOJu0YyXos/IWeptcZuaB2+DRAVXod9sdKoOSMvL3QNEw6nxYR3mN3IT TyUcds2JfzmWJ5Cyjq8geicQ/OrRReo7fA== X-Received: by 2002:a0d:e688:0:b0:5a1:d0fe:e44b with SMTP id p130-20020a0de688000000b005a1d0fee44bmr14197971ywe.11.1696346301345; Tue, 03 Oct 2023 08:18:21 -0700 (PDT) Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com. [209.85.128.175]) by smtp.gmail.com with ESMTPSA id x9-20020a814a09000000b005463e45458bsm443078ywa.123.2023.10.03.08.18.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Oct 2023 08:18:19 -0700 (PDT) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-59bf1dde73fso12950057b3.3; Tue, 03 Oct 2023 08:18:18 -0700 (PDT) X-Received: by 2002:a25:213:0:b0:d80:1604:f6e9 with SMTP id 19-20020a250213000000b00d801604f6e9mr12784141ybc.44.1696346298461; Tue, 03 Oct 2023 08:18:18 -0700 (PDT) MIME-Version: 1.0 References: <20230929053915.1530607-1-claudiu.beznea@bp.renesas.com> <20230929053915.1530607-4-claudiu.beznea@bp.renesas.com> In-Reply-To: <20230929053915.1530607-4-claudiu.beznea@bp.renesas.com> From: Geert Uytterhoeven Date: Tue, 3 Oct 2023 17:18:06 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 03/28] clk: renesas: rzg2l: lock around writes to mux register To: Claudiu Cc: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linus.walleij@linaro.org, gregkh@linuxfoundation.org, jirislaby@kernel.org, magnus.damm@gmail.com, catalin.marinas@arm.com, will@kernel.org, quic_bjorande@quicinc.com, konrad.dybcio@linaro.org, arnd@arndb.de, neil.armstrong@linaro.org, prabhakar.mahadev-lad.rj@bp.renesas.com, biju.das.jz@bp.renesas.com, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 03 Oct 2023 08:18:33 -0700 (PDT) On Fri, Sep 29, 2023 at 7:39 AM Claudiu wrote: > From: Claudiu Beznea > > SD MUX output (SD0) is further divided by 4 in G2{L, UL}. The divided > clock is SD0_DIV4. SD0_DIV4 is registered with CLK_SET_RATE_PARENT which > means a rate request for it is propagated to the MUX and could reach > rzg2l_cpg_sd_clk_mux_set_parent() concurrently with the users of SD0. > Add proper locking to avoid concurrent access on SD MUX set rate > registers. > > Fixes: eaff33646f4cb ("clk: renesas: rzg2l: Add SDHI clk mux support") > Signed-off-by: Claudiu Beznea > --- > > Changes in v2: > - adapted delay_us to 10us > - adapted CPG_SDHI_CLK_SWITCH_STATUS_TIMEOUT_US to 200us; tested > with this adjustements on RZ/G3S and RZ/G2L SoCs 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