TX49 NAND supported?
Does anybody have a working tx4925 NAND driver that can be used with the latest mtd from infradead CVS? I have located a copy of tx4925ndfmc.c with 2002 timestamp by Toshiba Corporation (GPLv2) but it appears to use an API incompatible with the current one. Among other things, it seems to think that struct nand_chip has fields like IO_ADDR, CTRL_ADDR, CLE, ALE, NCE, ioread, iowrite, etc, and appears to predate the following change in include/linux/mtd/nand.h:
* 10-29-2001 TG changed nand_chip structure to support
* hardwarespecific function for accessing
* control lines
Quoted 5 lines · Junio C Hamano
Does anybody have a working tx4925 NAND driver that can be used with the latest mtd from infradead CVS? I have located a copy of
tx4925ndfmc.cwith 2002 timestamp by Toshiba Corporation (GPLv2) but it appears to use an API incompatible with the current one.
At the time I changed the API, I also updated every driver which had been submitted to me and put in my CVS tree.
If there are drivers out there from people who couldn't be bothered to do that, they broke.
Please complain to the author of the module in question and ask them why they didn't let me have a copy.
Signature · 1 line
dwmw2
Quoted 17 lines · David Woodhouse
Quoted 5 lines · Junio C Hamano
Does anybody have a working tx4925 NAND driver that can be used with the latest mtd from infradead CVS? I have located a copy of
tx4925ndfmc.cwith 2002 timestamp by Toshiba Corporation (GPLv2) but it appears to use an API incompatible with the current one.At the time I changed the API, I also updated every driver which had been submitted to me and put in my CVS tree.
If there are drivers out there from people who couldn't be bothered to do that, they broke.
Please complain to the author of the module in question and ask them why they didn't let me have a copy.
Quoted 5 lines
dwmw2
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
I'm in the process of updated tx4925ndfmc.c and tx4938ndfmc.c now. I will submit them
soon. One problem I'm trying to work around is I have had to set and
clear NAND_CTL_SETWP andNAND_CTL_CLRWP around the writes. Since this isn't already in nand.c, it seems to be
unique to these chips. I will investigate more to see if I really need to do this or if I can
move this code into the mapping files.
Alice
Quoted 35 lines · Alice Hennessy
Quoted 17 lines · David Woodhouse
Quoted 5 lines · Junio C Hamano
Does anybody have a working tx4925 NAND driver that can be used with the latest mtd from infradead CVS? I have located a copy of
tx4925ndfmc.cwith 2002 timestamp by Toshiba Corporation (GPLv2) but it appears to use an API incompatible with the current one.At the time I changed the API, I also updated every driver which had been submitted to me and put in my CVS tree.
If there are drivers out there from people who couldn't be bothered to do that, they broke.
Please complain to the author of the module in question and ask them why they didn't let me have a copy.
Quoted 5 lines
dwmw2
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/I'm in the process of updated
tx4925ndfmc.candtx4938ndfmc.cnow. I will submit them
soon. One problem I'm trying to work around is I have had to set and
clearNAND_CTL_SETWPandNAND_CTL_CLRWParound the writes. Since this isn't already innand.c, it seems to be
unique to these chips. I will investigate more to see if I really need to do this or if I can
move this code into the mapping files.
Quoted 5 lines
Alice
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
I've attached a patch that brings in new nand files tx4925ndfmc.c and tx4938ndfmc.c.
The patch also contains a few changes for nand.c so that this->write_byte and this->read_byte
are used instead of writeb and readb. I've also added one missing case for NAND_ECC_6_512 so that this->eccsize gets set to 512 properly.
Alice
home/ahennessy/pending_patches_current/nand.c renamed from mtd/nand/nand.c +4 -3
@@ -208,7 +208,7 @@struct nand_chip *this = mtd->priv;for (i=0 ; i<len; i++) -writeb (buf[i], this->IO_ADDR_W); + this->write_byte (mtd, buf[i]); }static void nand_read_buf (struct mtd_info *mtd,u_char *buf,int len)
@@ -217,7 +217,7 @@struct nand_chip *this = mtd->priv;for (i=0 ; i<len; i++) - buf[i] =readb (this->IO_ADDR_R); + buf[i] = this->read_byte (mtd); }static int nand_verify_buf (struct mtd_info *mtd,const u_char *buf,int len)
@@ -226,7 +226,7 @@struct nand_chip *this = mtd->priv;for (i=0 ; i<len; i++) -if (buf[i] !=readb (this->IO_ADDR_R)) +if (buf[i] != this->read_byte (mtd))return i;return 0 ;
@@ -1414,6 +1414,7 @@switch (this->eccmode) {case NAND_ECC_HW3_512 : +case NAND_ECC_HW6_512 :if (mtd->oobblock ==256 ) {printk (KERN_WARNING "512 byte HW ECC not possible on 256 Byte pagesize, fallback to SW ECC \n" ); this->eccmode =NAND_ECC_SOFT ;
mtd/nand/Config.in.new renamed from mtd/nand/Config.in +8 -0
@@ -31,4 +31,12 @@ fi fi +if [ "$CONFIG_TOSHIBA_RBTX4925" = "y" ]; then + dep_tristate ' SmartMedia Card on Toshiba RBTX4925 reference board' CONFIG_MTD_NAND_TX4925NDFMC $CONFIG_MTD_NAND +fi + +if [ "$CONFIG_TOSHIBA_RBTX4938" = "y" ]; then + dep_tristate ' NAND Flash device on Toshiba RBTX4938 reference board' CONFIG_MTD_NAND_TX4938NDFMC $CONFIG_MTD_NAND $CONFIG_TOSHIBA_RBTX4938_MPLEX_NAND +fi + endmenu
mtd/nand/Makefile.common.new renamed from mtd/nand/Makefile.common +2 -0
@@ -12,6 +12,8 @@ obj-$(CONFIG_MTD_NAND_SPIA) += spia.o obj-$(CONFIG_MTD_NAND_AUTCPU12) += autcpu12.o obj-$(CONFIG_MTD_NAND_EDB7312) += edb7312.o +obj-$(CONFIG_MTD_NAND_TX4925NDFMC) += tx4925ndfmc.o +obj-$(CONFIG_MTD_NAND_TX4938NDFMC) += tx4938ndfmc.o obj-$(CONFIG_MTD_NAND_IDS) += nand_ids.o -include $(TOPDIR)/Rules.make
home/ahennessy/pending_patches_current/tx4925ndfmc.c renamed from mtd/nand/tx4925ndfmc.c +412 -0
412 lines not on this page · raw message
home/ahennessy/pending_patches_current/tx4938ndfmc.c renamed from mtd/nand/tx4938ndfmc.c +357 -0
357 lines not on this page · raw message