From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v2, 01/13] Provide a generic io.h & address mapping functions
Date: Tue, 3 Oct 2017 08:52:19 -0400 [thread overview]
Message-ID: <20171003125219.GM22973@bill-the-cat> (raw)
In-Reply-To: <20170914220513.9359-2-paul.burton@imgtec.com>
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 <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>
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: <http://lists.denx.de/pipermail/u-boot/attachments/20171003/7757e922/attachment.sig>
next prev parent reply other threads:[~2017-10-03 12:52 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-14 22:05 [U-Boot] [PATCH v2 00/13] Add asm-generic/io.h; virt_to_phys(), phys_to_virt() for all arches Paul Burton
2017-09-14 22:05 ` [U-Boot] [PATCH v2 01/13] Provide a generic io.h & address mapping functions Paul Burton
2017-09-15 7:35 ` Daniel Schwierzeck
2017-10-03 12:52 ` Tom Rini [this message]
2017-09-14 22:05 ` [U-Boot] [PATCH v2 02/13] arc: Use asm-generic/io.h Paul Burton
2017-10-03 12:52 ` [U-Boot] [U-Boot,v2,02/13] " Tom Rini
2017-09-14 22:05 ` [U-Boot] [PATCH v2 03/13] arm: " Paul Burton
2017-10-03 12:52 ` [U-Boot] [U-Boot,v2,03/13] " Tom Rini
2017-09-14 22:05 ` [U-Boot] [PATCH v2 04/13] m68k: " Paul Burton
2017-10-03 12:52 ` [U-Boot] [U-Boot,v2,04/13] " Tom Rini
2017-09-14 22:05 ` [U-Boot] [PATCH v2 05/13] microblaze: " Paul Burton
2017-10-03 12:52 ` [U-Boot] [U-Boot,v2,05/13] " Tom Rini
2017-09-14 22:05 ` [U-Boot] [PATCH v2 06/13] nds32: " Paul Burton
2017-10-03 12:52 ` [U-Boot] [U-Boot,v2,06/13] " Tom Rini
2017-09-14 22:05 ` [U-Boot] [PATCH v2 07/13] sh: " Paul Burton
2017-10-03 12:52 ` [U-Boot] [U-Boot,v2,07/13] " Tom Rini
2017-09-14 22:05 ` [U-Boot] [PATCH v2 08/13] x86: " Paul Burton
2017-10-03 12:52 ` [U-Boot] [U-Boot,v2,08/13] " Tom Rini
2017-09-14 22:05 ` [U-Boot] [PATCH v2 09/13] xtensa: " Paul Burton
2017-10-03 12:52 ` [U-Boot] [U-Boot,v2,09/13] " Tom Rini
2017-09-14 22:05 ` [U-Boot] [PATCH v2 10/13] mips: " Paul Burton
2017-09-15 7:36 ` Daniel Schwierzeck
2017-10-03 12:52 ` [U-Boot] [U-Boot,v2,10/13] " Tom Rini
2017-09-14 22:05 ` [U-Boot] [PATCH v2 11/13] nios2: " Paul Burton
2017-10-03 12:53 ` [U-Boot] [U-Boot,v2,11/13] " Tom Rini
2017-09-14 22:05 ` [U-Boot] [PATCH v2 12/13] powerpc: " Paul Burton
2017-10-03 12:53 ` [U-Boot] [U-Boot,v2,12/13] " Tom Rini
2017-09-14 22:05 ` [U-Boot] [PATCH v2 13/13] sandbox: " Paul Burton
2017-10-03 12:53 ` [U-Boot] [U-Boot,v2,13/13] " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171003125219.GM22973@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox