From patchwork Wed May 28 13:46:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 31065 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E431320068 for ; Wed, 28 May 2014 13:47:06 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id wo20sf53851443obc.11 for ; Wed, 28 May 2014 06:47:06 -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=nRxqyBn3Bluxgkm2tQgzdhW9ocNZEPGl3gXZ72bEWMI=; b=NrFZaOR+XEJYpN24+8dNCBLohQyLHxbo5q0YvSok1Gc/6OE65ddX2DF1G5P2ZJw2l9 cp6X2tIVatGvBilFkZfeA+bxCat02XbdVGeyN1dC40hbmiq6MCgD/UZeeIIZvrUZFo/W B8A2XfPffLKmFJ24B1rcROojdh6NhFdDnwMmy8G3TrrEcn1nYPulQTEcO5OgnuLfnsG/ NjULKa39Gs5ieVHzmuC7/fpqgPpXGrucCNO1p/grH9T0Zxv5KYYQQUjgdYba4vnG2tMX Q0wYHtvGv6nsMYESsGf0n+jOQLldWgc56jkT3sniru64bL03bsDnst8KaW+qQtFPxgMR mSnA== X-Gm-Message-State: ALoCoQkcmz8D0vaHiTWAxVAMx/WS5ruFvTLVH9ErrvnLHFpumSHFhYawyWCOWOf4TfJB8+HrQtvC X-Received: by 10.182.79.41 with SMTP id g9mr16799792obx.41.1401284826450; Wed, 28 May 2014 06:47:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.30.165 with SMTP id d34ls104695qgd.25.gmail; Wed, 28 May 2014 06:47:06 -0700 (PDT) X-Received: by 10.221.29.137 with SMTP id ry9mr34438005vcb.6.1401284826306; Wed, 28 May 2014 06:47:06 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id il19si558861vec.49.2014.05.28.06.47.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 06:47:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id ik5so9028113vcb.17 for ; Wed, 28 May 2014 06:47:06 -0700 (PDT) X-Received: by 10.58.216.163 with SMTP id or3mr749565vec.80.1401284826237; Wed, 28 May 2014 06:47:06 -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 ib8csp204347vcb; Wed, 28 May 2014 06:47:05 -0700 (PDT) X-Received: by 10.68.171.4 with SMTP id aq4mr46313505pbc.150.1401284824985; Wed, 28 May 2014 06:47:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yv3si10795266pac.77.2014.05.28.06.47.04; Wed, 28 May 2014 06:47:04 -0700 (PDT) Received-SPF: none (google.com: linux-mmc-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 S1754072AbaE1Nq4 (ORCPT + 6 others); Wed, 28 May 2014 09:46:56 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:61498 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754066AbaE1Nqy (ORCPT ); Wed, 28 May 2014 09:46:54 -0400 Received: by mail-wi0-f175.google.com with SMTP id f8so3670698wiw.8 for ; Wed, 28 May 2014 06:46:52 -0700 (PDT) X-Received: by 10.194.6.166 with SMTP id c6mr51165996wja.64.1401284812805; Wed, 28 May 2014 06:46:52 -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 lo18sm17059176wic.1.2014.05.28.06.46.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 May 2014 06:46:51 -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 06/13] mmc: mmci: add ddrmode mask to variant data Date: Wed, 28 May 2014 14:46:47 +0100 Message-Id: <1401284807-16686-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-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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 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 wrong ddrmode mask on non ST SOCs, resulting in card detection failures. 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 23401b0..729105b 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, @@ -779,7 +782,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