From patchwork Wed May 28 13:47:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 31068 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 A94E120068 for ; Wed, 28 May 2014 13:47:49 +0000 (UTC) Received: by mail-ig0-f200.google.com with SMTP id uy17sf7582973igb.7 for ; Wed, 28 May 2014 06:47:49 -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=poV7FuL1n3qqgbMeb9XVXSOqPIZxBPIKNZRYYC7DRw4=; b=UBAxaf3fuDu3HwZELOOuyY5n3AvwmkCiQbMBqz46eb3uKIU9xN60wKi2MoTiM1COrQ CQdCgXv5HbJ2RTMncrRTRt7pKLV5fsddH1+xkyR4LDYCIxjXBIMukJIC3iah/CC6f6Et T4t5R3wZfwIHtsCrnI0PCO/gNVdMp4Lq+wKos7VE41ylN/1PlCgawgFKrMO5o02zFE9L 7AvTrtQVyHNSnpkEV5RMvRXKrOjo04uL+ib3Qxa8P4rFAiXvJxOi8WuUmEJY1BiE+TD4 1LFfmcIE/XDr6N/h+cJPUMuHDL+uhILjFlcRaOnWEJmhAwLxAe9Ds51skX6hBIrmeMQL 5pbg== X-Gm-Message-State: ALoCoQmcMdgKtjNuUkEwh77mhk5enVzK6UwR5bnTIaD5NKzN6zECvo4qnycGG5+yE/h/cV7KDPpl X-Received: by 10.182.252.166 with SMTP id zt6mr16402839obc.17.1401284869048; Wed, 28 May 2014 06:47:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.44.36 with SMTP id f33ls107854qga.19.gmail; Wed, 28 May 2014 06:47:48 -0700 (PDT) X-Received: by 10.220.160.67 with SMTP id m3mr1291922vcx.56.1401284868797; Wed, 28 May 2014 06:47:48 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id om8si10564837vcb.90.2014.05.28.06.47.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 06:47:48 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.173 as permitted sender) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id pa12so12388423veb.4 for ; Wed, 28 May 2014 06:47:48 -0700 (PDT) X-Received: by 10.220.44.141 with SMTP id a13mr1036436vcf.71.1401284868711; Wed, 28 May 2014 06:47:48 -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 ib8csp204401vcb; Wed, 28 May 2014 06:47:48 -0700 (PDT) X-Received: by 10.68.196.202 with SMTP id io10mr45581070pbc.149.1401284867746; Wed, 28 May 2014 06:47:47 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ba10si7137147pbd.48.2014.05.28.06.47.47 for ; Wed, 28 May 2014 06:47:47 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-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 S1754243AbaE1Nre (ORCPT + 27 others); Wed, 28 May 2014 09:47:34 -0400 Received: from mail-we0-f172.google.com ([74.125.82.172]:37730 "EHLO mail-we0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754202AbaE1Nra (ORCPT ); Wed, 28 May 2014 09:47:30 -0400 Received: by mail-we0-f172.google.com with SMTP id k48so11432831wev.17 for ; Wed, 28 May 2014 06:47:29 -0700 (PDT) X-Received: by 10.181.12.104 with SMTP id ep8mr1256636wid.0.1401284849518; Wed, 28 May 2014 06:47:29 -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 p15sm13493168wiv.8.2014.05.28.06.47.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 May 2014 06:47:28 -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 v4 09/13] mmc: mmci: add Qcom specifics of clk and datactrl registers. Date: Wed, 28 May 2014 14:47:24 +0100 Message-Id: <1401284844-16811-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1401284608-16428-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1401284608-16428-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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.128.173 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 This patch adds specifics of clk and datactrl register on Qualcomm SD Card controller. This patch also populates the Qcom variant data with these new values specific to Qualcomm SD Card Controller. Signed-off-by: Srinivas Kandagatla Reviewed-by: Linus Walleij --- drivers/mmc/host/mmci.c | 4 ++++ drivers/mmc/host/mmci.h | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 8deea4a..dbcb952 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -179,6 +179,10 @@ static struct variant_data variant_qcom = { .fifosize = 16 * 4, .fifohalfsize = 8 * 4, .clkreg = MCI_CLK_ENABLE, + .clkreg_enable = MCI_QCOM_CLK_FLOWENA | + MCI_QCOM_CLK_SELECT_IN_FBCLK, + .clkreg_8bit_bus_enable = MCI_QCOM_CLK_WIDEBUS_8, + .datactrl_mask_ddrmode = MCI_QCOM_CLK_SELECT_IN_DDR_MODE, .blksz_datactrl4 = true, .datalength_bits = 24, .pwrreg_powerup = MCI_PWR_UP, diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h index cd83ca3..706eb513 100644 --- a/drivers/mmc/host/mmci.h +++ b/drivers/mmc/host/mmci.h @@ -41,6 +41,15 @@ /* Modified PL180 on Versatile Express platform */ #define MCI_ARM_HWFCEN BIT(12) +/* Modified on Qualcomm Integrations */ +#define MCI_QCOM_CLK_WIDEBUS_8 (BIT(10) | BIT(11)) +#define MCI_QCOM_CLK_FLOWENA BIT(12) +#define MCI_QCOM_CLK_INVERTOUT BIT(13) + +/* select in latch data and command in */ +#define MCI_QCOM_CLK_SELECT_IN_FBCLK BIT(15) +#define MCI_QCOM_CLK_SELECT_IN_DDR_MODE (BIT(14) | BIT(15)) + #define MMCIARGUMENT 0x008 #define MMCICOMMAND 0x00c #define MCI_CPSM_RESPONSE BIT(6) @@ -54,6 +63,14 @@ #define MCI_ST_NIEN BIT(13) #define MCI_ST_CE_ATACMD BIT(14) +/* Modified on Qualcomm Integrations */ +#define MCI_QCOM_CSPM_DATCMD BIT(12) +#define MCI_QCOM_CSPM_MCIABORT BIT(13) +#define MCI_QCOM_CSPM_CCSENABLE BIT(14) +#define MCI_QCOM_CSPM_CCSDISABLE BIT(15) +#define MCI_QCOM_CSPM_AUTO_CMD19 BIT(16) +#define MCI_QCOM_CSPM_AUTO_CMD21 BIT(21) + #define MMCIRESPCMD 0x010 #define MMCIRESPONSE0 0x014 #define MMCIRESPONSE1 0x018