Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5266292ybi; Tue, 30 Jul 2019 17:25:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlVFrR4lrD7gvCESadtkkrunvTFG1lkkqKKd+6nstRvydoXsBYUbhIs2HDsPLplRpmFq8q X-Received: by 2002:a63:fe17:: with SMTP id p23mr13101458pgh.103.1564532723238; Tue, 30 Jul 2019 17:25:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564532723; cv=none; d=google.com; s=arc-20160816; b=SRrQOsMywaNqaB7p+5zUu+1RyfgwKcjmTlWuvTKH2/NwHGcXTz/Cdo0/6A6P1Bo4Zd dSULjRY7OQ88g+e8P9MzBsmrIoA/Q54R3xqrFzgvEJepLjaC/iodqrLhVB1HBif8FnvM GgajEnFgu9m49Qtf6Mbr12MziUqZwsEkx417/u5jTb47D0gQZYcNLZqPbMPIXbEl3LL8 UQdo/aXbaZUyQbkwfjwoXCcxVkxBIrw+cJN+Xlyb8+vDDcM4XMyjcXwy6aUYEae52xPJ ZI8Agz0QcgZCsR1nGLLTNLuyxZrWl8duniz7bnFiyFDfOnSSBzW2x/iFKKd9u9KhC1h8 ddjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=RJjtD/wR8zo8cV5BUXlwlwAAOA63IpXqmMNKlX37eJo=; b=dAicXkA1T6V6qM+4K1RSGqzegvnKMOf0imEc5PRinXkNq7sRhF31jhdtx4bB3k02Ze 3jNxYjUy40N3NjFgWDOM9ajma4a2Ld9Ht26jOpB5i0loAlVdffZMxL5DbbLRQne0DBhV zXI3EL7XQhwdzvb6dyIPMFCGPXcwZrpmzBxGkKh14iu7Tmgk6j7/UVUjSY4BRiXb5FYf Rh2lGYUNzSBbrtolo/uyl6rwiMYvR5NIllckEMJzY1OjcYykSOVZ6GpmhTWsyv4B9za4 r3PeqdPl7HfSZvdCNApUPYaRjugjAHk5WepSTFSTXc2V2BAsMaolSRaBmXSJnDHjmdY8 liZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=bQh1wet8; 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 o13si17427pjr.101.2019.07.30.17.25.08; Tue, 30 Jul 2019 17:25:23 -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=bQh1wet8; 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 S2387509AbfGaAVi (ORCPT + 99 others); Tue, 30 Jul 2019 20:21:38 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:1894 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728121AbfGaAUc (ORCPT ); Tue, 30 Jul 2019 20:20:32 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Tue, 30 Jul 2019 17:20:31 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Tue, 30 Jul 2019 17:20:31 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Tue, 30 Jul 2019 17:20:31 -0700 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL104.nvidia.com (172.18.146.11) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 31 Jul 2019 00:20:31 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 31 Jul 2019 00:20:30 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.110.103.107]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Tue, 30 Jul 2019 17:20:30 -0700 From: Sowjanya Komatineni To: , , , , , , , CC: , , , , , , , , , , , , , , , Subject: [PATCH v7 12/20] clk: tegra210: Use fence_udelay during PLLU init Date: Tue, 30 Jul 2019 17:20:16 -0700 Message-ID: <1564532424-10449-13-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564532424-10449-1-git-send-email-skomatineni@nvidia.com> References: <1564532424-10449-1-git-send-email-skomatineni@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1564532431; bh=RJjtD/wR8zo8cV5BUXlwlwAAOA63IpXqmMNKlX37eJo=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=bQh1wet8xLOyHYU1EFAwQUYqZiS3BrMa+A9p/PGQltZPLRTdfHYwAMsdVW2/bP1AV ed0aUN5yIfk0FkFlvgaEDK53DctqXz1irk++X9V0vd91V3gicKIIBvAoHdgJYh1Sj1 BkdxFgxNc4hV4q9M9jpN29g1WdIlQrvZQ2jVShrX3JGgmMygMWtdyi0Tu1EYDpOqYr H2MeSocG/m5SRhtgqxZtGDOG+Aty3j3awvUe9KOwuCry8bj04kqW+FOeTPXER851vd WvL96Kfbz63mzonRdhA0AXezvw4BufQaQ/Ic+EfvzQdcdh/Y6mByX91pvKypoaKoa8 YaPaQGCtqUR7w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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-tegra210.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 = readl_relaxed(clk_base + pllu.params->ext_misc_reg[0]); reg &= ~BIT(pllu.params->iddq_bit_idx); writel_relaxed(reg, clk_base + pllu.params->ext_misc_reg[0]); - udelay(5); + fence_udelay(5, clk_base); reg = readl_relaxed(clk_base + PLLU_BASE); reg &= ~GENMASK(20, 0); @@ -2849,7 +2849,7 @@ static int tegra210_enable_pllu(void) reg |= fentry->n << 8; reg |= fentry->p << 16; writel(reg, clk_base + PLLU_BASE); - udelay(1); + fence_udelay(1, clk_base); reg |= PLL_ENABLE; writel(reg, clk_base + PLLU_BASE); @@ -2895,12 +2895,12 @@ static int tegra210_init_pllu(void) reg = readl_relaxed(clk_base + XUSB_PLL_CFG0); reg &= ~XUSB_PLL_CFG0_PLLU_LOCK_DLY_MASK; writel_relaxed(reg, clk_base + XUSB_PLL_CFG0); - udelay(1); + fence_udelay(1, clk_base); reg = readl_relaxed(clk_base + PLLU_HW_PWRDN_CFG0); reg |= PLLU_HW_PWRDN_CFG0_SEQ_ENABLE; writel_relaxed(reg, clk_base + PLLU_HW_PWRDN_CFG0); - udelay(1); + fence_udelay(1, clk_base); reg = readl_relaxed(clk_base + PLLU_BASE); reg &= ~PLLU_BASE_CLKENABLE_USB; -- 2.7.4