From: Wolfgang Denk Date: Sun, 09 Nov 2008 21:03:52 +0100 Subject: [U-Boot] [PATCH-OMAP3] OMAP3: Fix typo and cp_delay In-Reply-To: <49172e21.0407560a.71cf.ffffba13@mx.google.com> References: <49172e21.0407560a.71cf.ffffba13@mx.google.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear dirk.behme at googlemail.com, In message <49172e21.0407560a.71cf.ffffba13@mx.google.com> you wrote: > Subject: [PATCH-OMAP3] OMAP3: Fix typo and cp_delay > > From: Dirk Behme > > Fix typo and cp_delay. Requested by Wolfgang Denk. See previous comments. > Signed-off-by: Dirk Behme > > --- > > Regarding cp_delay there was the comment: > > -- cut -- > >+static void cp_delay(void) > >+{ > >+ volatile int i; > >+ > >+ /* Many OMAP regs need at least 2 nops */ > >+ for (i = 0; i < 100; i++) ; > > There is not much reason for the compiler not to optimize this code away. > -- cut -- > > Please note that most of ARM code uses *this* cp_delay() implementation. If I understood correctly at IRC, Scott Wood made some tests and volatile prevents gcc from optimizing loop away. Now this is actually some interesting information which probably should be part of the commit message - in the present form, it just gets lost. 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 at denx.de "Deliver yesterday, code today, think tomorrow."