public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Philippe De Muyter <phdm@macq.eu>
To: Markus Niebel <list-09@tqsc.de>
Cc: linux-mtd@lists.infradead.org
Subject: Re: which driver for mmap-able battery-backed SRAM ?
Date: Thu, 20 Feb 2014 09:34:40 +0100	[thread overview]
Message-ID: <20140220083440.GA15361@frolo.macqel> (raw)
In-Reply-To: <5305BA30.8070609@tqsc.de>

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

      parent reply	other threads:[~2014-02-20  8:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20140220083440.GA15361@frolo.macqel \
    --to=phdm@macq.eu \
    --cc=linux-mtd@lists.infradead.org \
    --cc=list-09@tqsc.de \
    /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