From patchwork Fri May 30 17:14:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 31213 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f199.google.com (mail-yk0-f199.google.com [209.85.160.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9591B20671 for ; Fri, 30 May 2014 17:16:37 +0000 (UTC) Received: by mail-yk0-f199.google.com with SMTP id 200sf5413052ykr.10 for ; Fri, 30 May 2014 10:16:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=hbCHFK8t/rzGL4PqT9izgqkIO0dFNOdXeoAGu4bqwI4=; b=Zbw1DMTpStIUcLdK58tYfturbkUcYj9YYASoWbq9Z3Zh7GPtHQCPzPB3nSyY4YXWZ/ bsexR3fL8V6VDpfnJkeRr3S08niPBdDVwd+qKQAIY6IkX6tzjZPVt8d8lf4ZIHjsnfuv h/GXLTOnaFwe4BXU6fuV9FsYILdXWe6+yhAsew6Bn5ToBDQwZkHbpyP3/qh+yaPU/j9J wLgXUtli39jP7nKLf+so5VN6LSI7ydAdEi7LByh2v7F+7gXYcx0I4HCqE7oPET4OSXkI NMk1gcdRWtu5+SmptTtMgNKMn1TcxxFDq63dF/8yhgTlkgbORyyXppGwTH7Bz8wNLMUz AwYw== X-Gm-Message-State: ALoCoQlx6NRr9i+OthqPTShhZ6tlWQGqeu5K7NdC2eD9y/sTkFBLeMjRxjkZTUY+01+a02cJN6BU X-Received: by 10.236.207.164 with SMTP id n24mr5337921yho.5.1401470197371; Fri, 30 May 2014 10:16:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.98 with SMTP id d89ls1282373qgf.57.gmail; Fri, 30 May 2014 10:16:37 -0700 (PDT) X-Received: by 10.52.121.19 with SMTP id lg19mr319286vdb.54.1401470197128; Fri, 30 May 2014 10:16:37 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id h12si3568528vdt.94.2014.05.30.10.16.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 May 2014 10:16:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id il7so2191505vcb.8 for ; Fri, 30 May 2014 10:16:37 -0700 (PDT) X-Received: by 10.220.44.141 with SMTP id a13mr2508388vcf.71.1401470197008; Fri, 30 May 2014 10:16:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp128418vcb; Fri, 30 May 2014 10:16:36 -0700 (PDT) X-Received: by 10.68.162.34 with SMTP id xx2mr19935497pbb.120.1401470196115; Fri, 30 May 2014 10:16:36 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fi4si6317220pbb.193.2014.05.30.10.16.35; Fri, 30 May 2014 10:16:35 -0700 (PDT) Received-SPF: none (google.com: linux-mmc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932126AbaE3RQe (ORCPT + 6 others); Fri, 30 May 2014 13:16:34 -0400 Received: from mail-we0-f170.google.com ([74.125.82.170]:54361 "EHLO mail-we0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964847AbaE3ROU (ORCPT ); Fri, 30 May 2014 13:14:20 -0400 Received: by mail-we0-f170.google.com with SMTP id u57so2365337wes.29 for ; Fri, 30 May 2014 10:14:19 -0700 (PDT) X-Received: by 10.194.88.106 with SMTP id bf10mr24529481wjb.26.1401470058704; Fri, 30 May 2014 10:14:18 -0700 (PDT) Received: from srini-ThinkPad-X1-Carbon-2nd.dlink.com (host-78-149-4-211.as13285.net. [78.149.4.211]) by mx.google.com with ESMTPSA id wk8sm11560309wjb.22.2014.05.30.10.14.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 May 2014 10:14:17 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: Russell King , Ulf Hansson , linux-mmc@vger.kernel.org Cc: Chris Ball , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linus.walleij@linaro.org, Srinivas Kandagatla Subject: [PATCH v5 09/13] mmc: mmci: Add support to data commands via variant structure. Date: Fri, 30 May 2014 18:14:13 +0100 Message-Id: <1401470053-27195-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1401469918-26817-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1401469918-26817-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: srinivas.kandagatla@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Srinivas Kandagatla On some SOCs like Qcom there are explicit bits in the command register to specify if its a data transfer command or not. So this patch adds support to such bits in variant data, giving more flexibility to the driver. Signed-off-by: Srinivas Kandagatla Reviewed-by: Linus Walleij --- drivers/mmc/host/mmci.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 4c95a9b..8534c29 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -59,6 +59,7 @@ static unsigned int fmax = 515633; * is asserted (likewise for RX) * @fifohalfsize: number of bytes that can be written when MCI_TXFIFOHALFEMPTY * is asserted (likewise for RX) + * @data_cmd_enable: enable value for data commands. * @sdio: variant supports SDIO * @st_clkdiv: true if using a ST-specific clock divider algorithm * @datactrl_mask_ddrmode: ddr mode mask in datactrl register. @@ -79,6 +80,7 @@ struct variant_data { unsigned int datalength_bits; unsigned int fifosize; unsigned int fifohalfsize; + unsigned int data_cmd_enable; unsigned int datactrl_mask_ddrmode; bool sdio; bool st_clkdiv; @@ -839,6 +841,9 @@ mmci_start_command(struct mmci_host *host, struct mmc_command *cmd, u32 c) if (/*interrupt*/0) c |= MCI_CPSM_INTERRUPT; + if (mmc_cmd_type(cmd) == MMC_CMD_ADTC) + c |= host->variant->data_cmd_enable; + host->cmd = cmd; writel(cmd->arg, base + MMCIARGUMENT);