From: Wolfgang Denk Date: Wed, 26 Mar 2014 10:01:37 +0100 Subject: [U-Boot] [PATCH v2 2/9] sunxi: initial sun7i pinmux and gpio support In-Reply-To: <1395822638.29683.9.camel@dagon.hellion.org.uk> References: <1395438845.2234.95.camel@hastur.hellion.org.uk> <1395438866-1193-2-git-send-email-ijc@hellion.org.uk> <201403242154.12633.marex@denx.de> <1395822638.29683.9.camel@dagon.hellion.org.uk> Message-ID: <20140326090137.E004A3814B8@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 Ian, [Cc: list truncated / changed] In message <1395822638.29683.9.camel@dagon.hellion.org.uk> you wrote: > > I looked at this transform in a few different contexts and one concern I > had was that readl and writel have barriers in them (after the read and > before the write respectively) while clrsetbits and friends do not. I They are supposed to. They map to the out_##type() / in_##type() standard I/O accessors which are supposed to be suitable to access device registers. I can see that the ARM implementation maps this to __raw_write##type() / __raw_read##type() and then to __arch_put##type() / __arch_get##type() which indeed do not include MBs. > But I think I am probably being overly cautious here and the obvious > transformation can be made. Anyone got any thoughts? I'm not an expert for ARM, but this indeed looks suspiscious - thanks for reporting this. It is conspicuous that Linux does not use out_##type() / in_##type() for ARM, and instead uses iowrite##type() / ioread##type() - which do include MBs. Albert - what do you think? 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 Drun'? 'm not drun'! You woudn' dare call m' drun' if I was sober! - Terry Pratchett, _Men at Arms_