[Fwd: [OLPC-devel] Flash driver status.]

David Woodhouse dwmw2 at infradead.org
Mon May 15 09:12:47 EDT 2006


On Mon, 2006-05-15 at 10:20 +0800, Ray.Tseng at quantatw.com wrote:
> David,
>         We rely on the PIO setting in BIOS, and have a program to
> verify the NAND erase, program...
>         The code in http://david.woodhou.se/olpc-enable-nand.c can set
> chip on MMIO, any sample program to verify the NAND erase,
> program ...?  

We don't have a standalone tool to poke at the hardware directly --
that's something I'd always do through the hardware drivers in the
kernel, by using the 'flash_erase' tool and then writing to
the /dev/mtd0 device (having loaded the cs553x_nand driver and the
mtdchar driver first, of course).

The 'flash_erase' tool is in the 'mtd-utils' package, which is available
on a Fedora machine by running 'yum install mtd-utils'. Or downloading
and building the tarball from
ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.0.0.tar.gz

If your existing code which tests it directly is a Linux program, then
you should be able to convert it to MMIO by opening and mmapping the
appropriate part of /dev/mem.

Actually, I suspect you may be intended to
use /sys/bus/pci/devices/0000:00:0f.1/resource0 these days instead
of /dev/mem.

-- 
dwmw2




More information about the Devel mailing list