[U-Boot] [PATCH] arc: add stubs for map_physmem() and unmap_physmem()
Alexey Brodkin
Alexey.Brodkin at synopsys.com
Fri Nov 13 14:40:11 CET 2015
Hi Stephen,
On Thu, 2015-11-12 at 16:00 -0700, Stephen Warren wrote:
> On 11/12/2015 02:56 PM, Alexey Brodkin wrote:
> > Up until now there was no need in those stubs.
> >
> > But since following commit compilation of U-Boot on ARC is broken:
> > commit 7861204c9af7fec1ea9b41541c272516235a6c93
> > itest: make memory access work under sandbox
> >
> ...
> > That's because CMD_ITEST is enabled by default in common/Kconfig and now
> > map_physmem()/unmap_physmem() is used there.
> >
> > So this patch adds missing stubs for ARC.
>
> This looks OK, but rather than cut/pasting this exact same code yet
> another time, why not create e.g. include/io-base.h that contains this,
> and share it amongst all architectures?
I did think about that.
But the problem is "asm/io.h" is included in lots of sources and
it's hard to tell a reason for that inclusion - if it's only because of
map_physmem() or other stuff that might exist in the same header.
For example lots of accessors are described in the same "asm/io.h" like
readl(), writeb() etc.
Frankly I'd prefer in that particular case to limit a change to my
architecture.
Still thoughts are welcome.
-Alexey
More information about the U-Boot
mailing list