From: Wolfgang Denk Date: Sat, 19 Feb 2011 20:22:59 +0100 Subject: [U-Boot] [PATCH 1/2 V3] at91sam9261ek: make operational again In-Reply-To: References: <1296909810-14177-1-git-send-email-linux@bohmer.net> <4CEBA5B8-83D1-4F92-94EA-6DE138BAACE6@googlemail.com> <4D5E16FE.7000209@emk-elektronik.de> Message-ID: <20110219192259.C056715365A@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Remy Bohmer, In message you wrote: > > > I'd recommend setting this to the very beginning of SDRAM(0x20000000), > > note that initial SP and GD would be put into SRAM further down. > > The SRAM is used by the LCD controller. So, we cannot use it for the SP and GD. Why not? LCD is most probably only initialized and used after relocation, while stack and GD are needed and used only before that... > >>> +#define CONFIG_SYS_SDRAM_SIZE 0x04000000 /* 64 megs> */ > > > > It is up to you, but (64 << 20) might look "nicer". > > This is more a matter of taste I think. I will see what I do with it. It's not only a matter of taste, but also a matter of readability. If I see 0x04000000 I cannot really tell immediately if this is a bit mask or anything else, and even if I know from the context that it's a size, I cannot immediately say how much it is. On the other hand, a notation like "64 * 1024 * 1024" or (shorter) "64 << 20" makes it immediately clear that 1) it's some number, probably a size, and 2) that it's 64 MiB. In the interest of maitainability please chose a more readable way to specify such numbers. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Es ist nicht genug zu wissen, man mu? auch anwenden; es ist nicht ge- nug zu wollen, man mu? auch tun. -- Goethe, Maximen und Reflexionen