From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Juha_Yrj=F6l=E4?= Subject: Re: [PATCH] ARM: OMAP: Add minimal OMAP2430 support Date: Sun, 11 Jun 2006 15:50:36 +0300 Message-ID: <448C119C.1060806@solidboot.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-omap-open-source-bounces@linux.omap.com Errors-To: linux-omap-open-source-bounces@linux.omap.com To: "Woodruff, Richard" Cc: linux-omap-open-source@linux.omap.com List-Id: linux-omap@vger.kernel.org Woodruff, Richard wrote: > I picked up this encoding from USB which uses it also. In general it > makes any kind of porting and sharing between some of our internal code > bases easier. It has a nice property of also being more compact (in C > file coding space) then other forms. That encoding has a lot of downsides: - You're tied to accessing only one instance of the peripheral (trying to access e.g. the different GPIO blocks is bound to be ugly). - You're tied to MMIO. read_reg/write_reg can basically use whatever transport. - As mentioned before, supporting several base addresses (e.g. on different OMAPs) becomes a hassle. read_reg/write_reg, in my opinion, doesn't. You mention compactness as one, but with some preprocessor trickery it's rather easy to come up with a very compact read_reg/write_reg notation. But all in all, this is mostly a readability issue, and therefore subject to personal preferences. Mine is read_reg/write_reg. =) Cheers, Juha