From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tolunay Orkun Date: Sat, 10 Feb 2007 01:23:11 -0600 Subject: [U-Boot-Users] [PATCH0/2] Re-do the patch for adding DO_SYNC in flash_write_cmd In-Reply-To: <20070210010420.CD5CB353CAA@atlas.denx.de> References: <20070210010420.CD5CB353CAA@atlas.denx.de> Message-ID: <45CD72DF.8070409@orkun.us> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > In message <1171050483.3932.31.camel@udp097531uds.am.freescale.net> you wrote: >> SYNC is defined as >> " #define SYNC \ >> sync; \ >> isync >> " in include/ppc_asm.tmpl, >> >> and can not be used by .c file, am I right? :-). In fact it is used by >> the start.S file for 85xx/83xx/8xx/4xx/5xxx/74xx_7xx. >> >> We need to define SYNC as asm("sync;"). > > Or, to be sure, ""sync;isync" OK. > > Where is the problem? Which code includes include/ppc_asm.tmpl ? Why > cannot we have the same definition once for C and again for > assembler? I agree, I think we can define the equivalent one in a C header file #define SYNC asm("sync; isync;") I am not sure if the assembler one is ever included in the C code. Tolunay