linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Vitaly Bordug <vbordug@ru.mvista.com>
To: Dan Malek <dan@embeddededge.com>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 2/2] POWERPC: Remove global CPM mappings
Date: Wed, 28 Mar 2007 03:01:21 +0400	[thread overview]
Message-ID: <20070328030121.2fca0e90@localhost.localdomain> (raw)
In-Reply-To: <BAD18DB7-81D9-43D3-890B-7E79B7C80F03@embeddededge.com>

On Tue, 27 Mar 2007 18:12:38 -0400
Dan Malek wrote:

> 
> 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.
> 

ok.
> > +#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.
> 
> 
The upper relates to arch/ppc code, which uses different structures and variables (cpm2_immr and immap respectively).  With this, I don't want to unify  cpm and cpm2 immrs, at least, not now. They are separated intentionally: while doing cpm2_map one gets access to one of the cpm2_map_t member, and doing immr_map, to immap_t member. 

Those 2 as you know better than anyone here are very similar and very different at the same time, and masking the difference is confusion-prone I think.

Thanks for looking into this!

--
Sincerely, Vitaly

  reply	other threads:[~2007-03-27 23:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-27 21:00 [PATCH 1/2] POWERPC: Remove global CPM2 mappings Vitaly Bordug
2007-03-27 21:01 ` [PATCH 2/2] POWERPC: Remove global CPM mappings Vitaly Bordug
2007-03-27 22:12   ` Dan Malek
2007-03-27 23:01     ` Vitaly Bordug [this message]
     [not found] <20070423223649.4955.77579.stgit@localhost.localdomain>
2007-04-23 22:39 ` Vitaly Bordug
2007-04-24  1:26   ` Dan Malek
2007-04-24  5:18     ` Vitaly Bordug
2007-04-24 20:24       ` Dan Malek
2007-04-24 23:57         ` Vitaly Bordug

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070328030121.2fca0e90@localhost.localdomain \
    --to=vbordug@ru.mvista.com \
    --cc=dan@embeddededge.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).