From patchwork Thu Nov 22 08:14:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunhe Lan X-Patchwork-Id: 1784341 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id E8A563FC23 for ; Thu, 22 Nov 2012 18:35:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753918Ab2KVSes (ORCPT ); Thu, 22 Nov 2012 13:34:48 -0500 Received: from va3ehsobe005.messaging.microsoft.com ([216.32.180.31]:14907 "EHLO va3outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753760Ab2KVSeq (ORCPT ); Thu, 22 Nov 2012 13:34:46 -0500 Received: from mail108-va3-R.bigfish.com (10.7.14.238) by VA3EHSOBE002.bigfish.com (10.7.40.22) with Microsoft SMTP Server id 14.1.225.23; Thu, 22 Nov 2012 08:13:51 +0000 Received: from mail108-va3 (localhost [127.0.0.1]) by mail108-va3-R.bigfish.com (Postfix) with ESMTP id D7A9120086; Thu, 22 Nov 2012 08:13:50 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1de0h1202h1d1ah1d2ahzz8275bhz2dh2a8h668h839he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1155h) Received: from mail108-va3 (localhost.localdomain [127.0.0.1]) by mail108-va3 (MessageSwitch) id 1353572028418076_28519; Thu, 22 Nov 2012 08:13:48 +0000 (UTC) Received: from VA3EHSMHS016.bigfish.com (unknown [10.7.14.253]) by mail108-va3.bigfish.com (Postfix) with ESMTP id 546B8C028D; Thu, 22 Nov 2012 08:13:48 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by VA3EHSMHS016.bigfish.com (10.7.99.26) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 22 Nov 2012 08:13:47 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.2.318.3; Thu, 22 Nov 2012 08:13:45 +0000 Received: from ustc.localdomain4 ([10.193.20.71]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id qAM8DZql002647; Thu, 22 Nov 2012 01:13:39 -0700 From: Chunhe Lan To: CC: , , , Chunhe Lan Subject: [PATCH] mmc: esdhi: Add SDHCI_QUIRK_QORIQ_CIRCUIT_SUPPORT_VS33 quirk support Date: Thu, 22 Nov 2012 16:14:44 +0800 Message-ID: <1353572084-3196-1-git-send-email-Chunhe.Lan@freescale.com> X-Mailer: git-send-email 1.7.6.5 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org On the some platforms of Freescale, sdhci controller can only support 1.8V voltage, but the peripheral hardware circuit has capability to support 3.3V voltage. Signed-off-by: Chunhe Lan --- drivers/mmc/host/sdhci.c | 3 +++ include/linux/mmc/sdhci.h | 4 ++++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 4fe2de8..e4a537d 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2682,6 +2682,9 @@ int sdhci_add_host(struct sdhci_host *host) host->caps1 : sdhci_readl(host, SDHCI_CAPABILITIES_1); + if (host->quirks & SDHCI_QUIRK_QORIQ_CIRCUIT_SUPPORT_VS33) + caps[0] = caps[0] | SDHCI_CAN_VDD_330; + if (host->quirks & SDHCI_QUIRK_FORCE_DMA) host->flags |= SDHCI_USE_SDMA; else if (!(caps[0] & SDHCI_CAN_DO_SDMA)) diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 1edcb4d..78eced5 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -87,6 +87,10 @@ struct sdhci_host { #define SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC (1<<30) /* The read-only detection via SDHCI_PRESENT_STATE register is unstable */ #define SDHCI_QUIRK_UNSTABLE_RO_DETECT (1<<31) +/* Controller can only supports 1.8V, but the peripheral hardware + * circuit has capability to support 3.3V + */ +#define SDHCI_QUIRK_QORIQ_CIRCUIT_SUPPORT_VS33 (1U<<32) unsigned int quirks2; /* More deviations from spec. */