Re: [PATCH V2 2/2] sdhci: Support for SD/MMC Dual Data Rate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>   <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux