From patchwork Mon Oct 13 10:21:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 5075091 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B6D7C9F387 for ; Mon, 13 Oct 2014 10:22:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0105F20204 for ; Mon, 13 Oct 2014 10:22:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 23375201F5 for ; Mon, 13 Oct 2014 10:22:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D67E89FE3; Mon, 13 Oct 2014 03:22:10 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 7161B89FE8 for ; Mon, 13 Oct 2014 03:22:07 -0700 (PDT) Received: by mail-wg0-f41.google.com with SMTP id b13so8326373wgh.12 for ; Mon, 13 Oct 2014 03:22:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cUFOaCoWEfu9938jZRmdCXEF2T+4dAkhoChNhBOZAKk=; b=e2M9AM6gzpngTBc+B9kMCXEq/SURooNLFzf9yH+sOktCPea+BJKpjq3O2ixxuaqbrg kPD/ZILJanz/i3e0K+9C/baQvKUP/mUwEfZROT/Edu9RjT1g4kdVrLyI38rnC8XeM7lC oNb44njSWb+mYj9VlNTW5ipDvQCBhOCZ7CGxxS5dJxeywfw9RuJRKt0U7vtYJNNNbbVC dDNl2AC707ygrVV28/Arp+NKffnc1+r5XVac3VOUtJogp4kvJrAOUcu5bdC1t14N1zxw 3ptVmyNtTDAJFZgSnCAnJnWTDaFVbt86AVknZkn5gOAUcbIft89iUvNR7rOjkKbfUubX KsLw== X-Received: by 10.180.101.134 with SMTP id fg6mr19892566wib.9.1413195726748; Mon, 13 Oct 2014 03:22:06 -0700 (PDT) Received: from localhost (port-4359.pppoe.wtnet.de. [84.46.17.24]) by mx.google.com with ESMTPSA id bc5sm14168505wjb.14.2014.10.13.03.22.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Oct 2014 03:22:06 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [PATCH 07/14] gpu: host1x: mipi: Preserve the contents of MIPI_CAL_CTRL Date: Mon, 13 Oct 2014 12:21:48 +0200 Message-Id: <1413195715-4719-7-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1413195715-4719-1-git-send-email-thierry.reding@gmail.com> References: <1413195715-4719-1-git-send-email-thierry.reding@gmail.com> Cc: linux-tegra@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Paul By paving the CTRL reg value, the current code changes MIPI_CAL_PRESCALE ("Auto-cal calibration step prescale") from 1us to 0.1us (val=0). In the description for PHY's noise filter (MIPI_CAL_NOISE_FLT), the TRM states that if the value of the prescale is 0 (or 0.1us), the filter should be set between 2-5. However, the current code sets it to 0. For now, let's keep the prescale and filter values as-is, which is most likely the power-on-reset values of 0x2 and 0xa, respectively. Signed-off-by: Sean Paul Signed-off-by: Thierry Reding --- drivers/gpu/host1x/mipi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/host1x/mipi.c b/drivers/gpu/host1x/mipi.c index a3e215a0116f..0d8c3ae8db6a 100644 --- a/drivers/gpu/host1x/mipi.c +++ b/drivers/gpu/host1x/mipi.c @@ -208,7 +208,9 @@ int tegra_mipi_calibrate(struct tegra_mipi_device *device) tegra_mipi_writel(device->mipi, value, modules[i].reg); } - tegra_mipi_writel(device->mipi, MIPI_CAL_CTRL_START, MIPI_CAL_CTRL); + value = tegra_mipi_readl(device->mipi, MIPI_CAL_CTRL); + value |= MIPI_CAL_CTRL_START; + tegra_mipi_writel(device->mipi, value, MIPI_CAL_CTRL); err = tegra_mipi_wait(device->mipi);