From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dirk Behme Date: Tue, 21 Dec 2010 09:37:14 +0100 Subject: [U-Boot] [RFC PATCH v2] ARM: Avoid compiler optimization for usages of readb, writeb and friends. In-Reply-To: <20101221081713.B0277B715C@gemini.denx.de> References: <1292711230-3234-1-git-send-email-holler@ahsoftware.de> <4D0DB994.1020703@googlemail.com> <4D0DDCEF.2040806@ahsoftware.de> <4D0E643A.9040001@ahsoftware.de> <4D0EA9BB.4050002@ahsoftware.de> <4D0F8E75.2010107@ahsoftware.de> <4D105324.2080201@googlemail.com> <4D105583.8070703@free.fr> <4D105FB3.3090801@googlemail.com> <20101221081713.B0277B715C@gemini.denx.de> Message-ID: <4D10673A.4060306@googlemail.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 21.12.2010 09:17, Wolfgang Denk wrote: > Dear Dirk Behme, > > In message<4D105FB3.3090801@googlemail.com> you wrote: >> >> Broken: >> ====== > ... >> static void omap_nand_hwcontrol(struct mtd_info *mtd, int32_t cmd, >> uint32_t ctrl) >> { >> register struct nand_chip *this = mtd->priv; >> ... >> if (cmd != -1) >> ({ do { } while (0); (*(volatile unsigned char *)(this->IO_ADDR_W)> >> = (cmd)); }); > > But this is the old, discarded version of the patch. > > I though we had agreed that we have to use the > > __asm__ __volatile__ ("" : : : "memory") > > version instead? Yes. I mixed the patches :( Sorry for the noise. I just sent the hopefully correct version some minutes ago. Thanks Dirk