[U-Boot] [PATCH v3 06/12] OMAP3: Suffix all Micron memory timing parts with their speed

Tom Rini trini at ti.com
Thu Nov 17 22:50:46 CET 2011


On 11/09/2011 11:23 PM, Heiko Schocher wrote:
> Hello Tom,
> 
> Tom Rini wrote:
[snip]
>> +#define MICRON_V_MCFG_165		((MICRON_LOCKSTATUS_165 << 30) | \
>                                                                    ^
> Please substitute this magic values in this patch by an define.

OK, what I've got now is a macro to calculate the MCFG values based on a
few inputs.  What I don't think helps readability is doing:

#define V_MCFG_CASWIDTH_SHIFT 20
#define V_MCFG_CASWIDTH (0x3 << V_MCFG_CASWIDTH_SHIFT)
when
#define V_MCFG_CASWIDTH (0x3 << 20) /* 20:23 */

will do.

It can make sense in places where it's not otherwise clear why you're
doing a shift but in these cases

-- 
Tom


More information about the U-Boot mailing list