[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: generalize jffs2_nand_flash_setup
On Thursday 29 April 2004 16:31, Josh Boyer wrote:
> Below is a patch to fs.c to remove an unneeded if statement around
> jffs2_nand_flash_setup that I would like to get applied to the CVS
> tree. I have two reasons for this.
> One is that the if (jffs2_cleanmarker_oob(c)) is unneeded since the
> jffs2_nand_flash_setup function is #defined to (0) unless
> CONFIG_JFFS2_FS_NAND is set.
But it is neccecary, if you have a board with NOR _and_ NAND flash so the fs
driver _must_ decide whether to call this or not.
> The other reason is, I see some benefit in generalizing
> jffs2_nand_flash_setup into something that can be used for more than
> just NAND flash. The comment in that code says "NAND (or other bizarre)
> flash... do setup accordingly". Well, I have the "other bizarre" flash
> case because I am using NOR flash with transparent ECC. This requires
> some of the same things that NAND does (mainly the wbuf), but it doesn't
> have OOB data like NAND, so CONFIG_JFFS2_FS_NAND can't be used directly.
> jffs2_nand_flash_setup could be renamed jffs2_flash_setup so that it is
> more general, and adding support for bizarre flashes is easier. MTD
> already supports some of these flashes (see cfi_cmdset_0020.c), so now
> it's just a matter of getting JFFS2 support there.
having jffs2_flash_setup() and jffs2_flash_cleanup() is ok, but this functions
should look like
void jffs2_flash_setup(struct jffs2_sb_info *c)
The "if (jffs2_cleanmarker_oob(c))" is the (isbizzarre1(c)) for NAND
"Free software" is a matter of liberty, not price. To understand the concept,
you should think of "free" as in "free speech,'' not as in "free beer".
linutronix - competence in embedded & realtime linux
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to email@example.com