From: Wolfgang Denk Date: Tue, 29 Apr 2008 22:43:48 +0200 Subject: [U-Boot-Users] cfi_flash.c and lost volatile qualifier In-Reply-To: Your message of "Tue, 29 Apr 2008 16:20:09 EDT." Message-ID: <20080429204348.1ED4C247B4@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 In message you wrote: > > I narrowed down the source of the problem to the loss of the > volatile qualifier on the addr pointer in flash_write_cmd(). Adding the > qualifier gets rid of the corruption. In the older 1.2.0 sources, addr was > declared as "volatile cfiptr_t addr;". The volatile should not be needed - the CFI driver should use correct accessor macros instead. See Documentation/volatile-considered-harmful.txt in your Linux kernel source tree... 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 No one wants war. -- Kirk, "Errand of Mercy", stardate 3201.7