From patchwork Mon Jun 2 09:09:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 31269 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f200.google.com (mail-ig0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0DBF9203C2 for ; Mon, 2 Jun 2014 09:10:02 +0000 (UTC) Received: by mail-ig0-f200.google.com with SMTP id uy17sf11504427igb.3 for ; Mon, 02 Jun 2014 02:10:02 -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=A6QLqbvIryYPWsKfXoH1ncDydLATd7pMKoqlNsgVS225u81lp2x/xZG+01yNejAtK+ Iyd06f8OGL3xl0PpUjCPYykJruMDSUjytj6Iyoo/ZBZs0lEoV4leO0MEVs+FHIFWw9+F 1DJ12ZVW7DVMcR0aNeyoVoDgxUHK34zJaMkfrAObQDwgsuAb7DtNnSFFpHNzu8ng+/J2 5j15VJTT3yzftefHijwP7qzbp5iLw+lnOXwonCraaYMHWN87pxWlzlzTijnbbNv9OCLz Rfm1ih83TIgItFwgzCcoEY/qNkgBNoIWIwsXNFfiMNHyYT/HVIxXuq8wP5kCpXyJwA04 1xkA== X-Gm-Message-State: ALoCoQm6tB+MENaS6pU3ko7oehKwspTT2R2Pae15eQQNJvqkYEmq3HPxE2d6CJMP3h2WZSdAcmWy X-Received: by 10.182.246.7 with SMTP id xs7mr12790131obc.15.1401700202192; Mon, 02 Jun 2014 02:10:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.240 with SMTP id j103ls1889461qgd.47.gmail; Mon, 02 Jun 2014 02:10:02 -0700 (PDT) X-Received: by 10.52.139.101 with SMTP id qx5mr24301476vdb.17.1401700202038; Mon, 02 Jun 2014 02:10:02 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id qz19si523986vdb.91.2014.06.02.02.10.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Jun 2014 02:10:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id lf12so4599478vcb.17 for ; Mon, 02 Jun 2014 02:10:02 -0700 (PDT) X-Received: by 10.58.185.165 with SMTP id fd5mr32338vec.41.1401700201939; Mon, 02 Jun 2014 02:10:01 -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 ib8csp82681vcb; Mon, 2 Jun 2014 02:10:01 -0700 (PDT) X-Received: by 10.66.147.99 with SMTP id tj3mr39206999pab.47.1401700200525; Mon, 02 Jun 2014 02:10:00 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ip15si15258553pac.160.2014.06.02.02.09.59; Mon, 02 Jun 2014 02:10:00 -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 S1753590AbaFBJJr (ORCPT + 6 others); Mon, 2 Jun 2014 05:09:47 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:49689 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753563AbaFBJJo (ORCPT ); Mon, 2 Jun 2014 05:09:44 -0400 Received: by mail-wi0-f182.google.com with SMTP id r20so4201130wiv.9 for ; Mon, 02 Jun 2014 02:09:43 -0700 (PDT) X-Received: by 10.194.187.107 with SMTP id fr11mr46255870wjc.70.1401700183178; Mon, 02 Jun 2014 02:09:43 -0700 (PDT) Received: from srini-ThinkPad-X1-Carbon-2nd.dlink.com (host-78-149-12-106.as13285.net. [78.149.12.106]) by mx.google.com with ESMTPSA id nb8sm30814101wic.18.2014.06.02.02.09.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Jun 2014 02:09:42 -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 v6 08/12] mmc: mmci: Add support to data commands via variant structure. Date: Mon, 2 Jun 2014 10:09:39 +0100 Message-Id: <1401700179-11752-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1401699818-11329-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1401699818-11329-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.172 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);