NOR flash drivers in 6.1?

John Birrell jb at what-creek.com
Tue Sep 18 16:35:05 PDT 2007


On Tue, Sep 18, 2007 at 02:50:34PM -0600, M. Warner Losh wrote:
> There is a NAND driver that's floating around done by John Birrell a
> few years ago.  We used it at Timing Solutions for one x86 board that
> had NAND flash and no hard disk.  However, I'm not aware of a NOR
> driver, specifically.  The specs for NAND and NOR memory are readily
> available, so wouldn't be a big deal to get data necessary to
> read/write/erase them.

NOR is very much simpler than NAND. NOR flash is memory mapped whereas
NAND reads and writes are clocked via a single byte address. NAND
has to handle bad tracks.

This means that NOR flash drivers are pretty simple. I used to have one
for an Intel 386EX evaluation board. I only ever used the NOR for
booting, never writing from the application.

With GEOM in FreeBSD, writing a NOR driver is a simple exercise.
All the file system stuff is handled by GEOM and above, leaving
just the low level IO to be handled by the driver. All you have to
do is locate the NOR flash and read from it. :-P

Writing probably requires you to write the entire flash block.  I
doubt that NOR flash is designed for read/write like a file
system would expect to do.

--
John Birrell


More information about the freebsd-embedded mailing list