u-boot/arch
Simon Glass 709ea543b9 stdio: Pass device pointer to stdio methods
At present stdio device functions do not get any clue as to which stdio
device is being acted on. Some implementations go to great lengths to work
around this, such as defining a whole separate set of functions for each
possible device.

For driver model we need to associate a stdio_dev with a device. It doesn't
seem possible to continue with this work-around approach.

Instead, add a stdio_dev pointer to each of the stdio member functions.

Note: The serial drivers have the same problem, but it is not strictly
necessary to fix that to get driver model running. Also, if we convert
serial over to driver model the problem will go away.

Code size increases by 244 bytes for Thumb2 and 428 for PowerPC.

22: stdio: Pass device pointer to stdio methods
       arm: (for 2/2 boards)  all +244.0  bss -4.0  text +248.0
   powerpc: (for 1/1 boards)  all +428.0  text +428.0

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
2014-07-23 14:07:23 +01:00
..
arc ARC: enable CONFIG_SYS_BOOT_RAMDISK_HIGH 2014-06-03 16:16:57 +04:00
arm Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2014-07-11 14:54:48 -04:00
avr32 avr32: migrate cache functions 2014-06-14 18:06:58 +02:00
blackfin stdio: Pass device pointer to stdio methods 2014-07-23 14:07:23 +01:00
m68k m68k: define __kernel_size_t as unsinged int again 2014-07-22 09:46:50 -04:00
microblaze Makefile: Support include files for .dts files 2014-06-20 11:55:03 -06:00
mips common/board_f: Initialized global data for generic board 2014-05-12 15:20:05 -04:00
nds32 bd_info: remove bi_barudrate member from struct bd_info 2014-05-12 15:19:45 -04:00
nios2 bd_info: remove bi_barudrate member from struct bd_info 2014-05-12 15:19:45 -04:00
openrisc openrisc: fix relocation code 2014-06-05 14:44:56 -04:00
powerpc stdio: Pass device pointer to stdio methods 2014-07-23 14:07:23 +01:00
sandbox sandbox: Support pre-relocation malloc() 2014-07-23 14:06:13 +01:00
sh bd_info: remove bi_barudrate member from struct bd_info 2014-05-12 15:19:45 -04:00
sparc sparc: merge LEON2 and LEON3 linker scripts 2014-07-22 07:44:24 -04:00
x86 stdio: Pass device pointer to stdio methods 2014-07-23 14:07:23 +01:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00