public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arc: add stubs for map_physmem() and unmap_physmem()
Date: Fri, 13 Nov 2015 09:06:06 -0700	[thread overview]
Message-ID: <56460A6E.4030106@wwwdotorg.org> (raw)
In-Reply-To: <1447422011.5262.7.camel@synopsys.com>

On 11/13/2015 06:40 AM, Alexey Brodkin wrote:
> 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.

FWIW, I expected all the existing <asm/io.h> to simply include that new 
header in place of the duplicated code. Certainly, going through the 
entire source tree and adding #include statements for that new header 
would not be a good approach.

  reply	other threads:[~2015-11-13 16:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12 21:56 [U-Boot] [PATCH] arc: add stubs for map_physmem() and unmap_physmem() Alexey Brodkin
2015-11-12 23:00 ` Stephen Warren
2015-11-13 13:40   ` Alexey Brodkin
2015-11-13 16:06     ` Stephen Warren [this message]
2015-11-13 18:14 ` Simon Glass
2015-11-13 18:23   ` Alexey Brodkin
2015-11-14  2:03     ` Simon Glass
2015-11-16 13:47       ` Alexey Brodkin
2015-11-16 21:08         ` Simon Glass
2015-11-16 22:15           ` Alexey Brodkin
2015-11-16 23:15             ` Stephen Warren
2015-11-17 21:43               ` Alexey Brodkin

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=56460A6E.4030106@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --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