attached patch fixes the program->programm and other spellfixes in comments in nandsim.c<br><br>Signed-off-by:
srimugunthan <<a href="mailto:srimugunthan.dhandapani@gmail.com" target="_blank">srimugunthan.dhandapani@gmail.com</a>><br><br>-----<br>diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c<br>index a6a73aa..c45e06f 100644<br>
--- a/drivers/mtd/nand/nandsim.c<br>+++ b/drivers/mtd/nand/nandsim.c<br>@@ -210,12 +210,12 @@ MODULE_PARM_DESC(bbt, "0 OOB, 1 BBT with marker in OOB, 2 BBT with marker in d<br> #define STATE_CMD_READ0 0x00000001 /* read data from the beginning of page */<br>
#define STATE_CMD_READ1 0x00000002 /* read data from the second half of page */<br> #define STATE_CMD_READSTART 0x00000003 /* read data second command (large page devices) */<br>-#define STATE_CMD_PAGEPROG 0x00000004 /* start page programm */<br>
+#define STATE_CMD_PAGEPROG 0x00000004 /* start page program */<br> #define STATE_CMD_READOOB 0x00000005 /* read OOB area */<br> #define STATE_CMD_ERASE1 0x00000006 /* sector erase first command */<br> #define STATE_CMD_STATUS 0x00000007 /* read status */<br>
#define STATE_CMD_STATUS_M 0x00000008 /* read multi-plane status (isn't implemented) */<br>-#define STATE_CMD_SEQIN 0x00000009 /* sequential data imput */<br>+#define STATE_CMD_SEQIN 0x00000009 /* sequential data input */<br>
#define STATE_CMD_READID 0x0000000A /* read ID */<br> #define STATE_CMD_ERASE2 0x0000000B /* sector erase second command */<br> #define STATE_CMD_RESET 0x0000000C /* reset */<br>@@ -230,7 +230,7 @@ MODULE_PARM_DESC(bbt, "0 OOB, 1 BBT with marker in OOB, 2 BBT with marker in d<br>
#define STATE_ADDR_ZERO 0x00000040 /* one byte zero address was accepted */<br> #define STATE_ADDR_MASK 0x00000070 /* address states mask */<br> <br>-/* Durind data input/output the simulator is in these states */<br>
+/* During data input/output the simulator is in these states */<br> #define STATE_DATAIN 0x00000100 /* waiting for data input */<br> #define STATE_DATAIN_MASK 0x00000100 /* data input states mask */<br> <br>
@@ -248,7 +248,7 @@ MODULE_PARM_DESC(bbt, "0 OOB, 1 BBT with marker in OOB, 2 BBT with marker in d<br> <br> /* Simulator's actions bit masks */<br> #define ACTION_CPY 0x00100000 /* copy page/OOB to the internal buffer */<br>
-#define ACTION_PRGPAGE 0x00200000 /* programm the internal buffer to flash */<br>+#define ACTION_PRGPAGE 0x00200000 /* program the internal buffer to flash */<br> #define ACTION_SECERASE 0x00300000 /* erase sector */<br>
#define ACTION_ZEROOFF 0x00400000 /* don't add any offset to address */<br> #define ACTION_HALFOFF 0x00500000 /* add to address half of page */<br>@@ -263,18 +263,18 @@ MODULE_PARM_DESC(bbt, "0 OOB, 1 BBT with marker in OOB, 2 BBT with marker in d<br>
#define OPT_PAGE512 0x00000002 /* 512-byte page chips */<br> #define OPT_PAGE2048 0x00000008 /* 2048-byte page chips */<br> #define OPT_SMARTMEDIA 0x00000010 /* SmartMedia technology chips */<br>-#define OPT_AUTOINCR 0x00000020 /* page number auto inctimentation is possible */<br>
+#define OPT_AUTOINCR 0x00000020 /* page number auto incrementation is possible */<br> #define OPT_PAGE512_8BIT 0x00000040 /* 512-byte page chips with 8-bit bus width */<br> #define OPT_PAGE4096 0x00000080 /* 4096-byte page chips */<br>
#define OPT_LARGEPAGE (OPT_PAGE2048 | OPT_PAGE4096) /* 2048 & 4096-byte page chips */<br> #define OPT_SMALLPAGE (OPT_PAGE256 | OPT_PAGE512) /* 256 and 512-byte page chips */<br> <br>-/* Remove action bits ftom state */<br>
+/* Remove action bits from state */<br> #define NS_STATE(x) ((x) & ~ACTION_MASK)<br> <br> /*<br> * Maximum previous states which need to be saved. Currently saving is<br>- * only needed for page programm operation with preceeded read command<br>
+ * only needed for page program operation with preceded read command<br> * (which is only valid for 512-byte pages).<br> */<br> #define NS_MAX_PREVSTATES 1<br>@@ -380,16 +380,16 @@ static struct nandsim_operations {<br>
/* Read OOB */<br> {OPT_SMALLPAGE, {STATE_CMD_READOOB | ACTION_OOBOFF, STATE_ADDR_PAGE | ACTION_CPY,<br> STATE_DATAOUT, STATE_READY}},<br>- /* Programm page starting from the beginning */<br>+ /* Program page starting from the beginning */<br>
{OPT_ANY, {STATE_CMD_SEQIN, STATE_ADDR_PAGE, STATE_DATAIN,<br> STATE_CMD_PAGEPROG | ACTION_PRGPAGE, STATE_READY}},<br>- /* Programm page starting from the beginning */<br>+ /* Program page starting from the beginning */<br>
{OPT_SMALLPAGE, {STATE_CMD_READ0, STATE_CMD_SEQIN | ACTION_ZEROOFF, STATE_ADDR_PAGE,<br> STATE_DATAIN, STATE_CMD_PAGEPROG | ACTION_PRGPAGE, STATE_READY}},<br>- /* Programm page starting from the second half */<br>
+ /* Program page starting from the second half */<br> {OPT_PAGE512, {STATE_CMD_READ1, STATE_CMD_SEQIN | ACTION_HALFOFF, STATE_ADDR_PAGE,<br> STATE_DATAIN, STATE_CMD_PAGEPROG | ACTION_PRGPAGE, STATE_READY}},<br>
- /* Programm OOB */<br>+ /* Program OOB */<br> {OPT_SMALLPAGE, {STATE_CMD_READOOB, STATE_CMD_SEQIN | ACTION_OOBOFF, STATE_ADDR_PAGE,<br> STATE_DATAIN, STATE_CMD_PAGEPROG | ACTION_PRGPAGE, STATE_READY}},<br>
/* Erase sector */<br>@@ -1171,9 +1171,9 @@ static inline void switch_to_ready_state(struct nandsim *ns, u_char status)<br> * of supported operations.<br> *<br> * Operation can be unknown because of the following.<br>
- * 1. New command was accepted and this is the firs call to find the<br>+ * 1. New command was accepted and this is the first call to find the<br> * correspondent states chain. In this case ns->npstates = 0;<br>
- * 2. There is several operations which begin with the same command(s)<br>+ * 2. There are several operations which begin with the same command(s)<br> * (for example program from the second half and read from the<br>
* second half operations both begin with the READ1 command). In this<br> * case the ns->pstates[] array contains previous states.<br>@@ -1186,7 +1186,7 @@ static inline void switch_to_ready_state(struct nandsim *ns, u_char status)<br>
* ns->ops, ns->state, ns->nxstate are initialized, ns->npstate is<br> * zeroed).<br> *<br>- * If there are several maches, the current state is pushed to the<br>+ * If there are several matches, the current state is pushed to the<br>
* ns->pstates.<br> *<br> * The operation can be unknown only while commands are input to the chip.<br>@@ -1195,10 +1195,10 @@ static inline void switch_to_ready_state(struct nandsim *ns, u_char status)<br> * operation is searched using the following pattern:<br>
* ns->pstates[0], ... ns->pstates[ns->npstates], <address input><br> *<br>- * It is supposed that this pattern must either match one operation on<br>+ * It is supposed that this pattern must either match one operation or<br>
* none. There can't be ambiguity in that case.<br> *<br>- * If no matches found, the functions does the following:<br>+ * If no matches found, the function does the following:<br> * 1. if there are saved states present, try to ignore them and search<br>
* again only using the last command. If nothing was found, switch<br> * to the STATE_READY state.<br>@@ -1668,7 +1668,7 @@ static int do_state_action(struct nandsim *ns, uint32_t action)<br> <br> case ACTION_PRGPAGE:<br>
/*<br>- * Programm page - move internal buffer data to the page.<br>+ * Program page - move internal buffer data to the page.<br> */<br> <br> if (ns->lines.wp) {<br>@@ -1933,7 +1933,7 @@ static u_char ns_nand_read_byte(struct mtd_info *mtd)<br>
NS_DBG("read_byte: all bytes were read\n");<br> <br> /*<br>- * The OPT_AUTOINCR allows to read next conseqitive pages without<br>+ * The OPT_AUTOINCR allows to read next consecutive pages without<br>
* new read operation cycle.<br> */<br> if ((ns->options & OPT_AUTOINCR) && NS_STATE(ns->state) == STATE_DATAOUT) {<br>