From patchwork Mon Apr 21 21:48:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 28739 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CBED02032B for ; Mon, 21 Apr 2014 21:49:23 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id fp1sf19057919pdb.0 for ; Mon, 21 Apr 2014 14:49:23 -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=vmh/S9EBniYkvRu51kyCVjg2PCnZAdCpPUKnyqzHyMk=; b=MHt8FeHG9ILYuigAEGgTkTILoVapZgHh/fO1QiCvtChnNT+HqbFMwz6KFH2TYjyqcE W8PxI3Y3ODg3bYYnYLu8ZER4Oys/9vFyxrBOmh99Vv6J9snb3lXv6T1KVkaD+GOiELkC +SED31G0R/rKYsP+36Q4zjgKrj5r/nuW5GBX66SnwdYrcYtRPp+8Z5RuCj5bn6/HsitH Rn5tw4xGcUWei1B57rnWjUMY+ACLfpRMk+CF2TuzKImOtVm+AnDT1AE43x20KMrq4Z7y OzHOUSUNW8Jm8xdCrWEe4iMKefEbBpO1GHsaA7B1N3XdX/IautxH3+mvycAy/L44KfGU 7Z+w== X-Gm-Message-State: ALoCoQmUIYzhwuzCSTiYw42Idz9JefUkLnH1ONMAiwJgtlGZnlHLdLCa7onsQtMotc+uN57SI5iP X-Received: by 10.68.133.75 with SMTP id pa11mr20269030pbb.2.1398116963033; Mon, 21 Apr 2014 14:49:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.17.3 with SMTP id 3ls2495262qgc.83.gmail; Mon, 21 Apr 2014 14:49:22 -0700 (PDT) X-Received: by 10.52.108.228 with SMTP id hn4mr306680vdb.43.1398116962870; Mon, 21 Apr 2014 14:49:22 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id sc7si6456708vdc.139.2014.04.21.14.49.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Apr 2014 14:49:22 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lc6so1567449vcb.7 for ; Mon, 21 Apr 2014 14:49:22 -0700 (PDT) X-Received: by 10.221.37.1 with SMTP id tc1mr2102802vcb.32.1398116962779; Mon, 21 Apr 2014 14:49:22 -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 ib8csp320816vcb; Mon, 21 Apr 2014 14:49:22 -0700 (PDT) X-Received: by 10.68.237.133 with SMTP id vc5mr40767512pbc.92.1398116961943; Mon, 21 Apr 2014 14:49:21 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j4si21532204pad.268.2014.04.21.14.49.21; Mon, 21 Apr 2014 14:49:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754919AbaDUVs7 (ORCPT + 7 others); Mon, 21 Apr 2014 17:48:59 -0400 Received: from mail-wg0-f50.google.com ([74.125.82.50]:59018 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754906AbaDUVsw (ORCPT ); Mon, 21 Apr 2014 17:48:52 -0400 Received: by mail-wg0-f50.google.com with SMTP id x13so3084356wgg.21 for ; Mon, 21 Apr 2014 14:48:49 -0700 (PDT) X-Received: by 10.194.89.168 with SMTP id bp8mr234056wjb.73.1398116929821; Mon, 21 Apr 2014 14:48:49 -0700 (PDT) Received: from srinivas-Inspiron-N5050.dlink.com (host-78-149-8-254.as13285.net. [78.149.8.254]) by mx.google.com with ESMTPSA id jd2sm18438269wic.9.2014.04.21.14.48.48 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Apr 2014 14:48:49 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: linux-mmc@vger.kernel.org Cc: Russell King , Chris Ball , Ulf Hansson , linux-kernel@vger.kernel.org, agross@quicinc.com, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH RFC 08/12] mmc: mmci: move ST specific register extensions access under condition. Date: Mon, 21 Apr 2014 22:48:42 +0100 Message-Id: <1398116922-31556-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398116624-31052-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1398116624-31052-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=neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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 moves some of the ST specific register extensions access under condition, so that other SOCs like Qualcomm or ARM would not a side effect of writing to those reserved/different purpose bits. Signed-off-by: Srinivas Kandagatla --- drivers/mmc/host/mmci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 2dc7581..179abfb 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -270,7 +270,8 @@ static void mmci_write_pwrreg(struct mmci_host *host, u32 pwr) static void mmci_write_datactrlreg(struct mmci_host *host, u32 datactrl) { /* Keep ST Micro busy mode if enabled */ - datactrl |= host->datactrl_reg & MCI_ST_DPSM_BUSYMODE; + if (host->hw_designer == AMBA_VENDOR_ST) + datactrl |= host->datactrl_reg & MCI_ST_DPSM_BUSYMODE; if (host->datactrl_reg != datactrl) { host->datactrl_reg = datactrl; @@ -816,7 +817,8 @@ static void mmci_start_data(struct mmci_host *host, struct mmc_data *data) mmci_write_clkreg(host, clk); } - if (host->mmc->ios.timing == MMC_TIMING_UHS_DDR50) + if (host->mmc->ios.timing == MMC_TIMING_UHS_DDR50 && + host->hw_designer == AMBA_VENDOR_ST) datactrl |= MCI_ST_DPSM_DDRMODE; /*