From patchwork Tue Sep 11 06:43:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Liu X-Patchwork-Id: 1435721 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 87FD44025E for ; Tue, 11 Sep 2012 06:47:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751483Ab2IKGrX (ORCPT ); Tue, 11 Sep 2012 02:47:23 -0400 Received: from na3sys009aog138.obsmtp.com ([74.125.149.19]:54917 "EHLO na3sys009aog138.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388Ab2IKGrX (ORCPT ); Tue, 11 Sep 2012 02:47:23 -0400 Received: from MSI-MTA.marvell.com ([65.219.4.132]) (using TLSv1) by na3sys009aob138.postini.com ([74.125.148.12]) with SMTP ID DSNKUE7ec1DctruDCNFCCJQBan2Gfgilli7m@postini.com; Mon, 10 Sep 2012 23:47:22 PDT Received: from maili.marvell.com ([10.68.76.210]) by MSI-MTA.marvell.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 10 Sep 2012 23:47:14 -0700 Received: from localhost.localdomain (unknown [10.38.36.240]) by maili.marvell.com (Postfix) with ESMTP id 144E14E513; Mon, 10 Sep 2012 23:47:13 -0700 (PDT) From: Kevin Liu To: linux-mmc@vger.kernel.org, cjb@laptop.org, pierre@ossman.eu Cc: cxie4@marvell.com, hzhuang1@marvell.com, prakity@marvell.com, kliu5@marvell.com Subject: [PATCH] mmc: sdhci: add interface for 1.2v voltage switch Date: Tue, 11 Sep 2012 14:43:50 +0800 Message-Id: <1347345830-32042-1-git-send-email-keyuan.liu@gmail.com> X-Mailer: git-send-email 1.7.0.4 X-OriginalArrivalTime: 11 Sep 2012 06:47:14.0951 (UTC) FILETIME=[4745A170:01CD8FE9] Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Kevin Liu Add the interface since emmc may need 1.2v voltage. The function should be controller specific. Signed-off-by: Kevin Liu --- drivers/mmc/host/sdhci.c | 3 +++ drivers/mmc/host/sdhci.h | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 08dae93..8c56435 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1754,6 +1754,9 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, else if (!(ctrl & SDHCI_CTRL_VDD_180) && (ios->signal_voltage == MMC_SIGNAL_VOLTAGE_180)) return sdhci_do_1_8v_signal_voltage_switch(host, ctrl); + else if ((ios->signal_voltage == MMC_SIGNAL_VOLTAGE_120) && + host->ops->signal_voltage_switch_1_2v) + return host->ops->signal_voltage_switch_1_2v(host); else /* No signal voltage switch required */ return 0; diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 2e89dac..e847fa3 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -280,6 +280,7 @@ struct sdhci_ops { void (*hw_reset)(struct sdhci_host *host); void (*platform_suspend)(struct sdhci_host *host); void (*platform_resume)(struct sdhci_host *host); + int (*signal_voltage_switch_1_2v)(struct sdhci_host *host); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS