Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2603918imu; Mon, 19 Nov 2018 03:17:16 -0800 (PST) X-Google-Smtp-Source: AJdET5fqpRH92z1y9Tla+oB4U2G9udfW3DQFxek3Gr7tKxRqSWm+adZvgCruf0uAYKMXMcYYhSkj X-Received: by 2002:a63:e20a:: with SMTP id q10mr19309847pgh.206.1542626236494; Mon, 19 Nov 2018 03:17:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542626236; cv=none; d=google.com; s=arc-20160816; b=TyRVNwl9YSWsWbIlo5Ar+bWpMfsqQqoO7qIb6PtIdm//uCpXTK12juHsEou2QxIq8Q 0X1EuquG3ULJrIdRLs3GvA52SH2l8nkYHlwqJDvKSoTNGNBFQM1rdzjj9KsuEK+w1rHA wp68mcxdmmZeH2j/c18hKs201O2ls/G/avVfyD9Q0hT1EAkZ1R2ESw0zBFfWgqL4dNOz vPcdpw0rwGsG54jhDA/ggoAZIrfN9eoP5fAHHwxKy2YvW2lHINcnF7RfXxzVDACpi2cr Wkl68UW0cI1PuBSQRVCq5J9RJF383lIxkoL8HQmWZ8qsbvUPTCpLQIYt2jPr3+SBn4Ek g6mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cWNNYEoOwBL68ELRI7tx6rZXN0M9WGtvRgFGRIo1fRM=; b=kSdoFWqOeAt64WxoxMiWOWubXztrL6yb+lZDV52HjgiLidZx73TqIzyioiNzqvXBfY Bj1JySWk3i6Q6d8LRhshvvmPEytqYkf+Xt6X7Lx/X281DRnetUsWnUHVXe806nBPC0yV U53HBK89kvKqF0dn1nu+CxQw8dken/bHFQeaqC+hGKGN3G9TNIHVxzn+HBu+SSrJWqqs 4Nn8sq0vryNDl+eQq6hrxpQRX3IPyf8c+nTJdwBhIwP3/sbN0BpqAqvWlnGiaGoOFicm 3Wqjc4f+5BS132DUKkS2xnSgjBqBujD2qcgid7jJzfc1c9VzyXY5ym1T1+SwDVGGABMF gplw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fRq5yWOD; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 26si19282622pgu.190.2018.11.19.03.17.01; Mon, 19 Nov 2018 03:17:16 -0800 (PST) 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=@ti.com header.s=ti-com-17Q1 header.b=fRq5yWOD; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728574AbeKSVhU (ORCPT + 99 others); Mon, 19 Nov 2018 16:37:20 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:43294 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728051AbeKSVhT (ORCPT ); Mon, 19 Nov 2018 16:37:19 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id wAJBDwOs073452; Mon, 19 Nov 2018 05:13:58 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1542626038; bh=cWNNYEoOwBL68ELRI7tx6rZXN0M9WGtvRgFGRIo1fRM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=fRq5yWODNPwgmywnBbt9WhmuG+jbNa/oPJYc9s/3aF2E64IkW0Wj7H0XY/hvwDS1c FvSFmndyOJOkvg1pLMBWcEfKyAcwVcTYDzGznrNRIKrKWAHlVQDHaBwM1ii4HvU2UQ zTPX/2ZPQqrh3xdOlBuLc9a2eODO3DJsUFLI5zX4= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wAJBDw7n084450 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 19 Nov 2018 05:13:58 -0600 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 19 Nov 2018 05:13:58 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 19 Nov 2018 05:13:58 -0600 Received: from a0230074-OptiPlex-7010.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id wAJBDr11029910; Mon, 19 Nov 2018 05:13:56 -0600 From: Faiz Abbas To: , CC: , , , Subject: [PATCH 1/4] mmc: sdhci-omap: Fix DCRC error handling during tuning Date: Mon, 19 Nov 2018 16:46:15 +0530 Message-ID: <20181119111618.2745-2-faiz_abbas@ti.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119111618.2745-1-faiz_abbas@ti.com> References: <20181119111618.2745-1-faiz_abbas@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 7d33c3581536 ("mmc: sdhci-omap: Workaround for Errata i802") disabled DCRC interrupts during tuning. This write to the interrupt enable register gets overwritten in sdhci_prepare_data() and the interrupt is not in fact disabled. Fix this by disabling the interrupt in the host->ier variable. Signed-off-by: Faiz Abbas --- drivers/mmc/host/sdhci-omap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index 88347ce78f23..87138067e334 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -290,7 +290,6 @@ static int sdhci_omap_execute_tuning(struct mmc_host *mmc, u32 opcode) u32 start_window = 0, max_window = 0; u8 cur_match, prev_match = 0; u32 length = 0, max_len = 0; - u32 ier = host->ier; u32 phase_delay = 0; int ret = 0; u32 reg; @@ -317,9 +316,7 @@ static int sdhci_omap_execute_tuning(struct mmc_host *mmc, u32 opcode) * during the tuning procedure. So disable it during the * tuning procedure. */ - ier &= ~SDHCI_INT_DATA_CRC; - sdhci_writel(host, ier, SDHCI_INT_ENABLE); - sdhci_writel(host, ier, SDHCI_SIGNAL_ENABLE); + host->ier &= ~SDHCI_INT_DATA_CRC; while (phase_delay <= MAX_PHASE_DELAY) { sdhci_omap_set_dll(omap_host, phase_delay); @@ -366,6 +363,8 @@ static int sdhci_omap_execute_tuning(struct mmc_host *mmc, u32 opcode) ret: sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA); + /* Reenable forbidden interrupt */ + host->ier |= SDHCI_INT_DATA_CRC; sdhci_writel(host, host->ier, SDHCI_INT_ENABLE); sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE); return ret; -- 2.19.1