From patchwork Mon Jun 2 09:09:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 31274 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 72839203C2 for ; Mon, 2 Jun 2014 09:11:59 +0000 (UTC) Received: by mail-pa0-f71.google.com with SMTP id kx10sf8957303pab.6 for ; Mon, 02 Jun 2014 02:11:58 -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=YCi+XfQxepk8CbdV+cjpfJRqXWj7NTz8FhtlGCG7d4c=; b=H+klGXzUCtkRLJymkhKLjfyCUAgxGAlSWQ7acZyQjFdIF+CZ1sj/uX9ZFG/1HgQZ2G zitVSqvXPUyMnDHFl7JLaS1uLPpL2H9Z2+kLZoMbhxjXy46OfyajkRM7qn/YzCH/WzGl iEYt4bzpRcnFxifBE2LK0gJr+hYnghQEdp9/U2o4K1w7Y22nRuqRs7dGbrPlZDl9wXtJ f3on5b0hgzTkF2bt1Kejl843xqa4MctMxd/AewuwY/4DRJM+HfKNJRNUICP06A6f/Gyl bCGsHs0xeBxa8nyRfu1pipEDOo4pNtsLuR2h0flTrGgyuF51aG50vQwZciWBHIDQ/paa 9rZg== X-Gm-Message-State: ALoCoQmZ+i5Qss/kVfdMpgUWoaDjrDrEdNG11eaVr9Cd8qxBiUHgcd6FMQm/g5mpwbLLL/lLaKyS X-Received: by 10.66.155.165 with SMTP id vx5mr11093900pab.36.1401700318666; Mon, 02 Jun 2014 02:11:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.74 with SMTP id w68ls1888911qgw.53.gmail; Mon, 02 Jun 2014 02:11:58 -0700 (PDT) X-Received: by 10.58.228.163 with SMTP id sj3mr2728643vec.28.1401700318461; Mon, 02 Jun 2014 02:11:58 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id p3si7589800vcz.34.2014.06.02.02.11.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Jun 2014 02:11:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jw12so4807876veb.20 for ; Mon, 02 Jun 2014 02:11:58 -0700 (PDT) X-Received: by 10.221.24.207 with SMTP id rf15mr29046448vcb.17.1401700318383; Mon, 02 Jun 2014 02:11:58 -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 ib8csp82776vcb; Mon, 2 Jun 2014 02:11:57 -0700 (PDT) X-Received: by 10.66.197.131 with SMTP id iu3mr39278672pac.102.1401700317499; Mon, 02 Jun 2014 02:11:57 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1si15297942pat.100.2014.06.02.02.11.57; Mon, 02 Jun 2014 02:11:57 -0700 (PDT) Received-SPF: none (google.com: linux-arm-msm-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 S1753431AbaFBJJW (ORCPT + 3 others); Mon, 2 Jun 2014 05:09:22 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:50944 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753389AbaFBJJU (ORCPT ); Mon, 2 Jun 2014 05:09:20 -0400 Received: by mail-wi0-f174.google.com with SMTP id r20so4130127wiv.7 for ; Mon, 02 Jun 2014 02:09:19 -0700 (PDT) X-Received: by 10.194.2.244 with SMTP id 20mr23411488wjx.26.1401700159563; Mon, 02 Jun 2014 02:09:19 -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 k2sm33831074wjq.20.2014.06.02.02.09.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Jun 2014 02:09:18 -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 05/12] mmc: mmci: add ddrmode mask to variant data Date: Mon, 2 Jun 2014 10:09:15 +0100 Message-Id: <1401700155-11629-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-arm-msm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-arm-msm@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.175 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 ddrmode mask to variant structure giving more flexibility to the driver to support more SOCs which have different datactrl register layout. Without this patch datactrl register is updated with incorrect ddrmode mask, resulting in failures on Qualcomm SD Card Controller. Signed-off-by: Srinivas Kandagatla Reviewed-by: Linus Walleij --- drivers/mmc/host/mmci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 72981f6..ad7e538 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) * @sdio: variant supports SDIO * @st_clkdiv: true if using a ST-specific clock divider algorithm + * @datactrl_mask_ddrmode: ddr mode mask in datactrl register. * @blksz_datactrl16: true if Block size is at b16..b30 position in datactrl register * @blksz_datactrl4: true if Block size is at b4..b16 position in datactrl * register @@ -74,6 +75,7 @@ struct variant_data { unsigned int datalength_bits; unsigned int fifosize; unsigned int fifohalfsize; + unsigned int datactrl_mask_ddrmode; bool sdio; bool st_clkdiv; bool blksz_datactrl16; @@ -152,6 +154,7 @@ static struct variant_data variant_ux500v2 = { .fifohalfsize = 8 * 4, .clkreg = MCI_CLK_ENABLE, .clkreg_enable = MCI_ST_UX500_HWFCEN, + .datactrl_mask_ddrmode = MCI_ST_DPSM_DDRMODE, .datalength_bits = 24, .sdio = true, .st_clkdiv = true, @@ -770,7 +773,7 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) } if (host->mmc->ios.timing == MMC_TIMING_UHS_DDR50) - datactrl |= MCI_ST_DPSM_DDRMODE; + datactrl |= variant->datactrl_mask_ddrmode; /* * Attempt to use DMA operation mode, if this