aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nandsim.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/nandsim.c')
-rw-r--r--drivers/mtd/nand/nandsim.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index ab5bbf567439..f2324271b94e 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -245,7 +245,6 @@ MODULE_PARM_DESC(bch, "Enable BCH ecc and set how many bits should "
245#define STATE_DATAOUT 0x00001000 /* waiting for page data output */ 245#define STATE_DATAOUT 0x00001000 /* waiting for page data output */
246#define STATE_DATAOUT_ID 0x00002000 /* waiting for ID bytes output */ 246#define STATE_DATAOUT_ID 0x00002000 /* waiting for ID bytes output */
247#define STATE_DATAOUT_STATUS 0x00003000 /* waiting for status output */ 247#define STATE_DATAOUT_STATUS 0x00003000 /* waiting for status output */
248#define STATE_DATAOUT_STATUS_M 0x00004000 /* waiting for multi-plane status output */
249#define STATE_DATAOUT_MASK 0x00007000 /* data output states mask */ 248#define STATE_DATAOUT_MASK 0x00007000 /* data output states mask */
250 249
251/* Previous operation is done, ready to accept new requests */ 250/* Previous operation is done, ready to accept new requests */
@@ -269,7 +268,6 @@ MODULE_PARM_DESC(bch, "Enable BCH ecc and set how many bits should "
269#define OPT_ANY 0xFFFFFFFF /* any chip supports this operation */ 268#define OPT_ANY 0xFFFFFFFF /* any chip supports this operation */
270#define OPT_PAGE512 0x00000002 /* 512-byte page chips */ 269#define OPT_PAGE512 0x00000002 /* 512-byte page chips */
271#define OPT_PAGE2048 0x00000008 /* 2048-byte page chips */ 270#define OPT_PAGE2048 0x00000008 /* 2048-byte page chips */
272#define OPT_SMARTMEDIA 0x00000010 /* SmartMedia technology chips */
273#define OPT_PAGE512_8BIT 0x00000040 /* 512-byte page chips with 8-bit bus width */ 271#define OPT_PAGE512_8BIT 0x00000040 /* 512-byte page chips with 8-bit bus width */
274#define OPT_PAGE4096 0x00000080 /* 4096-byte page chips */ 272#define OPT_PAGE4096 0x00000080 /* 4096-byte page chips */
275#define OPT_LARGEPAGE (OPT_PAGE2048 | OPT_PAGE4096) /* 2048 & 4096-byte page chips */ 273#define OPT_LARGEPAGE (OPT_PAGE2048 | OPT_PAGE4096) /* 2048 & 4096-byte page chips */
@@ -1096,8 +1094,6 @@ static char *get_state_name(uint32_t state)
1096 return "STATE_DATAOUT_ID"; 1094 return "STATE_DATAOUT_ID";
1097 case STATE_DATAOUT_STATUS: 1095 case STATE_DATAOUT_STATUS:
1098 return "STATE_DATAOUT_STATUS"; 1096 return "STATE_DATAOUT_STATUS";
1099 case STATE_DATAOUT_STATUS_M:
1100 return "STATE_DATAOUT_STATUS_M";
1101 case STATE_READY: 1097 case STATE_READY:
1102 return "STATE_READY"; 1098 return "STATE_READY";
1103 case STATE_UNKNOWN: 1099 case STATE_UNKNOWN:
@@ -1865,7 +1861,6 @@ static void switch_state(struct nandsim *ns)
1865 break; 1861 break;
1866 1862
1867 case STATE_DATAOUT_STATUS: 1863 case STATE_DATAOUT_STATUS:
1868 case STATE_DATAOUT_STATUS_M:
1869 ns->regs.count = ns->regs.num = 0; 1864 ns->regs.count = ns->regs.num = 0;
1870 break; 1865 break;
1871 1866
@@ -2005,7 +2000,6 @@ static void ns_nand_write_byte(struct mtd_info *mtd, u_char byte)
2005 } 2000 }
2006 2001
2007 if (NS_STATE(ns->state) == STATE_DATAOUT_STATUS 2002 if (NS_STATE(ns->state) == STATE_DATAOUT_STATUS
2008 || NS_STATE(ns->state) == STATE_DATAOUT_STATUS_M
2009 || NS_STATE(ns->state) == STATE_DATAOUT) { 2003 || NS_STATE(ns->state) == STATE_DATAOUT) {
2010 int row = ns->regs.row; 2004 int row = ns->regs.row;
2011 2005
@@ -2343,6 +2337,7 @@ static int __init ns_init_module(void)
2343 } 2337 }
2344 chip->ecc.mode = NAND_ECC_SOFT_BCH; 2338 chip->ecc.mode = NAND_ECC_SOFT_BCH;
2345 chip->ecc.size = 512; 2339 chip->ecc.size = 512;
2340 chip->ecc.strength = bch;
2346 chip->ecc.bytes = eccbytes; 2341 chip->ecc.bytes = eccbytes;
2347 NS_INFO("using %u-bit/%u bytes BCH ECC\n", bch, chip->ecc.size); 2342 NS_INFO("using %u-bit/%u bytes BCH ECC\n", bch, chip->ecc.size);
2348 } 2343 }