From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 17 Nov 2011 14:50:46 -0700 Subject: [U-Boot] [PATCH v3 06/12] OMAP3: Suffix all Micron memory timing parts with their speed In-Reply-To: <4EBB6DDF.3030400@denx.de> References: <1320858666-17113-1-git-send-email-trini@ti.com> <1320858666-17113-7-git-send-email-trini@ti.com> <4EBB6DDF.3030400@denx.de> Message-ID: <4EC581B6.8080101@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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