From patchwork Fri Jun 29 23:19:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Ball X-Patchwork-Id: 1133581 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 0911F40AC9 for ; Fri, 29 Jun 2012 23:19:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752778Ab2F2XT1 (ORCPT ); Fri, 29 Jun 2012 19:19:27 -0400 Received: from void.printf.net ([89.145.121.20]:33620 "EHLO void.printf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752503Ab2F2XT0 (ORCPT ); Fri, 29 Jun 2012 19:19:26 -0400 Received: from c-76-24-28-220.hsd1.ma.comcast.net ([76.24.28.220] helo=octavius.laptop.org) by void.printf.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1SkkTC-0002us-Dq; Sat, 30 Jun 2012 00:19:22 +0100 From: Chris Ball To: philipspatches@gmail.com Cc: linux-mmc@vger.kernel.org, aaron.lu@amd.com, mark.brown314@gmail.com, Philip Rakity Subject: Re: [PATCH 2/2] mmc: only support voltage (vdd) that regulator agree's with References: <1339183573-21688-1-git-send-email-prakity@marvell.com> Date: Fri, 29 Jun 2012 19:19:19 -0400 In-Reply-To: <1339183573-21688-1-git-send-email-prakity@marvell.com> (philipspatches@gmail.com's message of "Fri, 8 Jun 2012 12:26:13 -0700") Message-ID: <87pq8haeq0.fsf@octavius.laptop.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.97 (gnu/linux) MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Hi, On Fri, Jun 08 2012, philipspatches@gmail.com wrote: > From: Philip Rakity > > If we are using a regulator the SD Host Controller and the > regulator should agree about the voltages supported. Use > the common subset that is supported. > > Signed-off-by: Philip Rakity This breaks the build when CONFIG_REGULATOR=n -- I've applied what looks like the correct fix to me: diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index eae7c3c..caba999 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -2832,51 +2832,53 @@ int sdhci_add_host(struct sdhci_host *host) +#ifdef CONFIG_REGULATOR /* * According to SD Host Controller spec v3.00, if the Host System * can afford more than 150mA, Host Driver should set XPC to 1. Also * the value is meaningful only if Voltage Support in the Capabilities * register is set. The actual current value is 4 times the register * value. */ if (host->vmmc) { ret = regulator_is_supported_voltage(host->vmmc, 3300000, 3300000); if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_330))) caps[0] &= ~SDHCI_CAN_VDD_330; ret = regulator_is_supported_voltage(host->vmmc, 3000000, 3000000); if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_300))) caps[0] &= ~SDHCI_CAN_VDD_300; ret = regulator_is_supported_voltage(host->vmmc, 1800000, 1800000); if ((ret <= 0) || (!(caps[0] & SDHCI_CAN_VDD_180))) caps[0] &= ~SDHCI_CAN_VDD_180; } +#endif /* CONFIG_REGULATOR */ -- Chris Ball One Laptop Per Child -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html