NOR flash drivers in 6.1?

M. Warner Losh imp at bsdimp.com
Tue Sep 18 13:51:08 PDT 2007


In message: <0FCFCF6165E968449991746EB91D614D913E8E at antipi.jnpr.net>
            "Andrew Duane" <aduane at juniper.net> writes:
: We just changed a design on a board, and I'm now looking at putting our
: filesystems on a Spansion NOR flash. Are there any drivers for this
: readily available? I doubt the vendor will have anything to help me.

Andrew,

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.  A quick search of the intel site shows:
	http://www.intel.com/design/flcomp/datashts/315567.htm
to be one of the places to get data on these part.  Spansion is the
new name for AMD's flash memory.  In the past I know that AMD and
Intel flash memories operated the same for both NAND and NOR.  A quick
peek at Linux's mtd driver confirms this.  I don't see any Spansion
stuff in the mtd version that I have, but plenty of AMD stuff.

The following page suggests has tons of datasheets for Spansion
memory, continuing the trend from AMD and other flash memory makers of
providing fairly complete docs for years:

http://www.spansion.com/flash_memory_products/support/technical_documents/flash_datasheets.html

The s29ws-j_00_a6_e datasheet has command lists and the like that
would be necessary to write a driver for this part.  I didn't check
any others, but I'm sure at least some of them would have this
information.

Since the commands are simple, the harder part would be the 'bridge'
code that's necessary to send/receive commands and data to/from the
card.  There are some experimental reports that suggest doing this in
an abstract way is very slow.  Linux's MTD driver suggests that it is
possible to do in an abstract manner without too much of a hit.

Of course, your biggest issue may be tuning your application to
operate in an extremely limited write environment.  JB's nand driver
did some primitive wear averaging, which likely is sufficient for low
data write rates on larger parts when using ufs.  However, higher data
rates likely need a filesystem that's optimized for flash.

Warner

P.S.  I've wanted to do a Flash layer for FreeBSD for some time, but
could never find someone to fund it.


More information about the freebsd-embedded mailing list