public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 04/10] change all versions of input_data() and output_data() to global weak aliases
Date: Tue, 9 Oct 2012 19:13:12 +0200	[thread overview]
Message-ID: <201210091913.12242.marex@denx.de> (raw)
In-Reply-To: <1480258.PJugxh5WsK@bloomfield>

Dear Pavel Herrmann,

> On Sunday 07 of October 2012 20:14:23 Marek Vasut wrote:
> > Dear Pavel Herrmann,
> > 
> > > This changes input_data() and friends from static function to global
> > > symbols under weak alias, to enable board specific overrides (and
> > > therefore get rid of board-specific code in cmd_ide.c)
> > > Also declare ide_bus_offset in the header file, so other files can use
> > > ATA_CURR_BASE as well.
> > > 
> > > Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
> > > ---
> > 
> > [...]
> > 
> > > +void ide_input_swap_data(int dev, ulong *sect_buf, int words)
> > > +	__attribute__ ((weak, alias("__ide_input_swap_data")));
> > 
> > #include <linux/compiler.h>
> > 
> > __weak void ide_input_swap_data(int dev, ulong *sect_buf, int words)
> > {
> > 
> >    ... body ...
> > 
> > }
> > 
> > Works just fine ;-)
> > 
> > [...]
> > 
> > > +/*
> > > + * I/O function overrides
> > > + */
> > > +void ide_input_swap_data(int dev, ulong *sect_buf, int words);
> > > +void ide_input_data(int dev, ulong *sect_buf, int words);
> > > +void ide_output_data(int dev, const ulong *sect_buf, int words);
> > > +void ide_input_data_shorts(int dev, ushort *sect_buf, int words);
> > > +void ide_output_data_shorts(int dev, ushort *sect_buf, int words);
> > 
> > Shorts ... you mean like pants ? :-p
> > 
> > I'd say it's supposed to be "short", like u16 ;-)
> 
> the code says "shorts", as in "multiple of u16", rather than "pants".

Hm, ide_input_data_u16 is good, no ?

Best regards,
Marek Vasut

  reply	other threads:[~2012-10-09 17:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-07 15:56 [U-Boot] [PATCH 00/10] IDE code cleanup Pavel Herrmann
2012-10-07 15:56 ` [U-Boot] [PATCH 01/10] remove CONFIG_SC3 from cmd_ide.c Pavel Herrmann
2012-10-17 15:02   ` [U-Boot] [U-Boot,01/10] " Tom Rini
2012-10-07 15:56 ` [U-Boot] [PATCH 02/10] split mpc8xx hooks " Pavel Herrmann
2012-10-07 18:09   ` Marek Vasut
2012-10-07 18:09   ` Marek Vasut
2012-10-09 17:01   ` [U-Boot] [PATCH v2 " Pavel Herrmann
2012-10-07 15:56 ` [U-Boot] [PATCH 03/10] split IVM power " Pavel Herrmann
2012-10-07 15:56 ` [U-Boot] [PATCH 04/10] change all versions of input_data() and output_data() to global weak aliases Pavel Herrmann
2012-10-07 18:14   ` Marek Vasut
2012-10-09 13:42     ` Pavel Herrmann
2012-10-09 17:13       ` Marek Vasut [this message]
2012-10-09 17:04   ` [U-Boot] [PATCH v2 " Pavel Herrmann
2012-10-07 15:56 ` [U-Boot] [PATCH 05/10] split CPC45 board-specific IDE functions from cmd_ide.c Pavel Herrmann
2012-10-07 18:20   ` Marek Vasut
2012-10-09 13:38     ` Pavel Herrmann
2012-10-09 17:13       ` Marek Vasut
2012-10-07 15:56 ` [U-Boot] [PATCH 06/10] make ide_led() a weak alias Pavel Herrmann
2012-10-07 15:56 ` [U-Boot] [PATCH 07/10] move CPC45 ide_led to the same file as other IDE hooks Pavel Herrmann
2012-10-07 18:21   ` Marek Vasut
2012-10-09 17:06   ` [U-Boot] [PATCH v2 " Pavel Herrmann
2012-10-07 15:56 ` [U-Boot] [PATCH 08/10] split AU1X00 specific code from cmd_ide.c Pavel Herrmann
2012-10-08 23:38   ` Tom Rini
2012-10-09 13:35     ` Pavel Herrmann
2012-10-09 17:10   ` [U-Boot] [PATCH v2 " Pavel Herrmann
2012-10-07 15:56 ` [U-Boot] [PATCH 09/10] split PCS440EP " Pavel Herrmann
2012-10-07 15:56 ` [U-Boot] [PATCH 10/10] remove unnecessary includes " Pavel Herrmann
2012-10-07 18:23 ` [U-Boot] [PATCH 00/10] IDE code cleanup 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=201210091913.12242.marex@denx.de \
    --to=marex@denx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox