From: Tushar Behera <tushar.behera@linaro.org>
To: philipspatches@gmail.com
Cc: cjb@laptop.org, linux-mmc@vger.kernel.org, aaron.lu@amd.com,
mark.brown314@gmail.com, Philip Rakity <prakity@marvell.com>
Subject: Re: [PATCH 2/2] mmc: only support voltage (vdd) that regulator agree's with
Date: Fri, 09 Nov 2012 15:20:37 +0530 [thread overview]
Message-ID: <509CD1ED.5050402@linaro.org> (raw)
In-Reply-To: <1339183573-21688-1-git-send-email-prakity@marvell.com>
On 06/09/2012 12:56 AM, philipspatches@gmail.com wrote:
> From: Philip Rakity <prakity@marvell.com>
>
> 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 <prakity@marvell.com>
> ---
> drivers/mmc/host/sdhci.c | 15 +++++++++++++++
> 1 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 248f68b..78be427 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -2894,6 +2894,21 @@ int sdhci_add_host(struct sdhci_host *host)
> * 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;
> + }
> +
> max_current_caps = sdhci_readl(host, SDHCI_MAX_CURRENT);
> if (!max_current_caps && host->vmmc) {
> u32 curr = regulator_get_current_limit(host->vmmc);
>
Does the above code mean that 2.8V for vmmc regulator is not a valid value?
Currently I am working on a board for which vmmc regulator voltage is
set as 2.8V and the SD/MMC card is working fine (by not defining vmmc in
platform code).
--
Tushar Behera
prev parent reply other threads:[~2012-11-09 9:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-08 19:26 [PATCH 2/2] mmc: only support voltage (vdd) that regulator agree's with philipspatches
2012-06-27 16:46 ` Chris Ball
2012-06-29 23:19 ` Chris Ball
2012-07-03 6:06 ` Aaron Lu
2012-07-03 6:12 ` Chris Ball
2012-11-09 9:50 ` Tushar Behera [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=509CD1ED.5050402@linaro.org \
--to=tushar.behera@linaro.org \
--cc=aaron.lu@amd.com \
--cc=cjb@laptop.org \
--cc=linux-mmc@vger.kernel.org \
--cc=mark.brown314@gmail.com \
--cc=philipspatches@gmail.com \
--cc=prakity@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.