From patchwork Mon Apr 21 21:49:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 28742 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B2E5E2032B for ; Mon, 21 Apr 2014 21:49:47 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id oy12sf23322123veb.3 for ; Mon, 21 Apr 2014 14:49:47 -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=xVvArMT6Tdypmi7F99EWEEOQ/LOiYUqaQr6LBHqU/Kc=; b=D0UCL5BAz3of2MH0GU5zzldR6gz34/zx3NzHxo30p0lqgomPBHwErACJjzKNYE6yWp hlOCxdnRNdsvGoLBFXOJyuUJ/uPei3Y6uE3/XdfXwQH52rCuxtUZV3dbdYo+RgqogCFP 4KohMGMgecziaJdEQUU6f8wdniyiB2lr9Yo8UDFaYjVs3CavWM2vYcz6YMOCizaZM+n2 FVRC/flVofstoZnfFEMo0PcQu1ujZ8EMqcjHBolW3xCTgn7Tn7yk1Udzd5FlG9gRmMzR xFB6ulg+YlyWDdpKKIbbv95D3gn+tXWJjLrtEFFiauuv6MPBy8kMxmFXnvKZoqwEDm6Q 1ZgA== X-Gm-Message-State: ALoCoQlBHgEIBWxvKYRXHz5P1soMLRZQnMF5+5ynkq0X0epL8o/ESNlNHeJpbpVwjljSEIm/Pe4a X-Received: by 10.236.197.39 with SMTP id s27mr18321712yhn.36.1398116987251; Mon, 21 Apr 2014 14:49:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.210 with SMTP id o76ls630826qga.66.gmail; Mon, 21 Apr 2014 14:49:47 -0700 (PDT) X-Received: by 10.52.69.146 with SMTP id e18mr27973168vdu.15.1398116987131; Mon, 21 Apr 2014 14:49:47 -0700 (PDT) Received: from mail-ve0-f181.google.com (mail-ve0-f181.google.com [209.85.128.181]) by mx.google.com with ESMTPS id bp12si6481397veb.81.2014.04.21.14.49.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Apr 2014 14:49:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.181; Received: by mail-ve0-f181.google.com with SMTP id oy12so8374956veb.40 for ; Mon, 21 Apr 2014 14:49:47 -0700 (PDT) X-Received: by 10.52.0.193 with SMTP id 1mr12454207vdg.0.1398116987030; Mon, 21 Apr 2014 14:49:47 -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 ib8csp320840vcb; Mon, 21 Apr 2014 14:49:46 -0700 (PDT) X-Received: by 10.66.166.47 with SMTP id zd15mr40681914pab.0.1398116986326; Mon, 21 Apr 2014 14:49:46 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zt8si21494055pbc.316.2014.04.21.14.49.45; Mon, 21 Apr 2014 14:49:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755021AbaDUVti (ORCPT + 7 others); Mon, 21 Apr 2014 17:49:38 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:45391 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754684AbaDUVte (ORCPT ); Mon, 21 Apr 2014 17:49:34 -0400 Received: by mail-wg0-f47.google.com with SMTP id x12so3093053wgg.6 for ; Mon, 21 Apr 2014 14:49:33 -0700 (PDT) X-Received: by 10.180.94.37 with SMTP id cz5mr15576388wib.19.1398116972935; Mon, 21 Apr 2014 14:49:32 -0700 (PDT) Received: from srinivas-Inspiron-N5050.dlink.com (host-78-149-8-254.as13285.net. [78.149.8.254]) by mx.google.com with ESMTPSA id uc3sm18440462wib.10.2014.04.21.14.49.32 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Apr 2014 14:49:32 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: linux-mmc@vger.kernel.org Cc: Russell King , Chris Ball , Ulf Hansson , linux-kernel@vger.kernel.org, agross@quicinc.com, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH RFC 11/12] mmc: mmci: Add Qcom variations to MCICommand register. Date: Mon, 21 Apr 2014 22:49:25 +0100 Message-Id: <1398116965-31732-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398116624-31052-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1398116624-31052-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=neutral (google.com: 209.85.128.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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 Some bits which control Command Path State Machine (CPSM) are new in Qcom integration, so this patch adds support to those bits. Signed-off-by: Srinivas Kandagatla --- drivers/mmc/host/mmci.c | 4 ++++ drivers/mmc/host/mmci.h | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 2cd3a8f..8fcd8ef 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -910,6 +910,10 @@ mmci_start_command(struct mmci_host *host, struct mmc_command *cmd, u32 c) if (/*interrupt*/0) c |= MCI_CPSM_INTERRUPT; + if (host->hw_designer == AMBA_VENDOR_QCOM && + mmc_cmd_type(cmd) == MMC_CMD_ADTC) + c |= MCI_CSPM_QCOM_DATCMD; + host->cmd = cmd; mmci_writel(host, cmd->arg, MMCIARGUMENT); diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h index 0a6de1c..2ba0834 100644 --- a/drivers/mmc/host/mmci.h +++ b/drivers/mmc/host/mmci.h @@ -64,6 +64,13 @@ #define MCI_ST_ENCMD_COMPL (1 << 12) #define MCI_ST_NIEN (1 << 13) #define MCI_ST_CE_ATACMD (1 << 14) +/* Modified on Qualcomm Integrations */ +#define MCI_CSPM_QCOM_DATCMD (1 << 12) +#define MCI_CSPM_QCOM_MCIABORT (1 << 13) +#define MCI_CSPM_QCOM_CCSENABLE (1 << 14) +#define MCI_CSPM_QCOM_CCSDISABLE (1 << 15) +#define MCI_CSPM_QCOM_AUTO_CMD19 (1 << 16) +#define MCI_CSPM_QCOM_AUTO_CMD21 (1 << 21) #define MMCIRESPCMD 0x010 #define MMCIRESPONSE0 0x014