Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2963775ybl; Sun, 11 Aug 2019 12:18:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNPQMulnLY1DwWXC1XXvYonDQEZffDJRt1OUx2M2iiqarekppyNa1WNUKSlwsvTA5ZPo19 X-Received: by 2002:a63:f401:: with SMTP id g1mr28114226pgi.314.1565551082999; Sun, 11 Aug 2019 12:18:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565551082; cv=none; d=google.com; s=arc-20160816; b=RBZHgYBlmUF1ub2Vs1LhamYuGCq5bgwJAVArI7TcNdU6GLiVM/0sngyUI6rFDIir3l PYnPSqJPhZ9gA0s6eqWU6hF8MV5bp3GUApRtsVzROkQgPPDmlwbCl5XlS5JA+9ScMugB hvgmbqoGbZvDXwBwiX5718r76hW1dJkZOn9A3pUJ7L68pb3Bp21DRO63GfIX23zs6Poz PE4yUa/S4jlyL33mi+l3JS6Y/ifWheI1j73nA2oDN2VjnCEW8ixj7AVNqdpVfqxKKYyi vbNQpBQ4p+aqjQHtNk8mDvvYjMSrK/BiYtgiCJxFd2T1vZ5Yxo32yLvP6L1maTSdneWM +upw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=B6ddjnEKl0ua+Tada6d8Tb7SUSLehPfPuF8MM3YYMj8=; b=Ydh+C86jDZI6WbVlkPN8Wwt23cnkGb3O2UG7T6MvGmGfozJrLDYNY9b/1GXzrRA32N HvsEYIdQtjAqFOpx5PjDQVRLKBw68BnyUoZFM1U6oQeo9QYIiKdb0+yCqVI+xepYvRi5 uBYeGavlMO67/ijkUPt+TtEQTVSZ3jz/OOopmG2vU28jZT91J4Nqyx894qrvbK3Kr+LJ qDkAXnBjJpUmV8npy1QB8Q26M4h/6QHGMvz6zG8/6Fw33QkWvQd7eivuy8gss2/oGfi4 KWNpQAbjRIS5UFy0VCsBDebyAqO64Fmb3YeEZ7hYmbiI+XFBfqCvktB5/tYaq2LPu05p QSjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=K6ERdW8y; 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=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r10si24761630pgs.474.2019.08.11.12.17.47; Sun, 11 Aug 2019 12:18:02 -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=@nvidia.com header.s=n1 header.b=K6ERdW8y; 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=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726519AbfHKTQx (ORCPT + 99 others); Sun, 11 Aug 2019 15:16:53 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:14883 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbfHKTQx (ORCPT ); Sun, 11 Aug 2019 15:16:53 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 11 Aug 2019 12:16:54 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Sun, 11 Aug 2019 12:16:52 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Sun, 11 Aug 2019 12:16:52 -0700 Received: from [10.2.167.88] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 11 Aug 2019 19:16:50 +0000 Subject: Re: [PATCH v8 13/21] clk: tegra210: Use fence_udelay during PLLU init To: Dmitry Osipenko , , , , , , , , CC: , , , , , , , , , , , , , , , , References: <1565308020-31952-1-git-send-email-skomatineni@nvidia.com> <1565308020-31952-14-git-send-email-skomatineni@nvidia.com> <1d09a2c5-4973-340f-fdfc-d4e665c8b55d@gmail.com> From: Sowjanya Komatineni Message-ID: Date: Sun, 11 Aug 2019 12:16:49 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <1d09a2c5-4973-340f-fdfc-d4e665c8b55d@gmail.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1565551014; bh=B6ddjnEKl0ua+Tada6d8Tb7SUSLehPfPuF8MM3YYMj8=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Transfer-Encoding: Content-Language; b=K6ERdW8yThtfsPaINCIqakd5gFwkxjyduawu95MVejzx32Fq0TqO1jaMsLabDvmE5 /DFiAeD/BMuLmfdN3gkXnnb1GTiQ32zkFxz8IiH3pP6C6ORCCdE4/Bl5BGtZKn07hj U4kFIXRuMra4yyN3wXhdMtXeNfFVCBIgcc/YKPqAy3I57uYbrOVBVwDUXNFBfoW1Jv jDRLNih5SeR2PIhu0BznbHvZRZcF69Cm0yhf0za2gRcFZJKgOBz6JxJGgC9MqWqUum Bd63yHkGj5tyui/8MEMsf79d8GtFQCboBZQCglK65t40mmcM++wpwhVvbDfOmT69j5 xtlCDuflo1isA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/11/19 11:02 AM, Dmitry Osipenko wrote: > 09.08.2019 2:46, Sowjanya Komatineni =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> This patch uses fence_udelay rather than udelay during PLLU >> initialization to ensure writes to clock registers happens before >> waiting for specified delay. >> >> Acked-by: Thierry Reding >> Signed-off-by: Sowjanya Komatineni >> --- >> drivers/clk/tegra/clk-tegra210.c | 8 ++++---- >> 1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/clk/tegra/clk-tegra210.c b/drivers/clk/tegra/clk-te= gra210.c >> index 4721ee030d1c..998bf60b219a 100644 >> --- a/drivers/clk/tegra/clk-tegra210.c >> +++ b/drivers/clk/tegra/clk-tegra210.c >> @@ -2841,7 +2841,7 @@ static int tegra210_enable_pllu(void) >> reg =3D readl_relaxed(clk_base + pllu.params->ext_misc_reg[0]); >> reg &=3D ~BIT(pllu.params->iddq_bit_idx); >> writel_relaxed(reg, clk_base + pllu.params->ext_misc_reg[0]); >> - udelay(5); >> + fence_udelay(5, clk_base); >> =20 >> reg =3D readl_relaxed(clk_base + PLLU_BASE); >> reg &=3D ~GENMASK(20, 0); >> @@ -2849,7 +2849,7 @@ static int tegra210_enable_pllu(void) >> reg |=3D fentry->n << 8; >> reg |=3D fentry->p << 16; >> writel(reg, clk_base + PLLU_BASE); >> - udelay(1); >> + fence_udelay(1, clk_base); >> reg |=3D PLL_ENABLE; >> writel(reg, clk_base + PLLU_BASE); >> =20 >> @@ -2895,12 +2895,12 @@ static int tegra210_init_pllu(void) >> reg =3D readl_relaxed(clk_base + XUSB_PLL_CFG0); >> reg &=3D ~XUSB_PLL_CFG0_PLLU_LOCK_DLY_MASK; >> writel_relaxed(reg, clk_base + XUSB_PLL_CFG0); >> - udelay(1); >> + fence_udelay(1, clk_base); >> =20 >> reg =3D readl_relaxed(clk_base + PLLU_HW_PWRDN_CFG0); >> reg |=3D PLLU_HW_PWRDN_CFG0_SEQ_ENABLE; >> writel_relaxed(reg, clk_base + PLLU_HW_PWRDN_CFG0); >> - udelay(1); >> + fence_udelay(1, clk_base); >> =20 >> reg =3D readl_relaxed(clk_base + PLLU_BASE); >> reg &=3D ~PLLU_BASE_CLKENABLE_USB; >> > The clk_base corresponds to the RESET controller's part of Clock-and-Rese= t hardware, is it > okay to read-back the RST register and not the clock for the fencing? Yes as both reset and clocks are all in same CAR