u-boot-brain/include/asm-generic
Paul Burton d4150ca6de Provide a generic io.h & address mapping functions
Most architectures currently supported by U-Boot use trivial
implementations of map_to_physmem & virt_to_phys which simply cast a
physical address to a pointer for use a virtual address & vice-versa.
This results in a lot of duplicate implementations of these mapping
functions.

The set of functions provided by different architectures also differs,
with some having implementations of phys_to_virt & others not. A later
patch will make use of phys_to_virt in architecture-neutral code, and so
requires that it be provided for all architectures.

This patch introduces an asm-generic/io.h which provides generic
implementations of address mapping functions, allowing the duplication
of them between architectures to be removed. Once architectures are
converted to make use of this generic header it will also ensure that
all of phys_to_virt, virt_to_phys, map_physmem & unmap_physmem are
provided. The 2 families of functions differ in that map_physmem may
create dynamic mappings whilst phys_to_virt may not & therefore is more
limited in scope but doesn't require information such as a length &
flags.

This patch doesn't convert any architectures to make use of this generic
header - later patches in the series will do so.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
Cc: Angelo Dureghello <angelo@sysam.it>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Macpaul Lin <macpaul@andestech.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Thomas Chou <thomas@wytron.com.tw>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Angelo Dureghello <angelo@sysam.it>
Tested-by: Angelo Dureghello <angelo@sysam.it>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2017-10-02 21:52:19 -04:00
..
bitops include: Add generic bitops headers 2015-11-05 10:51:57 -05:00
atomic-long.h ubifs: Import atomic_long operations from Linux 2015-01-28 07:42:35 +01:00
bitsperlong.h linux/bitops.h: GENMASK copy from linux 2015-10-21 09:14:07 -04:00
global_data.h env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
gpio.h dm: gpio: Add live tree support 2017-06-01 07:03:10 -06:00
io.h Provide a generic io.h & address mapping functions 2017-10-02 21:52:19 -04:00
ioctl.h x86: Fix support for booting bzImage 2010-05-06 00:17:01 +02:00
sections.h efi_loader: rename __efi_hello_world_* 2017-09-18 23:53:56 +02:00
signal.h asm-generic/signal.h: import from linux 2010-01-17 20:36:05 -05:00
u-boot.h powerpc: Partialy restore core of mpc8xx 2017-07-08 15:55:26 -04:00
unaligned.h asm-generic/unaligned.h: dynamic default unaligned accesses 2010-03-14 00:10:09 +01:00