Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1918612ybd; Sun, 23 Jun 2019 20:04:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJlc808jHQIxYSAbJdyJB5kCLTSi6ZBbLATes745JsJPR+tVx/sWXV+42b6dlbXVqEJSHP X-Received: by 2002:a17:902:a40c:: with SMTP id p12mr6378707plq.146.1561345486157; Sun, 23 Jun 2019 20:04:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561345486; cv=none; d=google.com; s=arc-20160816; b=DvsGgiwMQblIrKyzyISpxGsTEXL2QNr78zKAdd+4p5zzGKQjHUR4QWeeG3oZm8qoJW TNVDLVBawyS8CZNj89xaZxA2I/VtJwLRIXV9/tv5yqh01eHHVonXpZDo0L9qFoXLrkQY JIm50Z0sj2F2i/OrzLgHrS2ZOQKLAp1jCkskaV0LPUVQvBQ+Bu9CtwnMxVSBhCBPlX/A uzlyKTQROywREvO7Jr5lQn8/5iC6d7xgLG78Du1FbBqQc4AJZUwER7XFvhXH8UslN2iB KtbqVuu3BNEKiyvinkPstjSV45lcLo88DFga04tNAtbRuK+ZQSDZ6LrXyR5aKAWSG+1S M5EA== 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=ihgdE/hdMdWVcELp9MQuNvKylmS/JKmYJjLEBJggCMw=; b=dxqi1jlk219X936l/W1eni6AFnART20TddeRCGR9gcQ44QTnhbb2K1hrm3X6cEZIxW d0/LAv6e6+cNKHM5rWQjW6ub1KmxFPLkbdjtu9fT6ql8eUYj1GesAxT6CvIxebo3ZQPZ 5Scyqp6iTu+cOwdj0sixOOykdM9sOulEf1v6MN274Jh9DGxy9x1fsSiUAasVWRli51D8 UekpFqq8R7ZFtN+ETJaN53Rmr6yJkis0cdachm27oOpmrMSwfPhk2aCzxODAGtNerGhO ZQlN/0Dmkwjx6rT9xH/NvFpbllpZSo+Cl9GHIbwkQj1JcyQWlfEvXqxQscUg1swLQeI1 Ytdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=W1++0F0H; 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 6si9346304plb.345.2019.06.23.20.04.31; Sun, 23 Jun 2019 20:04:46 -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=W1++0F0H; 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 S1727525AbfFXDDh (ORCPT + 99 others); Sun, 23 Jun 2019 23:03:37 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:17306 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727142AbfFXDDf (ORCPT ); Sun, 23 Jun 2019 23:03:35 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 23 Jun 2019 20:03:32 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Sun, 23 Jun 2019 20:03:34 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Sun, 23 Jun 2019 20:03:34 -0700 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 24 Jun 2019 03:03:33 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Mon, 24 Jun 2019 03:03:33 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.2.174.126]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Sun, 23 Jun 2019 20:03:33 -0700 From: Sowjanya Komatineni To: , , , , , , , CC: , , , , , , , , , , , , , , , Subject: [PATCH V4 11/18] clk: tegra210: use fence_udelay during PLLU init Date: Sun, 23 Jun 2019 20:02:52 -0700 Message-ID: <1561345379-2429-12-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1561345379-2429-1-git-send-email-skomatineni@nvidia.com> References: <1561345379-2429-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=1561345412; bh=ihgdE/hdMdWVcELp9MQuNvKylmS/JKmYJjLEBJggCMw=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=W1++0F0HFrWX1GYDKAyFaiCo2pEthp6SFzjSNQVYWIV2wLwaeFX5devRnG9wRubHf GXpSRNL5euT4EmwBqxzlsHfPqwfnXxPANs+ajl+TvxmYI3uBSKG5TFLpUvxRtqjK7Q XH5Ep+G0KBqhdTTkYbFe3bhYK4hBCWqAqnM74AKiVMWvDOkLFeVsrKZ76bU3ek6NY5 M0zKP/9XgR7W14Ma3C9enNpue462P5u3IRGAfhd6aSZbhTGu59IG3rH0HnaeEt6py1 wEDIlJaV6WggESpPPYT9TXe+9HhlVoU5YNX2I7D/X7bXPVcTvzbuDPjYvkvBpjcXVS 1+A27nEHJAKRA== 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. 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 ac1d27a8c650..c414cd72d045 100644 --- a/drivers/clk/tegra/clk-tegra210.c +++ b/drivers/clk/tegra/clk-tegra210.c @@ -2836,7 +2836,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); @@ -2844,7 +2844,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); @@ -2890,12 +2890,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