From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Herrmann Date: Tue, 09 Oct 2012 15:42:11 +0200 Subject: [U-Boot] [PATCH 04/10] change all versions of input_data() and output_data() to global weak aliases In-Reply-To: <201210072014.24053.marex@denx.de> References: <1349625374-12391-1-git-send-email-morpheus.ibis@gmail.com> <1349625374-12391-5-git-send-email-morpheus.ibis@gmail.com> <201210072014.24053.marex@denx.de> Message-ID: <1480258.PJugxh5WsK@bloomfield> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > --- > > [...] > > > +void ide_input_swap_data(int dev, ulong *sect_buf, int words) > > + __attribute__ ((weak, alias("__ide_input_swap_data"))); > > #include > > __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". Pavel Herrmann