From: Tom Rini Date: Tue, 3 Oct 2017 08:52:19 -0400 Subject: [U-Boot] [U-Boot, v2, 01/13] Provide a generic io.h & address mapping functions In-Reply-To: <20170914220513.9359-2-paul.burton@imgtec.com> References: <20170914220513.9359-2-paul.burton@imgtec.com> Message-ID: <20171003125219.GM22973@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Sep 14, 2017 at 03:05:01PM -0700, Paul Burton wrote: > 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 > Cc: Albert Aribaud > Cc: Alexey Brodkin > Cc: Angelo Dureghello > Cc: Bin Meng > Cc: Daniel Schwierzeck > Cc: Macpaul Lin > Cc: Michal Simek > Cc: Nobuhiro Iwamatsu > Cc: Thomas Chou > Cc: Wolfgang Denk > Acked-by: Angelo Dureghello > Tested-by: Angelo Dureghello > Reviewed-by: Simon Glass > Reviewed-by: Daniel Schwierzeck Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: