From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Wed, 26 May 2010 13:50:15 -0400 Subject: [U-Boot] [PATCH] arm:io.h: define __io() macro if not defined erlier In-Reply-To: <4BFCEEA1.3080202@corscience.de> References: <1274259427-29386-1-git-send-email-biessmann@corscience.de> <20100525112907.0E0A9E22AD1@gemini.denx.de> <4BFCEEA1.3080202@corscience.de> Message-ID: <201005261350.16464.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 26 May 2010 05:49:21 Andreas Bie?mann wrote: > Am 25.05.2010 13:29, schrieb Wolfgang Denk: > > In message <4BFB8708.4010408@corscience.de> you wrote: > >> I think the easiest way to solve this is to create another patch > >> including exactely the changes sent before plus removing {in|out}[bwl] > >> macros in omap1510.h. > > Well ... this statement was a bit precipitate. Just defining __io() to > get {in|out}[bwl] macros in asm/io.h for arch arm is dangerous cause the > enabled macros do conversion from/to little endian. This is ok for > some/most current arm devices but may be wrong for older ones (eg. > omap1510). > > > Sounds like a plan to me. > > I can not test the generated code on omap1510 therefore my current > suggestion is to modify commit a45dde2293c816138e53c26eca6fd0322583f9a6 > to something like attached at end of this message. Each devices asm/io.h > using dm9000x defines __raw_{read|write}[bwl] and therefore it would be > an easy task (easier than rewriting arm asm/io.h). i changed the accessors to use in/out macros as i thought that was the correct set of accessor functions to use. looking at a set of definitions and picking a set because they look like they'll "just work" isnt how i set about it. after having read the deviceiobook in the Linux kernel, i think the correct funcs to use here are the read/write helpers. now that i have that information, looking at the definitions shows that this should work for ARM just fine. so, to be clear, i think we should do: -#define DM9000_outb(d,r) outb(d, r) +#define DM9000_outb(d,r) writeb(d, r) etc... -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20100526/d1860205/attachment.pgp