
17 Nov
2011
17 Nov
'11
10:50 p.m.
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