From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/2] misc: Add devicetree SRAM driver
Date: Thu, 30 Jan 2014 08:41:06 +0100 [thread overview]
Message-ID: <20140130074106.GO16215@pengutronix.de> (raw)
In-Reply-To: <20140130064742.GC9671@ns203013.ovh.net>
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@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. 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.
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
next prev parent reply other threads:[~2014-01-30 7:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 9:29 [PATCH 1/2] misc Kconfig: always ask for misc devices Sascha Hauer
2014-01-29 9:30 ` [PATCH 2/2] misc: Add devicetree SRAM driver Sascha Hauer
2014-01-29 10:26 ` Alexander Shiyan
2014-01-29 20:35 ` Sascha Hauer
2014-01-30 6:35 ` Alexander Shiyan
2014-01-30 6:47 ` Jean-Christophe PLAGNIOL-VILLARD
2014-01-30 7:41 ` Sascha Hauer [this message]
2014-01-31 8:13 ` 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=20140130074106.GO16215@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