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: 4280511 Return-Path: X-Original-To: patchwork-linux-mmc@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 755A99F1D6 for ; Mon, 2 Jun 2014 09:10:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ACDF8203AB for ; Mon, 2 Jun 2014 09:10:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DDE89202EB for ; Mon, 2 Jun 2014 09:10:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753590AbaFBJJr (ORCPT ); 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=geWlioE/htFcLLKwVw9fC6sWR0PxCurz7XliXqKRUeY=; b=aRXRYPxQ6qCLd5TdgBcYphydt80eVpRt9tcyDMDTwboaB0KBauaXVXcIBMNInPd+rK /cEmRTiEpuRFXWz9ZnfBVSeJUX2cp6demPo9p5JEet4XWWYzZi8MNljLeE2CXh0qXmAH aUbRuYmjispy+Hfu+vMUyeSyjxTuQj0QALWwYJhQQ6iEqZuSe06N9aJTbm1WrdZHeVYh HOcWyfJx5FTT7HxFDdIpuwgsFvpsITiOUi00hSg2xuT6rGDN96cu72ws1h4tr4dxw+d3 ArHesggtoq5veJoDE9fISVBVmAFWvVC+zZSRAA1M7dwzlKYgfTI67I0wj3Dy411Ie/wm Mdvg== X-Gm-Message-State: ALoCoQmpJqNmaNUcpQGGS4xjQeQoiNrq2KSs7WVAP6sAWgujYIPX+AOnCSgtzmq8KUq4eAq7ryKA 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: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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: 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);