Skip to content
Snippets Groups Projects
Select Git revision
9 results

io.h

Blame
    • Paul Burton's avatar
      d4150ca6
      Provide a generic io.h & address mapping functions · d4150ca6
      Paul Burton authored
      
      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: default avatarPaul 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: default avatarAngelo Dureghello <angelo@sysam.it>
      Tested-by: default avatarAngelo Dureghello <angelo@sysam.it>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      d4150ca6
      History
      Provide a generic io.h & address mapping functions
      Paul Burton authored
      
      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: default avatarPaul 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: default avatarAngelo Dureghello <angelo@sysam.it>
      Tested-by: default avatarAngelo Dureghello <angelo@sysam.it>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
    io.h 3.30 KiB