Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6240279ybi; Sun, 21 Jul 2019 12:42:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqysjftBE7ZhElKWju7eMzGo+sSjHpFShYwSZxfnQT27X+uYqF+G0vRS0ov5ECnGTmy3sgF7 X-Received: by 2002:a17:90a:cb18:: with SMTP id z24mr22272131pjt.108.1563738175314; Sun, 21 Jul 2019 12:42:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563738175; cv=none; d=google.com; s=arc-20160816; b=RkVlVPdRIpzwcv0Uwrkr4PzlP8fzKTheC+3X1DOLWNNlnE5A2elpJCtEetLH/durIJ +oj0Ih0lqO2Y+DWP+tafm6WUAlO5r3FfhJFEms8Ob4CsGPt6Ol7C5f854qtkyrcPmaPo msZ/0K8VN+04vuynTkmZZiN3RYSdMoodgzSlGSnKf2CHrictHJ0xVHJzap0D3po+5EKF Qfe3Y9APdDQJx2SjQ7/1JwIq2m5D4/VxKwkx6gEdbhBWVgBgToECgj2iCgPR0MR7tZVf pIktF6UboeOPU0v3SmJckN7gRhBHviBxJEc2uW8smqXNfZHFHeStbbRDRv5nCoSbRqco OLOQ== 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=MqRiGcV15fZ3EzTQ+28GrOZLwzwn/Vk43BBlg4BM8S4=; b=Xs7YFeX7B0uVOl9HsXxCnKgpRDwPRJt8KUl0aWKZCbvpIF2MBrb78VF1WIDN+TUHYY cC3Suqb3DJ7Sb5U5VvHYb7fn4lBNOEnv0XTSwJoMEHZVCSvi4FoWdznYiVn4LelKhTzK sIWscEcJ6Bd2DLYmUvm6nVDfxaIvDQgKpv9nvC4+3LTiIjBH9S2FP24J4wBGmMeHMaha SHkPkH2cQBst0nJIKPSdgaA+25+QbOXnqwQp2cqHNO3ayqMkdUtBXZa2idaRM+wlVNmb 0bWJoQ/2YF4emwsCrxX0KiU/4XCkQvuiSVM1LBmC95K4eM/HaSyb1MfmUExN7T5aVDsz Tn0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=Nz7jF2mv; 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 x126si36768172pgx.356.2019.07.21.12.42.39; Sun, 21 Jul 2019 12:42:55 -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=Nz7jF2mv; 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 S1727744AbfGUTlS (ORCPT + 99 others); Sun, 21 Jul 2019 15:41:18 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:9018 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727647AbfGUTlM (ORCPT ); Sun, 21 Jul 2019 15:41:12 -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, 21 Jul 2019 12:41:09 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Sun, 21 Jul 2019 12:41:11 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Sun, 21 Jul 2019 12:41:11 -0700 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 21 Jul 2019 19:41:11 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sun, 21 Jul 2019 19:41:11 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.2.164.85]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Sun, 21 Jul 2019 12:41:11 -0700 From: Sowjanya Komatineni To: , , , , , , , CC: , , , , , , , , , , , , , , , Subject: [PATCH V6 13/21] clk: tegra210: Use fence_udelay during PLLU init Date: Sun, 21 Jul 2019 12:40:52 -0700 Message-ID: <1563738060-30213-14-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1563738060-30213-1-git-send-email-skomatineni@nvidia.com> References: <1563738060-30213-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=1563738069; bh=MqRiGcV15fZ3EzTQ+28GrOZLwzwn/Vk43BBlg4BM8S4=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=Nz7jF2mv9CLzYSb3lx2v+Ffjpd7QmI+2f113dGNa7IzSKCmcFpUJzQc1P57ijuLD+ JAyJ3yCsujN5FwmwpuVNfTklJBydUbZiww8skquTnS0WntqMWps0pFLTVFPvdVXuTR LCKGRR4FldthdjmuDyjQf80BGCTQZmP1yomCTpneqlDRPbXoLdoIAF6V4JcizWWzhk ck1R/HK0DHau+GSPpyu9evpsHqrZeu5VccnEDnJlS6jODE2lWcRbR1dW0kWKEIq6J/ b58oUO89zQPG4tprSuLhWJ2/0KbXL8CNnwxtNm/iKaIdZ3SR/Y5GNEDYR9pD6UzxU1 q/Wfr2F1TUsHg== 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 58397f93166c..55a88c0824a5 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