From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Tue, 11 Dec 2007 19:59:01 +0100 Subject: [U-Boot-Users] [PATCH 4/6] cfi_flash: Introduce read and write accessors In-Reply-To: <20071211181317.7a9abc4e@dhcp-252-066.norway.atmel.com> References: <20071211164644.6430849a@dhcp-252-066.norway.atmel.com> <20071211162522.1574024657@gemini.denx.de> <20071211181317.7a9abc4e@dhcp-252-066.norway.atmel.com> Message-ID: <200712111959.01940.sr@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 On Tuesday 11 December 2007, Haavard Skinnemoen wrote: > > > That would probably be better. It's just that I'm having a hard time > > > finding a set of macros that > > > a) is available on all architectures > > > b) don't do any byte swapping or other tricks > > > > > > __raw_writeb() and friends would satisfy b) but not a)... > > > > Then we eventually should implement these for the missing > > architetures. > > > > Kumar is right. We definitely must use the "real" accessor functions. > > Yeah, I agree too. >From a quick glance in the Linux mtd cfi driver, it looks like it boils down to those __raw_writeb() and friends here too. So this should be a good choice for U-Boot too. > From a quick glance, m68k, powerpc, nios and nios2 lack these > functions. Anything special I need to know about those architectures, > or should I just grab them from Linux or use volatile? Best would be to add the Linux variants from my point of view. If this gets too complicated for you, since you can't know all those platforms by heart, just add the volatile accesses for now and add a big comment in the header. Then the maintainers/custodians should fix this later. But we should really try to get all this great cfi rework accepted in this merge window. Best regards, Stefan ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================