mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Belisko Marek <marek.belisko@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: RFC: change map_base type
Date: Wed, 24 Nov 2010 15:48:37 +0100	[thread overview]
Message-ID: <20101124144837.GI11909@game.jcrosoft.org> (raw)
In-Reply-To: <AANLkTi=JJf6HyktGrsS5gscd3Yf1wc2Ef2Bb8hbrmEqd@mail.gmail.com>

On 13:39 Wed 24 Nov     , Belisko Marek wrote:
> Hi,
> 
> fist sparse patches was accepted but doesn't fix all problems.
> 
> There is still a lot of sparse problems which complain about incorrect type
> in functions read(bwl)/writ(bwl). Over whole codebase to this
> functions are passed
> u_long or u_int types which is not correct.
> 
> e.g. in serial drivers is used for access to registers:
> writeb(0x07, dev->map_base + UFCON);
> 
> In my opinion it make no sense to use:
> writeb(0x07, IOMEM(dev->map_base + UFCON));
> 
> Instead change map_base type in include/driver.h to void __iomem *map_base
> which should fix a lot sparse problems.
> Then only board code when device is initialized use: .map_base =
> IOMEM(0x00000...)
> 
> Make it sense or there is not necessary to touch it or other way?
it's a ressources so it's the right type as in the kernel

the driver need to cast based on it's need

as done in linux

remember with the multi-ressource it's not anymore a base address you pass
but any data

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2010-11-24 14:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24 12:39 Belisko Marek
2010-11-24 14:48 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2010-11-24 20:09   ` Belisko Marek
2010-11-25  8:29     ` Sascha Hauer
2010-11-25 11:23     ` Jean-Christophe PLAGNIOL-VILLARD

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=20101124144837.GI11909@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=marek.belisko@gmail.com \
    /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