From patchwork Fri Sep 4 15:32:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 53127 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id B22C922E23 for ; Fri, 4 Sep 2015 15:35:29 +0000 (UTC) Received: by lamp12 with SMTP id p12sf8231383lam.2 for ; Fri, 04 Sep 2015 08:35:28 -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=pjf3LG6Ulm/YF15XoHLWZEQuDYWvHqqVRuJSgeVbycM=; b=mGCfHPjV83VGj6Y0gFWcmgk+zw/O9Byn/Cnsds/Pvz8xzrGFZAXgi8Dn5CZCuNFo/O UfbXfpZ0TZF4lTE3V1AF65NKuhX3qySg4o07GmuR7499Azds8faGJVT8QXJwOnTH1Sc1 EXocrrLKr/db+peP7ThcTIMdZBM2Q4azNFAgCdidRDG3t8M78GFnv3XEeC2TVE3pUVxu ODDkl9n5ueal/YK82IQlTKNgzwKMOuEaBZf3iZyeMa0mCU+XHanWTO1300JDFuTtQrVL rDfsErENBfMdelfAaRGlOE12Rna8P3NjXbyhF662bpUWSQUJQRFR+Xg0s9OXmWgeP9jr 6VpQ== X-Gm-Message-State: ALoCoQmtFP6c2PejxI0suZWQxxQLCqYdfa9+1Q8XeAEFtsEBe9yB6YteawBKBgstzdUf172haErX X-Received: by 10.194.93.198 with SMTP id cw6mr1209428wjb.3.1441380928662; Fri, 04 Sep 2015 08:35:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.137 with SMTP id f9ls352956lae.11.gmail; Fri, 04 Sep 2015 08:35:28 -0700 (PDT) X-Received: by 10.112.151.106 with SMTP id up10mr152732lbb.106.1441380928467; Fri, 04 Sep 2015 08:35:28 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id r5si2626870lbp.16.2015.09.04.08.35.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Sep 2015 08:35:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbpo4 with SMTP id o4so13442974lbp.2 for ; Fri, 04 Sep 2015 08:35:28 -0700 (PDT) X-Received: by 10.112.146.135 with SMTP id tc7mr4318098lbb.35.1441380928332; Fri, 04 Sep 2015 08:35: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.112.164.42 with SMTP id yn10csp2065932lbb; Fri, 4 Sep 2015 08:35:27 -0700 (PDT) X-Received: by 10.107.131.148 with SMTP id n20mr8153689ioi.139.1441380927246; Fri, 04 Sep 2015 08:35:27 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fz12si4884980pdb.140.2015.09.04.08.35.26; Fri, 04 Sep 2015 08:35:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 S932892AbbIDPfB (ORCPT + 28 others); Fri, 4 Sep 2015 11:35:01 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:34894 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932849AbbIDPe6 (ORCPT ); Fri, 4 Sep 2015 11:34:58 -0400 Received: by pacfv12 with SMTP id fv12so28000368pac.2 for ; Fri, 04 Sep 2015 08:34:57 -0700 (PDT) X-Received: by 10.68.96.197 with SMTP id du5mr9548519pbb.32.1441380897832; Fri, 04 Sep 2015 08:34:57 -0700 (PDT) Received: from localhost.localdomain ([202.62.93.137]) by smtp.gmail.com with ESMTPSA id gs2sm2920151pbc.15.2015.09.04.08.34.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Sep 2015 08:34:57 -0700 (PDT) From: Vaibhav Hiremath To: linux-mmc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kliu5@marvell.com, ulf.hansson@linaro.org, Tim Wang , Vaibhav Hiremath Subject: [PATCH 4/5] mmc: sdhci-pxav3: Fix HS200 mode support Date: Fri, 4 Sep 2015 21:02:20 +0530 Message-Id: <1441380741-13115-5-git-send-email-vaibhav.hiremath@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1441380741-13115-1-git-send-email-vaibhav.hiremath@linaro.org> References: <1441380741-13115-1-git-send-email-vaibhav.hiremath@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: vaibhav.hiremath@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.217.171 as permitted sender) smtp.mailfrom=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: Kevin Liu IN case of MMC HS200 mode, current code does not enable SD_CE_ATA_2.MMC_HS200 & SD_CE_ATA_2.MMC_CARD bit configurations. So this patch updates the above bit fields correctly. Signed-off-by: Tim Wang Signed-off-by: Kevin Liu Signed-off-by: Vaibhav Hiremath --- Note: Unfortunately I do not have access to any other datasheets which uses sdhci-pxav3 driver, so quite not sure whether this would break any existing platform, probably NOT, as I do not see any references for this change. If anyone can confirm that would be really great. drivers/mmc/host/sdhci-pxav3.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index d933f75..6978810 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -57,6 +57,8 @@ #define SD_CE_ATA_1 0x10C #define SD_CE_ATA_2 0x10E +#define SD_CE_ATA2_HS200_EN BIT(10) +#define SD_CE_ATA2_MMC_MODE BIT(12) #define SDCE_MISC_INT BIT(2) #define SDCE_MISC_INT_EN BIT(1) @@ -330,6 +332,17 @@ static int pxav3_select_pinstate(struct sdhci_host *host, unsigned int uhs) return pinctrl_select_state(pxa->pinctrl, pinctrl); } +static int pxav3_select_hs200(struct sdhci_host *host) +{ + u16 reg = 0; + + reg = sdhci_readw(host, SD_CE_ATA_2); + reg |= SD_CE_ATA2_HS200_EN | SD_CE_ATA2_MMC_MODE; + sdhci_writew(host, reg, SD_CE_ATA_2); + + return 0; +} + static void pxav3_set_uhs_signaling(struct sdhci_host *host, unsigned int uhs) { struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); @@ -361,6 +374,10 @@ static void pxav3_set_uhs_signaling(struct sdhci_host *host, unsigned int uhs) case MMC_TIMING_UHS_DDR50: ctrl_2 |= SDHCI_CTRL_UHS_DDR50 | SDHCI_CTRL_VDD_180; break; + case MMC_TIMING_MMC_HS200: + ctrl_2 |= SDHCI_CTRL_UHS_SDR104 | SDHCI_CTRL_VDD_180; + pxav3_select_hs200(host); + break; } /*