linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* which driver for mmap-able battery-backed SRAM ?
@ 2014-02-11 19:29 Philippe De Muyter
       [not found] ` <5305BA30.8070609@tqsc.de>
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe De Muyter @ 2014-02-11 19:29 UTC (permalink / raw)
  To: linux-mtd

Hi mtd experts,

I try to find the right driver for a memory-mapped battery-backed SRAM chip.
I have tried two drivers : 
	"mmio-sram"	drivers/misc/sram.c
and
	"mtd-ram"	drivers/mtd/chips/map_ram.c
but none of them provides me the expected interface : being able to mmap
it in a user program, and ensure that every write access to it happens
at the moment it is executed in the user program.

Is there already a driver that has those functionalities, or which one should
I enhance ?

TIA

-- 
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: which driver for mmap-able battery-backed SRAM ?
       [not found] ` <5305BA30.8070609@tqsc.de>
@ 2014-02-20  8:34   ` Philippe De Muyter
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe De Muyter @ 2014-02-20  8:34 UTC (permalink / raw)
  To: Markus Niebel; +Cc: linux-mtd

Hi Markus,

On Thu, Feb 20, 2014 at 09:17:52AM +0100, Markus Niebel wrote:
> Hi,
> 
> Am 11.02.2014 20:29, wrote Philippe De Muyter:
> > Hi mtd experts,
> > 
> 
> not an expert, but this should be done as a simple char device driver?

Actually, I am surprised that this does not exist yet, (or did I
not search enough ?)

At the moment, the only solution I have found is using /dev/mem, and
mmap-ing the part of it starting at the physical address of my sram
into my user program.

But my user program must know the physical address of the sram, and run as root;
I cannot give individual access rights to my sram.

> 
> BTW. if you intend to try mainlining such a driver I can send you a piece of raw code
> offlist.

I would gladly look at it.  Thanks for the proposal.

Philippe

> 
> > I try to find the right driver for a memory-mapped battery-backed SRAM chip.
> > I have tried two drivers : 
> > 	"mmio-sram"	drivers/misc/sram.c
> > and
> > 	"mtd-ram"	drivers/mtd/chips/map_ram.c
> > but none of them provides me the expected interface : being able to mmap
> > it in a user program, and ensure that every write access to it happens
> > at the moment it is executed in the user program.
> > 
> > Is there already a driver that has those functionalities, or which one should
> > I enhance ?
> > 
> > TIA
> > 
> Markus

-- 
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-20  8:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-11 19:29 which driver for mmap-able battery-backed SRAM ? Philippe De Muyter
     [not found] ` <5305BA30.8070609@tqsc.de>
2014-02-20  8:34   ` Philippe De Muyter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).