mtd/drivers/mtd/nand nand.c,1.71,1.72
gleixner at infradead.org
gleixner at infradead.org
Mon Mar 29 04:49:37 EST 2004
Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv11294
Modified Files:
nand.c
Log Message:
endianess support for 16bit bus. We only use it for commands, status and bad block detection
Index: nand.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- nand.c 29 Mar 2004 09:12:56 -0000 1.71
+++ nand.c 29 Mar 2004 09:49:34 -0000 1.72
@@ -198,13 +198,13 @@
static u_char nand_read_byte16(struct mtd_info *mtd)
{
struct nand_chip *this = mtd->priv;
- return (u_char) readw(this->IO_ADDR_R);
+ return (u_char) cpu_to_le16(readw(this->IO_ADDR_R));
}
static void nand_write_byte16(struct mtd_info *mtd, u_char byte)
{
struct nand_chip *this = mtd->priv;
- writew( (u16) byte, this->IO_ADDR_W);
+ writew(le16_to_cpu((u16) byte), this->IO_ADDR_W);
}
static u16 nand_read_word(struct mtd_info *mtd)
@@ -322,7 +322,7 @@
this->cmdfunc (mtd, NAND_CMD_READOOB, this->badblockpos & 0xFE, page);
- bad = this->read_word(mtd);
+ bad = cpu_to_le16(this->read_word(mtd));
if (this->badblockpos & 0x1)
bad >>= 1;
More information about the linux-mtd-cvs
mailing list