Thread (4 messages) 4 messages, 4 authors, 2008-09-08

RE: direct access to Flash from userland

flat view

From: Fillod Stephane <hidden>
Date: 2008-09-04 12:22:49

Dave Littell wrote:
I have a CFI Flash device which has some non-CFI commands I need to
issue from userland.  I've tried mmap() of the mtdblock device, but
that
only yielded a corrupted Flash as my non-CFI command sequences were
simply written to Flash.  An attempted mmap() of the character mtd
device fails the mmap() call.
You should mmap() the /dev/mem device at the physical base address
of your Flash chip. Don't forget to pass O_SYNC to open(), in order
to have a guarded/non cached mapping.

http://www.denx.de/twiki/bin/view/PPCEmbedded/DeviceDrivers#Section_Acce
ssingPeripheralsFromUserSpace
Is there a way for a userland application to issue non-CFI commands
directly to a Flash device?  (This is a 2.6.18-based kernel on a AMCC
PPC440EPx platform.)
I don't know whether there's specific ioctl for such purpose.
Have you tried to read the mtd source? You may also hack the mtd
layer to add your command. Definitely a question for=20
http://www.linux-mtd.infradead.org/mail.html

Regards
--=20
Stephane
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help