Date: Tue, 18 Sep 2007 23:20:20 +0000 From: John Birrell <jb@what-creek.com> To: "M. Warner Losh" <imp@bsdimp.com> Cc: embedded@freebsd.org Subject: Re: NOR flash drivers in 6.1? Message-ID: <20070918232020.GA96782@what-creek.com> In-Reply-To: <20070918.145034.669287571.imp@bsdimp.com> References: <0FCFCF6165E968449991746EB91D614D913E8E@antipi.jnpr.net> <20070918.145034.669287571.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070918232020.GA96782>