Return-Path: Received: from protonic.prtnl (protonic.xs4all.nl [213.84.116.84]) by ozlabs.org (Postfix) with ESMTP id 63E58DDD0C for ; Mon, 11 May 2009 16:56:11 +1000 (EST) From: David Jander To: linuxppc-dev@ozlabs.org Subject: Re: [PATCH 02/12] fs_enet: Add MPC5121 FEC support. Date: Mon, 11 May 2009 08:56:58 +0200 References: <20090506224134.83F1583420E8@gemini.denx.de> <4b73d43f0905071902y3b51d36ct2a04c560b5acdfb9@mail.gmail.com> <20090508.005251.14244652.davem@davemloft.net> In-Reply-To: <20090508.005251.14244652.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Message-Id: <200905110856.59043.david.jander@protonic.nl> Cc: David Miller , wd@denx.de List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Friday 08 May 2009 09:52:51 David Miller wrote: > From: John Rigby > Date: Thu, 7 May 2009 20:02:53 -0600 > > > Also don't forget that the register map is the same on 512x, mx and > > coldfire platforms but not on the other ppc platforms so if you want > > to one binary to rule them all you will need to have an offest table > > or some such. > > I would suggest using ->read_reg() ->write_reg() methods for abstracting > this. That's how we handle all of the different way ESP scsi chips > have their registers wired up. > > I/O register reads take hundreds, if not thousands of CPU cycles so, > relatively speaking, the indirection costs absolutely nothing. I fear the memory-mapped I/O of the PowerPC SoC is *slightly* faster, so in terms of cycle count, this WILL matter, although depending on how much register-I/O the driver does, overall performance impact _may_ still be negligible. I suggest testing this (benchmarks) before and after the change. Best regsards, -- David Jander Protonic Holland.