From patchwork Mon Aug 7 16:01:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 109574 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1784198qge; Mon, 7 Aug 2017 09:02:06 -0700 (PDT) X-Received: by 10.99.163.1 with SMTP id s1mr991027pge.416.1502121726243; Mon, 07 Aug 2017 09:02:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502121726; cv=none; d=google.com; s=arc-20160816; b=rF5cu/AoAmK5m6jjJvt7gH2+OHYZ1L2SC0vCCIz043FIQ+lMuXmmo4oCt2iO8qbQd5 0NVq4KWnctxg5nOgJjjRKtEgwAveqhsDA3TK/M4UJCRBeMYkmtAM/N5fdch8AFSkhGbX +2mgfya584iviQYXluVzsesbg7k/MTvY2m4s8GJ32cCbTN2f5GV9aZSZ4X8kQADySF1M 8DjvGup7JWK9/7y2jJFSRzrxRIa3JWKfqj0aialwdu+5wcuyxzV34V7LfFVtcWF10i6P XB2TtLiFZ6hDOJ5+7ehziqjKau2lo9rwsa0yaA/bWSHWUxu6hISkfl8L0SO/xkErh4Nj C7fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=BGvAuu5ggaLQZhwF3/9DS/Gxm4SDxuMLyEKct+ehPOg=; b=sJhdMfl9V76D8MDNwqvx/MtW2aO3Yv9JPJyWvC3zLF7eQVXNsHBOWRsQjSc6ohhxjE FZkKQI+qHRmE9DrXDSTZt8L0jwsXI5GPYJzcOX1ZLKQyVbxv3Z5eBsnSOgrCwznQ3O2c qeCttKlD7cipt1plAlxt/BU3AHHhKMa6PvtqVxDHodV+4ZL7ICKly8yQDpTQx36lWTuM a9x41ISdqsxPNywv0KSCGA6E5qbaFXeY1LxBG6QYg0tawgTEc+6UuL3R7+oHwcJs8mVK eWThyDS3NFxZz1D1ENkHskbJvF/il/KCVLVAURx19u3hzUzEwG3fr4YitHEV0wFPeAcF 22Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.b=j8dnsDLH; 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 l91si5600307plb.246.2017.08.07.09.02.05; Mon, 07 Aug 2017 09:02:06 -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=@ti.com header.b=j8dnsDLH; 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 S1751962AbdHGQCE (ORCPT + 25 others); Mon, 7 Aug 2017 12:02:04 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:16498 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751904AbdHGQCB (ORCPT ); Mon, 7 Aug 2017 12:02:01 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id v77G1uE6016524; Mon, 7 Aug 2017 11:01:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1502121716; bh=KlQ2DkNZuLGF3ZZozeLFRY2s2NP24+Z+pQkBe64fzJY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=j8dnsDLHC1adByzgisLcYWwivKAgmoKc7tXJDXo6/wgrbldSIzNKDL9eAfxDERZ+J jUkPQIkNDY8JsUUSEfJXF0kBztJ0/u5Kc8ZT6B7KswvCcGnf6tLHYPiRs9rnWJYcEa 37IYgxSf682tVjpEkZYWYXn3TvOqgyxVbHTOSX5M= Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v77G1uB3007450; Mon, 7 Aug 2017 11:01:56 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Mon, 7 Aug 2017 11:01:55 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v77G1jGs023497; Mon, 7 Aug 2017 11:01:53 -0500 From: Kishon Vijay Abraham I To: Ulf Hansson , Tony Lindgren , Rob Herring , Adrian Hunter CC: , , , , , Subject: [RFC PATCH 2/7] mmc: sdhci: Add quirk to indicate controller supports ADMA2 Date: Mon, 7 Aug 2017 21:31:37 +0530 Message-ID: <20170807160142.12134-3-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170807160142.12134-1-kishon@ti.com> References: <20170807160142.12134-1-kishon@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org TI's implementation of sdhci controller used in DRA7 SoC's doesn't have SDHCI_CAN_DO_ADMA2 set in CAPA register though it supports ADMA2. Add quirk to support using ADMA2 even if the controller reports incorrect capability in CAPA. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/sdhci.c | 3 ++- drivers/mmc/host/sdhci.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) -- 2.11.0 diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index ece3751d2a25..fff0baadbc3e 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3264,7 +3264,8 @@ int sdhci_setup_host(struct sdhci_host *host) } if ((host->version >= SDHCI_SPEC_200) && - (host->caps & SDHCI_CAN_DO_ADMA2)) + ((host->caps & SDHCI_CAN_DO_ADMA2) || + (host->quirks2 & SDHCI_QUIRK2_FORCE_ADMA))) host->flags |= SDHCI_USE_ADMA; if ((host->quirks & SDHCI_QUIRK_BROKEN_ADMA) && diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 6905131f603d..d778034e324d 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -437,6 +437,8 @@ struct sdhci_host { #define SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN (1<<15) /* Controller does not have CRC stripped in Command Response */ #define SDHCI_QUIRK2_NO_CRC_STRIPPING (1<<16) +/* Controller has bad caps bits, but really supports DMA */ +#define SDHCI_QUIRK2_FORCE_ADMA (1<<17) int irq; /* Device IRQ */ void __iomem *ioaddr; /* Mapped address */