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: 4272971 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7CA96BEEA7 for ; Fri, 30 May 2014 17:16:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B047A2021A for ; Fri, 30 May 2014 17:16:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B3DFA201D5 for ; Fri, 30 May 2014 17:16:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932126AbaE3RQe (ORCPT ); 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-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=kr5nEpdmmhE0fGVLU4nOU4366Dc90PFKIH46iI8MJBk9jXIKvVd2WlZBVeO25290vm 2PTbS85IYHosRg1Ob7LdhkSylljaxMwbthvyxjcCDPAeVBOpqZsiTLvkVKtLjLyGLqrx /mj45h6ziUhI7fPp6FmrfgzZoO6/wOjtJMeTq9xWmPQW+s8/jnMjrBo4KNosm2s2ADn2 rRXFpkel2RxF+IyROQn3J5IE/HVG6TcaRBYzvycT3Dyci6yIOMkFiBGHM4bu2fUlg22Q sRTjx4EfTeK09d+ICPWs0/N0aZZpte73flJYI+JpIh2GDjCA8l1EBFazud9Hoyaj3dhe Cojw== X-Gm-Message-State: ALoCoQkxrssHgbj01D+pbFGNcGdpFqBodK6d2W7Li4bhqrWw9K7FZMOjTdjdI6IWXZ39td55xPnM 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: 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);