[PATCH 2/2] misc: Add devicetree SRAM driver

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri Jan 31 03:13:45 EST 2014


On 08:41 Thu 30 Jan     , Sascha Hauer wrote:
> On Thu, Jan 30, 2014 at 07:47:42AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 10:30 Wed 29 Jan     , Sascha Hauer wrote:
> > > Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> > > ---
> > >  drivers/misc/Kconfig  |  6 +++++
> > >  drivers/misc/Makefile |  1 +
> > >  drivers/misc/sram.c   | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++
> > 
> > on at91 we already use the sram
> > 
> > and the sram could be used by any driver for dma (ethernet, framebuffer)
> > 
> > how could handle this in the generic driver?
> 
> The generic driver only registers a cdev for accessing it, so you have
> to actively corrupt the SRAM on the commandline to break something.
> I don't know how AT91 does it, but the mmio-sram driver in the kernel
> registers an allocator on the SRAM.
same on at91
> Consumers then have a phandle to the
> SRAM node and can allocate from the SRAM pool using the phandle. We
> could do something similar in barebox should we have to. It's debatable
> whether we should remove the cdev once the allocator is used, but let's
> see until we get there.

the cdev I do not known too make RO for those pasrt make with a way to
overwrite it if needed
> 
> 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 |



More information about the barebox mailing list