Flash Mapping and gpio
Mike Frysinger
vapier.adi at gmail.com
Thu Sep 11 17:28:12 EDT 2008
On Thu, Sep 11, 2008 at 16:52, Fundu wrote:
> I trying to access 256mb flash from a pripheral that can only access 128 mb.
> flash are in x16 mode and interleaved.
> A gpio is connected to A25 pin of the flash parts.
>
> Such that any of the two 128mb "areas" can be accessed.
>
> I'm trying to configure the mtd drivers such that i can do the following
>
> so when ofs 00000000 -> 07ffffff, A25(gpio)= 0
> ofs 08000000 -> 0fffffff, A25(gpio) =1
>
>
> i have added helper the following function in include/linux/cfi.h
you shouldnt go mucking about in common code. this is what flash
mapping drivers are for.
ive already written a generic gpio one to do exactly what you want
(but it's only been tested on nommu/Blackfin so far):
http://blackfin.uclinux.org/git/?p=readonly-mirrors/linux-kernel.git;a=blob_plain;f=drivers/mtd/maps/gpio-addr-flash.c;hb=HEAD
-mike
More information about the linux-mtd
mailing list