From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp106.biz.mail.re2.yahoo.com (smtp106.biz.mail.re2.yahoo.com [206.190.52.175]) by ozlabs.org (Postfix) with SMTP id 87264DDF28 for ; Wed, 28 Mar 2007 08:19:18 +1000 (EST) In-Reply-To: <20070327210102.22195.81287.stgit@localhost.localdomain> References: <20070327210046.22195.772.stgit@localhost.localdomain> <20070327210102.22195.81287.stgit@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: From: Dan Malek Subject: Re: [PATCH 2/2] POWERPC: Remove global CPM mappings Date: Tue, 27 Mar 2007 18:12:38 -0400 To: Vitaly Bordug Cc: linuxppc-dev , Paul Mackerras List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mar 27, 2007, at 5:01 PM, Vitaly Bordug wrote: > --- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c > +++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c > @@ -52,7 +52,7 @@ > void cpm_line_cr_cmd(int line, int cmd) > { > ushort val; > - volatile cpm8xx_t *cp = cpmp; > + volatile cpm8xx_t *cp = (cpm8xx_t *)immr_map(im_cpm); I'd kind of prefer you didn't place function calls or macros up here with the variable declarations. Do the initialization down in the code section, please. > +#ifdef CONFIG_CPM2 > #define cpm2_map(member) (&cpm2_immr->member) > #define cpm2_map_size(member, size) (&cpm2_immr->member) > #define cpm2_unmap(addr) do {} while(0) > +#endif > + > +#ifdef CONFIG_8xx > +#define immr_map(member) (&((immap_t *)IMAP_ADDR)->member) > +#define immr_map_size(member, size) (&((immap_t *)IMAP_ADDR)->member) > +#define immr_unmap(addr) do {} while(0) > +#endif Why is 8xx different? We should be able to devine cpm_immr and use it in both cases here, and hopefully use the same macro names across all drivers, too. Thanks. -- Dan