which driver for mmap-able battery-backed SRAM ?
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
Signature · 1 line
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Markus,
Quoted 7 lines · Markus Niebel
Hi,
Am 11.02.2014 20:29, wrote Philippe De Muyter:
Quoted 2 lines
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.
Quoted 3 lines
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
Quoted 16 lines
Quoted 10 lines
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.Quoted 5 lines
Is there already a driver that has those functionalities, or which one should I enhance ?
TIA
Markus
Signature · 1 line
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles