From patchwork Fri May 30 17:13:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 31205 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 9269220671 for ; Fri, 30 May 2014 17:13:49 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id pa12sf9732684veb.11 for ; Fri, 30 May 2014 10:13: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=wfDImzTWpWqiLMr1pyNsTeq+a/jg7N0RghLM5gs18E4=; b=S9MNSRnPpa4/HZepxdfFrErsX9s1m/Mh7u7oMiiDbm9ECfLCtwxFG/PJY3m3rHF8VA FY4o8ZRpgx4BDf8iHaXU4h2kTeqYW4NSz5dQsZP5DWOe4JTGgS4lXPgQ2ojDU3HCueAW Ykr2vpnNN00S0ROchPA3S6452G48YAelFbBaKKWJgYxA3GtS5+M7O++entTn+nTcZZOa GEmUwm4jLLfi+UW0v4nxiyx1/b8Yuyke0qqsxZwpDX4BvUaANZeQ4/Bm2VuHpcAZH17W atZ1WRHAHCBfitsqgEQq44UZO1y5QWGuTknDGC3iu+2PqRGGi9zE6+wd9Bt9m7EN+iUJ nucg== X-Gm-Message-State: ALoCoQm9CD4FGZl7SfGwsRCzwCib/sNERZKVVVSY0et64rDcofgUOSdLMHsw/tJZh1Pn1HJlkc8q X-Received: by 10.236.19.7 with SMTP id m7mr4762334yhm.35.1401470029341; Fri, 30 May 2014 10:13:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.24.42 with SMTP id 39ls1090795qgq.26.gmail; Fri, 30 May 2014 10:13:49 -0700 (PDT) X-Received: by 10.221.50.70 with SMTP id vd6mr2639162vcb.51.1401470029081; Fri, 30 May 2014 10:13:49 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id n10si3590815vei.8.2014.05.30.10.13.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 May 2014 10:13:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.182 as permitted sender) client-ip=209.85.128.182; Received: by mail-ve0-f182.google.com with SMTP id sa20so2476094veb.13 for ; Fri, 30 May 2014 10:13:49 -0700 (PDT) X-Received: by 10.221.7.71 with SMTP id on7mr15435299vcb.18.1401470029003; Fri, 30 May 2014 10:13:49 -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 ib8csp128233vcb; Fri, 30 May 2014 10:13:48 -0700 (PDT) X-Received: by 10.67.14.69 with SMTP id fe5mr20762213pad.120.1401470027785; Fri, 30 May 2014 10:13:47 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bl3si6294395pbc.235.2014.05.30.10.13.47; Fri, 30 May 2014 10:13: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 S934341AbaE3RNj (ORCPT + 28 others); Fri, 30 May 2014 13:13:39 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:44020 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934174AbaE3RNf (ORCPT ); Fri, 30 May 2014 13:13:35 -0400 Received: by mail-wi0-f181.google.com with SMTP id n15so1562163wiw.8 for ; Fri, 30 May 2014 10:13:34 -0700 (PDT) X-Received: by 10.194.57.208 with SMTP id k16mr23649422wjq.51.1401470014505; Fri, 30 May 2014 10:13:34 -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 m1sm7476583wib.20.2014.05.30.10.13.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 May 2014 10:13:33 -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 05/13] mmc: mmci: Add Qcom datactrl register variant Date: Fri, 30 May 2014 18:13:29 +0100 Message-Id: <1401470009-27031-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-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.182 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 Instance of this IP on Qualcomm's SOCs has bit different layout for datactrl register. Bit position datactrl[16:4] hold the true block size instead of power of 2. 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 ed20bf5..72981f6 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -60,6 +60,8 @@ static unsigned int fmax = 515633; * @sdio: variant supports SDIO * @st_clkdiv: true if using a ST-specific clock divider algorithm * @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 * @pwrreg_powerup: power up value for MMCIPOWER register * @signal_direction: input/out direction of bus signals can be indicated * @pwrreg_clkgate: MMCIPOWER register must be used to gate the clock @@ -75,6 +77,7 @@ struct variant_data { bool sdio; bool st_clkdiv; bool blksz_datactrl16; + bool blksz_datactrl4; u32 pwrreg_powerup; bool signal_direction; bool pwrreg_clkgate; @@ -731,6 +734,8 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) if (variant->blksz_datactrl16) datactrl = MCI_DPSM_ENABLE | (data->blksz << 16); + else if (variant->blksz_datactrl4) + datactrl = MCI_DPSM_ENABLE | (data->blksz << 4); else datactrl = MCI_DPSM_ENABLE | blksz_bits << 4;