From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QnnVF-000886-1N for barebox@lists.infradead.org; Mon, 01 Aug 2011 08:05:35 +0000 Date: Mon, 1 Aug 2011 10:05:30 +0200 From: Sascha Hauer Message-ID: <20110801080530.GA31404@pengutronix.de> References: <1312175092-26164-1-git-send-email-plagnioj@jcrosoft.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1312175092-26164-1-git-send-email-plagnioj@jcrosoft.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH] arm: introduce arm_add_mem_device to register dram device To: Jean-Christophe PLAGNIOL-VILLARD Cc: barebox@lists.infradead.org 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 > --- > 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. 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. 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