From: Chris Ball <cjb@laptop.org>
To: Philip Rakity <prakity@marvell.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Mark Brown <markb@marvell.com>
Subject: Re: [PATCH V2 2/2] sdhci: Support for SD/MMC Dual Data Rate
Date: Sun, 2 Jan 2011 19:32:29 +0000 [thread overview]
Message-ID: <20110102193229.GC24820@void.printf.net> (raw)
In-Reply-To: <2D605427-1ED4-4599-9F4D-0ED8A4FB6D4E@marvell.com>
On Sun, Jan 02, 2011 at 11:02:32AM -0800, Philip Rakity wrote:
> > What do you think about passing the ddr mode itself (MMC_1_8V_DDR_MODE)
> > and having set_signaling_voltage() work out what voltage it needs to use
> > to achieve that? I don't like passing the raw number around so much.
>
> hmmm
>
> concur about numbers and can pass the mode in. The concern I had was if this function
> ever needed to be more generic then wanted the voltage. Thought about using the VDD
> voltage defines but they are a range of values and not appropriate. Thoughts ?
Ah, okay, makes sense.
I don't know how likely it is that you'll need the SDHCI layer to tell
you which signaling voltage to use in future -- if it doesn't seem
likely now, I think passing the mode is probably sensible enough.
> >> --- a/drivers/mmc/host/sdhci.h
> >> +++ b/drivers/mmc/host/sdhci.h
> >> @@ -182,6 +182,9 @@
> >> #define SDHCI_CAN_64BIT 0x10000000
> >>
> >> #define SDHCI_CAPABILITIES_1 0x44
> >> +#define SDHCI_CAN_SDR50 0x00000001
> >> +#define SDHCI_CAN_SDR104 0x00000002
> >> +#define SDHCI_CAN_DDR50 0x00000004
> >>
> >
> > You could use the BIT(0..2) macros here.
>
> would prefer
> 1<<0
> 1<<1
> 1<<2
>
> you okay with this ?
Yeah, that's also fine, either works. The only reason to prefer BIT()
is that it saves you from writing the above without surrounding parens.
Thanks,
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2011-01-02 19:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-02 16:45 [PATCH V2 2/2] sdhci: Support for SD/MMC Dual Data Rate Philip Rakity
2011-01-02 18:55 ` Chris Ball
2011-01-02 19:02 ` Philip Rakity
2011-01-02 19:32 ` Chris Ball [this message]
2011-01-02 19:53 ` [PATCH V3 " Philip Rakity
2011-01-04 3:39 ` [PATCH V2 " zhangfei gao
2011-01-04 4:25 ` Philip Rakity
2011-01-04 4:37 ` Philip Rakity
2011-01-04 4:52 ` Philip Rakity
2011-01-04 4:41 ` Philip Rakity
2011-01-09 23:28 ` Chris Ball
2011-01-10 3:05 ` zhangfei gao
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=20110102193229.GC24820@void.printf.net \
--to=cjb@laptop.org \
--cc=linux-mmc@vger.kernel.org \
--cc=markb@marvell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox