All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] cmd_ide: Convert to [read,write][b,w]
Date: Thu, 1 Jul 2010 02:09:32 +0200	[thread overview]
Message-ID: <201007010209.32414.marek.vasut@gmail.com> (raw)
In-Reply-To: <201006240236.00745.marek.vasut@gmail.com>

Dne ?t 24. ?ervna 2010 02:36:00 Marek Vasut napsal(a):
> Dne St 23. ?ervna 2010 22:51:28 Wolfgang Denk napsal(a):
> > Dear Marek Vasut,
> > 
> > In message <1277320683-2057-1-git-send-email-marek.vasut@gmail.com> you 
wrote:
> > > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > > ---
> > > 
> > >  common/cmd_ide.c |   22 +++++++++++++---------
> > >  1 files changed, 13 insertions(+), 9 deletions(-)
> > 
> > I don't see the big advantage of this patch yet.
> 
> It won't compile at least on ARM. Same case as with the dm9000 ethernet
> adapter.
> 
> > >  #ifndef CONFIG_SYS_ATA_PORT_ADDR
> > > 
> > > @@ -526,7 +526,7 @@ __ide_outb(int dev, int port, unsigned char val)
> > > 
> > >  {
> > >  
> > >  	debug ("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n",
> > >  	
> > >  		dev, port, val,
> 
> (ATA_CURR_BASE(dev)+CONFIG_SYS_ATA_PORT_ADDR(port)));
> 
> > > -	outb(val, (ATA_CURR_BASE(dev)+CONFIG_SYS_ATA_PORT_ADDR(port)));
> > > +	writeb(val, (ATA_CURR_BASE(dev)+CONFIG_SYS_ATA_PORT_ADDR(port)));
> > 
> > So we replace outb() => writeb(), but the function where this is used
> > is still __ide_outb() ?
> > 
> > The __ide_outb() => outb() mapping looks more logical to me.
> 
> See above.
> 
> > > -output_data(int dev, ulong *sect_buf, int words)
> > > +output_data(int dev, uint16_t *sect_buf, int words)
> > > 
> > >  {
> > > 
> > > -	outsw(ATA_CURR_BASE(dev)+ATA_DATA_REG, sect_buf, words<<1);
> > > +	int i;
> > > +	for (i = 0; i < (words << 1); i++)
> > > +		writew(sect_buf[i], ATA_CURR_BASE(dev)+ATA_DATA_REG);
> > 
> > And here the code size is growing, too.
> 
> Possibly, I was unsure if there is some implementation of writesw/readsw
> elsewhere then on PPC.
> 
> > What are the exact advantages of your version?
> 
> That it actually compiles and works on other architectures than ppc.
> 
> > Best regards,
> > 
> > Wolfgang Denk
> 
> Cheers

Any updates ?

  reply	other threads:[~2010-07-01  0:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23 19:18 [U-Boot] [PATCH] cmd_ide: Convert to [read,write][b,w] Marek Vasut
2010-06-23 20:51 ` Wolfgang Denk
2010-06-24  0:36   ` Marek Vasut
2010-07-01  0:09     ` Marek Vasut [this message]
2010-07-01  0:44       ` Albert ARIBAUD
2010-07-01  3:33         ` Marek Vasut
2010-07-21 14:42           ` Marek Vasut

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=201007010209.32414.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.