mtd/drivers/mtd/chips cfi_cmdset_0001.c,1.98,1.99
Joakim Tjernlund
jocke at infradead.org
Wed Jun 19 05:20:00 EDT 2002
Update of /home/cvs/mtd/drivers/mtd/chips
In directory phoenix.infradead.org:/tmp/cvs-serv32642
Modified Files:
cfi_cmdset_0001.c
Log Message:
Correct FeatureSupport, BlkStatusRegMask and ProtRegAddr w.r.t endianess
These are always reported in little endian from flash.
Make the if statement behave, previosly it was always false, making the
driver think Erase Suspend function was supported on chips that didn't
support it.
Index: cfi_cmdset_0001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0001.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- cfi_cmdset_0001.c 16 Jun 2002 17:14:06 -0000 1.98
+++ cfi_cmdset_0001.c 19 Jun 2002 09:19:57 -0000 1.99
@@ -156,9 +156,9 @@
}
/* Do some byteswapping if necessary */
- extp->FeatureSupport = cfi32_to_cpu(extp->FeatureSupport);
- extp->BlkStatusRegMask = cfi32_to_cpu(extp->BlkStatusRegMask);
- extp->ProtRegAddr = cfi32_to_cpu(extp->ProtRegAddr);
+ extp->FeatureSupport = le32_to_cpu(extp->FeatureSupport);
+ extp->BlkStatusRegMask = le16_to_cpu(extp->BlkStatusRegMask);
+ extp->ProtRegAddr = le16_to_cpu(extp->ProtRegAddr);
#ifdef DEBUG_CFI_FEATURES
/* Tell the user about it in lots of lovely detail */
@@ -300,7 +300,7 @@
*/
switch (chip->state) {
case FL_ERASING:
- if (!((struct cfi_pri_intelext *)cfi->cmdset_priv)->FeatureSupport & 2)
+ if (!(((struct cfi_pri_intelext *)cfi->cmdset_priv)->FeatureSupport & 2))
goto sleep; /* We don't support erase suspend */
cfi_write (map, CMD(0xb0), cmd_addr);
More information about the linux-mtd-cvs
mailing list