From patchwork Mon Jun 2 09:09:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 31266 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 63607203C2 for ; Mon, 2 Jun 2014 09:09:29 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id sa20sf22641665veb.9 for ; Mon, 02 Jun 2014 02:09:29 -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=C996Q7h4LvrgMYjRfPbGM6aqzn8A5jBnv/e+pOm5O7x8o5MzfC/606VDUWXoMbthu3 79OMexMpfRPMwR6yuxV2WgWvPDo+Y21gXCcS3RfN1tLUShpSc+AuLbn4cxKEfUGQghDY nb7lc0k/RK2lA/kKZmcv8mtJHXaY5imeVeHihNtN8bCMVssrsPZIX1mOBsasVlsEMzNJ q4ASohC5zlaR1bKzXnQ4oydqe3kuNGOREGC5EO6wDR3dTcInb08d5DODUORki8Qj4oH3 WK9wiPdn4B4PWyCxnCYF9333CZSpHBKHTOeUBzLYC6oEL9TqtwtofKA8w47XFVf+kl9L 22Ag== X-Gm-Message-State: ALoCoQkdqr75eotNo18MJ/tSNp8xyQvexxxCcHVawGAxe7bupgXmBN6CHRkq60EhkdaIXf4BSZnY X-Received: by 10.236.137.112 with SMTP id x76mr3163026yhi.27.1401700169130; Mon, 02 Jun 2014 02:09:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.49 with SMTP id z46ls1861726qge.50.gmail; Mon, 02 Jun 2014 02:09:29 -0700 (PDT) X-Received: by 10.220.94.146 with SMTP id z18mr24760vcm.40.1401700169062; Mon, 02 Jun 2014 02:09:29 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id xw5si7594399vcb.11.2014.06.02.02.09.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Jun 2014 02:09:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id hy4so1046192vcb.23 for ; Mon, 02 Jun 2014 02:09:29 -0700 (PDT) X-Received: by 10.221.4.66 with SMTP id ob2mr2673739vcb.28.1401700168974; Mon, 02 Jun 2014 02:09:28 -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 ib8csp82640vcb; Mon, 2 Jun 2014 02:09:28 -0700 (PDT) X-Received: by 10.68.202.167 with SMTP id kj7mr39270669pbc.160.1401700167840; Mon, 02 Jun 2014 02:09:27 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id aa10si2862536pac.16.2014.06.02.02.09.27; Mon, 02 Jun 2014 02:09:27 -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 S1753348AbaFBJJR (ORCPT + 28 others); Mon, 2 Jun 2014 05:09:17 -0400 Received: from mail-we0-f178.google.com ([74.125.82.178]:40419 "EHLO mail-we0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753104AbaFBJJN (ORCPT ); Mon, 2 Jun 2014 05:09:13 -0400 Received: by mail-we0-f178.google.com with SMTP id u56so4735647wes.37 for ; Mon, 02 Jun 2014 02:09:11 -0700 (PDT) X-Received: by 10.194.201.195 with SMTP id kc3mr47623906wjc.54.1401700151818; Mon, 02 Jun 2014 02:09:11 -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 gp15sm33838546wjc.10.2014.06.02.02.09.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Jun 2014 02:09:10 -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 04/12] mmc: mmci: Add Qcom datactrl register variant Date: Mon, 2 Jun 2014 10:09:06 +0100 Message-Id: <1401700146-11588-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-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.220.178 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;