mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] arm: introduce arm_add_mem_device to register dram device
Date: Mon, 1 Aug 2011 11:09:56 +0200	[thread overview]
Message-ID: <20110801090956.GG31404@pengutronix.de> (raw)
In-Reply-To: <20110801080545.GD6255@game.jcrosoft.org>

On Mon, Aug 01, 2011 at 10:05:45AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 10:05 Mon 01 Aug     , Sascha Hauer wrote:
> > On Mon, Aug 01, 2011 at 07:04:52AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > this will automaticaly register the device to armlinux_add_dram
> > > 
> > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > > ---
> > > diff --git a/include/driver.h b/include/driver.h
> > > index b011f98..0faafe3 100644
> > > --- a/include/driver.h
> > > +++ b/include/driver.h
> > > @@ -214,6 +214,11 @@ static inline struct device_d *add_mem_device(const char *name, resource_size_t
> > >  				  IORESOURCE_MEM | flags, NULL);
> > >  }
> > >  
> > > +#ifdef CONFIG_ARM
> > > +struct device_d *arm_add_mem_device(const char* name, resource_size_t start,
> > > +				    resource_size_t size);
> > > +#endif
> > > +
> > 
> > No ifdefs around function declarations please. Also, this should
> > go somewhere under arch/arm/include.
> armlinux?
> > 
> > BTW this conflicts with my mmu series I recently sent. Having this
> > arm_add_mem_device function is a good thing, but now one of us has
> > to do his series again :(
> 
> > For the mmu to just work on all boards I need a place where I know
> > that all memory has been registered. For this I wanted to introduce
> > a memory_initcall (we could also reuse console_initcall, but I thought
> > having a dedicated initcall is cleaner). Then I could initialize the
> > mmu in a later initcall.
> I known but I wish we drop the mmu_init in the board at all
> and manage it in a generic part

That's my goal aswell, but the mmu init needs to be done when the memory
is registered but still no driver uses dma_alloc_coherent. Currently
this place does not exist since every board does the memory registration
at some random place.
The mmu code can't remap sdram without knowing where it is.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

  reply	other threads:[~2011-08-01  9:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-01  5:04 Jean-Christophe PLAGNIOL-VILLARD
2011-08-01  8:05 ` Sascha Hauer
2011-08-01  8:05   ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-01  9:09     ` Sascha Hauer [this message]
2011-08-01  9:19       ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-01  9:51         ` Sascha Hauer

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=20110801090956.GG31404@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.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