I'm looking for pointers on how to put a filesystem on a flash mem accessed through a GPIO. I don't have a clear picture on how this is done, so any help is welcome.
Currently, I have a bootloader (which I wrote) in the FPGA, loaded into RAM on boot. The Atmel AT45DB321D serial Flash is connected via 6 pins of a GPIO (Chip select, serial clock, data out, reset, write protect and data in). In my bootloader I manipulate those bits to copy a linux kernel into RAM and launch it. After the kernel is launched I don't use the flash anymore. The filesystem is currently on NFS, but I'd like to put in in JFFS2 in the space left on the flash.
Now I imagine I first have to use a flash driver, but I'm confused by all the different standards: SPI, MTD, CFI, etc... I see CONFIG_SPI_GPIO which seems to use the same signals, but how do you tell the driver which GPIO pins to use ? And also the doc for that driver implies that there are much better ways to proceed... Which ones ? I saw the CONFIG_MTD_DATAFLASH option which includes my specific flash chip; so how do I tell it to use the flash through the GPIO ?
And once I can get the kernel to use the flash, how do I put the filesystem on it or only on 3/4 of it ? Do I need partitions too ?