Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1316552ybl; Fri, 16 Aug 2019 12:43:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjm1pj9VYTJs6EvibI3Kk7HCWPpQYbc0vX8Vb3fydqi5T9rcOCmAdd1pwOr7FWfXDv6spU X-Received: by 2002:a17:902:524:: with SMTP id 33mr11035842plf.27.1565984592579; Fri, 16 Aug 2019 12:43:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565984592; cv=none; d=google.com; s=arc-20160816; b=AHC7U+IEdB1UT/qa/mvbd0+MLw7BZuhk5IacP+E6V9W3F/9oQs9BBk/P6tGlfGTSdS /xQSAUQDC2c2uHVkso1FUR7MgcoOapKwhQmfOwCPJl+0C0irzdJMyq30PD+JodQ2wSZU jg/0vmF4+jc/LY5d757Bh0wXBRQSJp5fdSbPkP216hsloMeJ6SLGc62qfxVTAHrhfEvB HaTmBuik1LWE3gdmoELzbm1YT8f4vsH4N68Vx44iriPWzY4GvMWJzTszo/0ugD3nMhCX hBRVRMH53YgByTEN4plVehqLLwv/y3p0JHqQzGZ11Q8qnlV3BDRnuOqK+gqM+REylxQh gGpQ== 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=VHDrtC8ZGPiMwrhvcDYGr1zYEWJZ5BoN1NN2rqR7JiI=; b=h6sj8YhcutAaxqqpSVARihH+zSPheULbUB8r7T+LBin+LJVtL2TEe14o6DYoH3f6W+ 7LFchoZaaOHaAaTRyKk1U3mbHl9YXexWuhgz1b7aTki+w8lWPkDlkzX8AFE0Pm1Z0EpJ zJquZOWZL1oYW35l1BDiW6eCe0zXXL79W6RH7f1iEHkTGI6/HLr9OfnlwzHsjZYhX/iv 2FAMouNJbzT24kyPiuXbtY9ckga68HhEvvg/oti5oErxW+AeOIbOigjPojo1NJ/c+Ovc 4Pf2je4t+9nf6RlqRq5gYoiohc0mYFU2CL7jZClbv6QrE25YRTqSVw86c314Tb5pkmAJ WG/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=WixfZAc9; 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 y16si4928755pfc.51.2019.08.16.12.42.56; Fri, 16 Aug 2019 12:43:12 -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=WixfZAc9; 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 S1727626AbfHPTmT (ORCPT + 99 others); Fri, 16 Aug 2019 15:42:19 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:13152 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727557AbfHPTmS (ORCPT ); Fri, 16 Aug 2019 15:42:18 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 16 Aug 2019 12:42:20 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 16 Aug 2019 12:42:17 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 16 Aug 2019 12:42:17 -0700 Received: from HQMAIL110.nvidia.com (172.18.146.15) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 16 Aug 2019 19:42:17 +0000 Received: from HQMAIL111.nvidia.com (172.20.187.18) by hqmail110.nvidia.com (172.18.146.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 16 Aug 2019 19:42:17 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 16 Aug 2019 19:42:17 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.2.166.126]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 16 Aug 2019 12:42:17 -0700 From: Sowjanya Komatineni To: , , , , , , , CC: , , , , , , , , , , , , , , , , , , Subject: [PATCH v9 02/22] pinctrl: tegra: Flush pinctrl writes during resume Date: Fri, 16 Aug 2019 12:41:47 -0700 Message-ID: <1565984527-5272-3-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565984527-5272-1-git-send-email-skomatineni@nvidia.com> References: <1565984527-5272-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=1565984541; bh=VHDrtC8ZGPiMwrhvcDYGr1zYEWJZ5BoN1NN2rqR7JiI=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=WixfZAc9ExfMuDT1FqsRjpvMy9ssde3X9yxS3uG4+KykQtCXbKSxO59f1LHwtsUU9 wa4qmlc4f9e2lXfQOkJ01TMwwe0kcBlycHstV374nDSqiLoy90BMzhsmGnDLMm9513 Wf/Kfcu5bhAh4kdrKeUgi/hbddwYBFceZ5Nc+hf9Usa3QYOSU2vOTuSdScrk62gSvl f1ZntADlZGmnNoTU/k/BCrRr9/+wNYWqX0gwNzTXiHv4uvgbljF/uRGU/dswHCOSTa qgwfHCSj0+BKz20KIKg9Njpw1azzVMrQJ+vu8VtVtzLRhUEL+yaTI0QR4Y2NW8WqoQ 3Cn0B4AzVjxRw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds pinctrl register read to flush all the prior pinctrl writes and then adds barrier for pinctrl register read to complete during resume to make sure all pinctrl changes are effective. Acked-by: Thierry Reding Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni --- drivers/pinctrl/tegra/pinctrl-tegra.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c index 5e3c00137d71..e9a7cbb9aa33 100644 --- a/drivers/pinctrl/tegra/pinctrl-tegra.c +++ b/drivers/pinctrl/tegra/pinctrl-tegra.c @@ -677,6 +677,10 @@ static int tegra_pinctrl_resume(struct device *dev) writel_relaxed(*backup_regs++, regs++); } + /* flush all the prior writes */ + readl_relaxed(pmx->regs[0]); + /* wait for pinctrl register read to complete */ + rmb(); return 0; } -- 2.7.4