From: Chris Ball <cjb@laptop.org>
To: Aaron Lu <aaron.lu@amd.com>
Cc: Philip Rakity <prakity@marvell.com>,
linux-mmc@vger.kernel.org, Aaron Lu <aaron.lwe@gmail.com>
Subject: Re: [PATCH 2/2] mmc: sd: Fix sd current limit setting
Date: Tue, 03 Jul 2012 20:52:46 -0400 [thread overview]
Message-ID: <87mx3g5ov5.fsf@octavius.laptop.org> (raw)
In-Reply-To: <1341296172-10645-3-git-send-email-aaron.lu@amd.com> (Aaron Lu's message of "Tue, 3 Jul 2012 14:16:12 +0800")
Hi,
On Tue, Jul 03 2012, Aaron Lu wrote:
> Host has different current capabilities at different voltages, we need
> to record these settings seperately. Before set current limit for the sd
> card, find out the current voltage first and then find out the current
> capabilities of the host to set the limit.
>
> Signed-off-by: Aaron Lu <aaron.lu@amd.com>
> [...]
> + switch (1 << card->host->ios.vdd) {
> + case MMC_VDD_165_195:
> + voltage = 0; /* host's voltage is 1.8V */
> + break;
> + case MMC_VDD_29_30:
> + case MMC_VDD_30_31:
> + voltage = 1; /* host's voltage is 3.0V */
> + break;
> + case MMC_VDD_32_33:
> + case MMC_VDD_33_34:
> + voltage = 2; /* host's voltage is 3.3V */
> + break;
> + default:
> + BUG(); /* host's voltage is invalid */
Please don't call BUG() -- that could easily cause a kernel panic here
(the mmc_core module will hang), which is unjustified. You'll need to
figure out what exactly you want to have happen when the host's voltage
is invalid, and do that without affecting other controllers that are
in use on the board.
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2012-07-04 0:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 6:16 [PATCH 0/2] SD current limit setting fix Aaron Lu
2012-07-03 6:16 ` [PATCH 1/2] mmc: core: Simplify and fix for SD switch processing Aaron Lu
2012-07-04 0:48 ` Chris Ball
2012-07-03 6:16 ` [PATCH 2/2] mmc: sd: Fix sd current limit setting Aaron Lu
2012-07-03 14:18 ` Philip Rakity
2012-07-04 0:52 ` Chris Ball [this message]
2012-07-04 5:31 ` [PATCH v2 " Aaron Lu
2012-07-09 1:23 ` Philip Rakity
2012-07-10 2:57 ` Chris Ball
2012-07-17 9:34 ` [PATCH " Girish K S
2012-07-17 13:43 ` Aaron Lu
2012-07-17 15:43 ` Chris Ball
2012-07-18 5:09 ` Aaron Lu
2012-07-18 5:28 ` Chris Ball
2012-07-18 6:22 ` Aaron Lu
2012-07-19 2:41 ` Chris Ball
2012-07-19 3:47 ` Philip Rakity
2012-07-19 6:25 ` Chris Ball
2012-07-19 4:47 ` Girish K S
2012-07-19 5:03 ` Chris Ball
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=87mx3g5ov5.fsf@octavius.laptop.org \
--to=cjb@laptop.org \
--cc=aaron.lu@amd.com \
--cc=aaron.lwe@gmail.com \
--cc=linux-mmc@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox