diff options
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/Kconfig | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/ams-delta.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/atmel_nand.c | 32 | ||||
-rw-r--r-- | drivers/mtd/nand/autcpu12.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/cs553x_nand.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/denali.c | 6 | ||||
-rw-r--r-- | drivers/mtd/nand/diskonchip.c | 8 | ||||
-rw-r--r-- | drivers/mtd/nand/fsl_elbc_nand.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/fsmc_nand.c | 10 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/nand_bbt.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/nandsim.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/nomadik_nand.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/pasemi_nand.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/plat_nand.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/r852.c | 10 | ||||
-rw-r--r-- | drivers/mtd/nand/sh_flctl.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/sm_common.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/tmio_nand.c | 2 |
20 files changed, 44 insertions, 52 deletions
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index a92054e945e1..edec457d361d 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig | |||
@@ -239,7 +239,7 @@ config MTD_NAND_BCM_UMI | |||
239 | help | 239 | help |
240 | This enables the NAND flash controller on the BCM UMI block. | 240 | This enables the NAND flash controller on the BCM UMI block. |
241 | 241 | ||
242 | No board specfic support is done by this driver, each board | 242 | No board specific support is done by this driver, each board |
243 | must advertise a platform_device for the driver to attach. | 243 | must advertise a platform_device for the driver to attach. |
244 | 244 | ||
245 | config MTD_NAND_BCM_UMI_HWCS | 245 | config MTD_NAND_BCM_UMI_HWCS |
diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c index a067d090cb31..bc65bf71e1a2 100644 --- a/drivers/mtd/nand/ams-delta.c +++ b/drivers/mtd/nand/ams-delta.c | |||
@@ -228,7 +228,7 @@ static int __devinit ams_delta_init(struct platform_device *pdev) | |||
228 | AMS_DELTA_LATCH2_NAND_NCE | | 228 | AMS_DELTA_LATCH2_NAND_NCE | |
229 | AMS_DELTA_LATCH2_NAND_NWP); | 229 | AMS_DELTA_LATCH2_NAND_NWP); |
230 | 230 | ||
231 | /* Scan to find existance of the device */ | 231 | /* Scan to find existence of the device */ |
232 | if (nand_scan(ams_delta_mtd, 1)) { | 232 | if (nand_scan(ams_delta_mtd, 1)) { |
233 | err = -ENXIO; | 233 | err = -ENXIO; |
234 | goto out_mtd; | 234 | goto out_mtd; |
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 6fae04b3fc6d..950646aa4c4b 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c | |||
@@ -209,22 +209,8 @@ static int atmel_nand_dma_op(struct mtd_info *mtd, void *buf, int len, | |||
209 | int err = -EIO; | 209 | int err = -EIO; |
210 | enum dma_data_direction dir = is_read ? DMA_FROM_DEVICE : DMA_TO_DEVICE; | 210 | enum dma_data_direction dir = is_read ? DMA_FROM_DEVICE : DMA_TO_DEVICE; |
211 | 211 | ||
212 | if (buf >= high_memory) { | 212 | if (buf >= high_memory) |
213 | struct page *pg; | 213 | goto err_buf; |
214 | |||
215 | if (((size_t)buf & PAGE_MASK) != | ||
216 | ((size_t)(buf + len - 1) & PAGE_MASK)) { | ||
217 | dev_warn(host->dev, "Buffer not fit in one page\n"); | ||
218 | goto err_buf; | ||
219 | } | ||
220 | |||
221 | pg = vmalloc_to_page(buf); | ||
222 | if (pg == 0) { | ||
223 | dev_err(host->dev, "Failed to vmalloc_to_page\n"); | ||
224 | goto err_buf; | ||
225 | } | ||
226 | p = page_address(pg) + ((size_t)buf & ~PAGE_MASK); | ||
227 | } | ||
228 | 214 | ||
229 | dma_dev = host->dma_chan->device; | 215 | dma_dev = host->dma_chan->device; |
230 | 216 | ||
@@ -280,7 +266,8 @@ static void atmel_read_buf(struct mtd_info *mtd, u8 *buf, int len) | |||
280 | struct nand_chip *chip = mtd->priv; | 266 | struct nand_chip *chip = mtd->priv; |
281 | struct atmel_nand_host *host = chip->priv; | 267 | struct atmel_nand_host *host = chip->priv; |
282 | 268 | ||
283 | if (use_dma && len >= mtd->oobsize) | 269 | if (use_dma && len > mtd->oobsize) |
270 | /* only use DMA for bigger than oob size: better performances */ | ||
284 | if (atmel_nand_dma_op(mtd, buf, len, 1) == 0) | 271 | if (atmel_nand_dma_op(mtd, buf, len, 1) == 0) |
285 | return; | 272 | return; |
286 | 273 | ||
@@ -295,7 +282,8 @@ static void atmel_write_buf(struct mtd_info *mtd, const u8 *buf, int len) | |||
295 | struct nand_chip *chip = mtd->priv; | 282 | struct nand_chip *chip = mtd->priv; |
296 | struct atmel_nand_host *host = chip->priv; | 283 | struct atmel_nand_host *host = chip->priv; |
297 | 284 | ||
298 | if (use_dma && len >= mtd->oobsize) | 285 | if (use_dma && len > mtd->oobsize) |
286 | /* only use DMA for bigger than oob size: better performances */ | ||
299 | if (atmel_nand_dma_op(mtd, (void *)buf, len, 0) == 0) | 287 | if (atmel_nand_dma_op(mtd, (void *)buf, len, 0) == 0) |
300 | return; | 288 | return; |
301 | 289 | ||
@@ -599,7 +587,10 @@ static int __init atmel_nand_probe(struct platform_device *pdev) | |||
599 | nand_chip->options |= NAND_USE_FLASH_BBT; | 587 | nand_chip->options |= NAND_USE_FLASH_BBT; |
600 | } | 588 | } |
601 | 589 | ||
602 | if (cpu_has_dma() && use_dma) { | 590 | if (!cpu_has_dma()) |
591 | use_dma = 0; | ||
592 | |||
593 | if (use_dma) { | ||
603 | dma_cap_mask_t mask; | 594 | dma_cap_mask_t mask; |
604 | 595 | ||
605 | dma_cap_zero(mask); | 596 | dma_cap_zero(mask); |
@@ -611,7 +602,8 @@ static int __init atmel_nand_probe(struct platform_device *pdev) | |||
611 | } | 602 | } |
612 | } | 603 | } |
613 | if (use_dma) | 604 | if (use_dma) |
614 | dev_info(host->dev, "Using DMA for NAND access.\n"); | 605 | dev_info(host->dev, "Using %s for DMA transfers.\n", |
606 | dma_chan_name(host->dma_chan)); | ||
615 | else | 607 | else |
616 | dev_info(host->dev, "No DMA support for NAND access.\n"); | 608 | dev_info(host->dev, "No DMA support for NAND access.\n"); |
617 | 609 | ||
diff --git a/drivers/mtd/nand/autcpu12.c b/drivers/mtd/nand/autcpu12.c index 7c95da1f612c..0911cf03db80 100644 --- a/drivers/mtd/nand/autcpu12.c +++ b/drivers/mtd/nand/autcpu12.c | |||
@@ -176,7 +176,7 @@ static int __init autcpu12_init(void) | |||
176 | */ | 176 | */ |
177 | this->options = NAND_USE_FLASH_BBT; | 177 | this->options = NAND_USE_FLASH_BBT; |
178 | 178 | ||
179 | /* Scan to find existance of the device */ | 179 | /* Scan to find existence of the device */ |
180 | if (nand_scan(autcpu12_mtd, 1)) { | 180 | if (nand_scan(autcpu12_mtd, 1)) { |
181 | err = -ENXIO; | 181 | err = -ENXIO; |
182 | goto out_ior; | 182 | goto out_ior; |
diff --git a/drivers/mtd/nand/cs553x_nand.c b/drivers/mtd/nand/cs553x_nand.c index 9f1b451005ca..71c35a0b9826 100644 --- a/drivers/mtd/nand/cs553x_nand.c +++ b/drivers/mtd/nand/cs553x_nand.c | |||
@@ -241,7 +241,7 @@ static int __init cs553x_init_one(int cs, int mmio, unsigned long adr) | |||
241 | /* Enable the following for a flash based bad block table */ | 241 | /* Enable the following for a flash based bad block table */ |
242 | this->options = NAND_USE_FLASH_BBT | NAND_NO_AUTOINCR; | 242 | this->options = NAND_USE_FLASH_BBT | NAND_NO_AUTOINCR; |
243 | 243 | ||
244 | /* Scan to find existance of the device */ | 244 | /* Scan to find existence of the device */ |
245 | if (nand_scan(new_mtd, 1)) { | 245 | if (nand_scan(new_mtd, 1)) { |
246 | err = -ENXIO; | 246 | err = -ENXIO; |
247 | goto out_ior; | 247 | goto out_ior; |
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 8c8d3c86c0e8..4633f094c510 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c | |||
@@ -724,7 +724,7 @@ static uint32_t wait_for_irq(struct denali_nand_info *denali, uint32_t irq_mask) | |||
724 | } | 724 | } |
725 | 725 | ||
726 | /* This helper function setups the registers for ECC and whether or not | 726 | /* This helper function setups the registers for ECC and whether or not |
727 | * the spare area will be transfered. */ | 727 | * the spare area will be transferred. */ |
728 | static void setup_ecc_for_xfer(struct denali_nand_info *denali, bool ecc_en, | 728 | static void setup_ecc_for_xfer(struct denali_nand_info *denali, bool ecc_en, |
729 | bool transfer_spare) | 729 | bool transfer_spare) |
730 | { | 730 | { |
@@ -965,7 +965,7 @@ static bool handle_ecc(struct denali_nand_info *denali, uint8_t *buf, | |||
965 | 965 | ||
966 | if (ECC_ERROR_CORRECTABLE(err_correction_info)) { | 966 | if (ECC_ERROR_CORRECTABLE(err_correction_info)) { |
967 | /* If err_byte is larger than ECC_SECTOR_SIZE, | 967 | /* If err_byte is larger than ECC_SECTOR_SIZE, |
968 | * means error happend in OOB, so we ignore | 968 | * means error happened in OOB, so we ignore |
969 | * it. It's no need for us to correct it | 969 | * it. It's no need for us to correct it |
970 | * err_device is represented the NAND error | 970 | * err_device is represented the NAND error |
971 | * bits are happened in if there are more | 971 | * bits are happened in if there are more |
@@ -1109,7 +1109,7 @@ static void denali_write_page(struct mtd_info *mtd, struct nand_chip *chip, | |||
1109 | } | 1109 | } |
1110 | 1110 | ||
1111 | /* This is the callback that the NAND core calls to write a page without ECC. | 1111 | /* This is the callback that the NAND core calls to write a page without ECC. |
1112 | * raw access is similiar to ECC page writes, so all the work is done in the | 1112 | * raw access is similar to ECC page writes, so all the work is done in the |
1113 | * write_page() function above. | 1113 | * write_page() function above. |
1114 | */ | 1114 | */ |
1115 | static void denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, | 1115 | static void denali_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, |
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index b7f8de7b2780..96c0b34ba8db 100644 --- a/drivers/mtd/nand/diskonchip.c +++ b/drivers/mtd/nand/diskonchip.c | |||
@@ -137,7 +137,7 @@ static struct rs_control *rs_decoder; | |||
137 | * | 137 | * |
138 | * Fabrice Bellard figured this out in the old docecc code. I added | 138 | * Fabrice Bellard figured this out in the old docecc code. I added |
139 | * some comments, improved a minor bit and converted it to make use | 139 | * some comments, improved a minor bit and converted it to make use |
140 | * of the generic Reed-Solomon libary. tglx | 140 | * of the generic Reed-Solomon library. tglx |
141 | */ | 141 | */ |
142 | static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc) | 142 | static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc) |
143 | { | 143 | { |
@@ -400,7 +400,7 @@ static uint16_t __init doc200x_ident_chip(struct mtd_info *mtd, int nr) | |||
400 | doc200x_hwcontrol(mtd, 0, NAND_CTRL_ALE | NAND_CTRL_CHANGE); | 400 | doc200x_hwcontrol(mtd, 0, NAND_CTRL_ALE | NAND_CTRL_CHANGE); |
401 | doc200x_hwcontrol(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); | 401 | doc200x_hwcontrol(mtd, NAND_CMD_NONE, NAND_NCE | NAND_CTRL_CHANGE); |
402 | 402 | ||
403 | /* We cant' use dev_ready here, but at least we wait for the | 403 | /* We can't' use dev_ready here, but at least we wait for the |
404 | * command to complete | 404 | * command to complete |
405 | */ | 405 | */ |
406 | udelay(50); | 406 | udelay(50); |
@@ -986,7 +986,7 @@ static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat, | |||
986 | dummy = ReadDOC(docptr, ECCConf); | 986 | dummy = ReadDOC(docptr, ECCConf); |
987 | } | 987 | } |
988 | 988 | ||
989 | /* Error occured ? */ | 989 | /* Error occurred ? */ |
990 | if (dummy & 0x80) { | 990 | if (dummy & 0x80) { |
991 | for (i = 0; i < 6; i++) { | 991 | for (i = 0; i < 6; i++) { |
992 | if (DoC_is_MillenniumPlus(doc)) | 992 | if (DoC_is_MillenniumPlus(doc)) |
@@ -1160,7 +1160,7 @@ static inline int __init nftl_partscan(struct mtd_info *mtd, struct mtd_partitio | |||
1160 | /* NOTE: The lines below modify internal variables of the NAND and MTD | 1160 | /* NOTE: The lines below modify internal variables of the NAND and MTD |
1161 | layers; variables with have already been configured by nand_scan. | 1161 | layers; variables with have already been configured by nand_scan. |
1162 | Unfortunately, we didn't know before this point what these values | 1162 | Unfortunately, we didn't know before this point what these values |
1163 | should be. Thus, this code is somewhat dependant on the exact | 1163 | should be. Thus, this code is somewhat dependent on the exact |
1164 | implementation of the NAND layer. */ | 1164 | implementation of the NAND layer. */ |
1165 | if (mh->UnitSizeFactor != 0xff) { | 1165 | if (mh->UnitSizeFactor != 0xff) { |
1166 | this->bbt_erase_shift += (0xff - mh->UnitSizeFactor); | 1166 | this->bbt_erase_shift += (0xff - mh->UnitSizeFactor); |
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 7a13d42cbabd..537e380b8dcb 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c | |||
@@ -59,7 +59,7 @@ struct fsl_elbc_mtd { | |||
59 | unsigned int fmr; /* FCM Flash Mode Register value */ | 59 | unsigned int fmr; /* FCM Flash Mode Register value */ |
60 | }; | 60 | }; |
61 | 61 | ||
62 | /* Freescale eLBC FCM controller infomation */ | 62 | /* Freescale eLBC FCM controller information */ |
63 | 63 | ||
64 | struct fsl_elbc_fcm_ctrl { | 64 | struct fsl_elbc_fcm_ctrl { |
65 | struct nand_hw_control controller; | 65 | struct nand_hw_control controller; |
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c index 205b10b9f9b9..0d45ef3883e8 100644 --- a/drivers/mtd/nand/fsmc_nand.c +++ b/drivers/mtd/nand/fsmc_nand.c | |||
@@ -335,7 +335,7 @@ static void fsmc_enable_hwecc(struct mtd_info *mtd, int mode) | |||
335 | 335 | ||
336 | /* | 336 | /* |
337 | * fsmc_read_hwecc_ecc4 - Hardware ECC calculator for ecc4 option supported by | 337 | * fsmc_read_hwecc_ecc4 - Hardware ECC calculator for ecc4 option supported by |
338 | * FSMC. ECC is 13 bytes for 512 bytes of data (supports error correction upto | 338 | * FSMC. ECC is 13 bytes for 512 bytes of data (supports error correction up to |
339 | * max of 8-bits) | 339 | * max of 8-bits) |
340 | */ | 340 | */ |
341 | static int fsmc_read_hwecc_ecc4(struct mtd_info *mtd, const uint8_t *data, | 341 | static int fsmc_read_hwecc_ecc4(struct mtd_info *mtd, const uint8_t *data, |
@@ -381,7 +381,7 @@ static int fsmc_read_hwecc_ecc4(struct mtd_info *mtd, const uint8_t *data, | |||
381 | 381 | ||
382 | /* | 382 | /* |
383 | * fsmc_read_hwecc_ecc1 - Hardware ECC calculator for ecc1 option supported by | 383 | * fsmc_read_hwecc_ecc1 - Hardware ECC calculator for ecc1 option supported by |
384 | * FSMC. ECC is 3 bytes for 512 bytes of data (supports error correction upto | 384 | * FSMC. ECC is 3 bytes for 512 bytes of data (supports error correction up to |
385 | * max of 1-bit) | 385 | * max of 1-bit) |
386 | */ | 386 | */ |
387 | static int fsmc_read_hwecc_ecc1(struct mtd_info *mtd, const uint8_t *data, | 387 | static int fsmc_read_hwecc_ecc1(struct mtd_info *mtd, const uint8_t *data, |
@@ -408,10 +408,10 @@ static int fsmc_read_hwecc_ecc1(struct mtd_info *mtd, const uint8_t *data, | |||
408 | * @buf: buffer to store read data | 408 | * @buf: buffer to store read data |
409 | * @page: page number to read | 409 | * @page: page number to read |
410 | * | 410 | * |
411 | * This routine is needed for fsmc verison 8 as reading from NAND chip has to be | 411 | * This routine is needed for fsmc version 8 as reading from NAND chip has to be |
412 | * performed in a strict sequence as follows: | 412 | * performed in a strict sequence as follows: |
413 | * data(512 byte) -> ecc(13 byte) | 413 | * data(512 byte) -> ecc(13 byte) |
414 | * After this read, fsmc hardware generates and reports error data bits(upto a | 414 | * After this read, fsmc hardware generates and reports error data bits(up to a |
415 | * max of 8 bits) | 415 | * max of 8 bits) |
416 | */ | 416 | */ |
417 | static int fsmc_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, | 417 | static int fsmc_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip, |
@@ -686,7 +686,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) | |||
686 | } | 686 | } |
687 | 687 | ||
688 | /* | 688 | /* |
689 | * Scan to find existance of the device | 689 | * Scan to find existence of the device |
690 | */ | 690 | */ |
691 | if (nand_scan_ident(&host->mtd, 1, NULL)) { | 691 | if (nand_scan_ident(&host->mtd, 1, NULL)) { |
692 | ret = -ENXIO; | 692 | ret = -ENXIO; |
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 85cfc061d41c..c54a4cbac6bc 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -1582,7 +1582,7 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from, | |||
1582 | } | 1582 | } |
1583 | 1583 | ||
1584 | /** | 1584 | /** |
1585 | * nand_read - [MTD Interface] MTD compability function for nand_do_read_ecc | 1585 | * nand_read - [MTD Interface] MTD compatibility function for nand_do_read_ecc |
1586 | * @mtd: MTD device structure | 1586 | * @mtd: MTD device structure |
1587 | * @from: offset to read from | 1587 | * @from: offset to read from |
1588 | * @len: number of bytes to read | 1588 | * @len: number of bytes to read |
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index a1e8b30078d9..af46428286fe 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c | |||
@@ -945,7 +945,7 @@ static int check_create(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_desc | |||
945 | rd2 = NULL; | 945 | rd2 = NULL; |
946 | /* Per chip or per device ? */ | 946 | /* Per chip or per device ? */ |
947 | chipsel = (td->options & NAND_BBT_PERCHIP) ? i : -1; | 947 | chipsel = (td->options & NAND_BBT_PERCHIP) ? i : -1; |
948 | /* Mirrored table avilable ? */ | 948 | /* Mirrored table available ? */ |
949 | if (md) { | 949 | if (md) { |
950 | if (td->pages[i] == -1 && md->pages[i] == -1) { | 950 | if (td->pages[i] == -1 && md->pages[i] == -1) { |
951 | writeops = 0x03; | 951 | writeops = 0x03; |
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index 213181be0d9a..893d95bfea48 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c | |||
@@ -162,7 +162,7 @@ MODULE_PARM_DESC(bitflips, "Maximum number of random bit flips per page (z | |||
162 | MODULE_PARM_DESC(gravepages, "Pages that lose data [: maximum reads (defaults to 3)]" | 162 | MODULE_PARM_DESC(gravepages, "Pages that lose data [: maximum reads (defaults to 3)]" |
163 | " separated by commas e.g. 1401:2 means page 1401" | 163 | " separated by commas e.g. 1401:2 means page 1401" |
164 | " can be read only twice before failing"); | 164 | " can be read only twice before failing"); |
165 | MODULE_PARM_DESC(rptwear, "Number of erases inbetween reporting wear, if not zero"); | 165 | MODULE_PARM_DESC(rptwear, "Number of erases between reporting wear, if not zero"); |
166 | MODULE_PARM_DESC(overridesize, "Specifies the NAND Flash size overriding the ID bytes. " | 166 | MODULE_PARM_DESC(overridesize, "Specifies the NAND Flash size overriding the ID bytes. " |
167 | "The size is specified in erase blocks and as the exponent of a power of two" | 167 | "The size is specified in erase blocks and as the exponent of a power of two" |
168 | " e.g. 5 means a size of 32 erase blocks"); | 168 | " e.g. 5 means a size of 32 erase blocks"); |
diff --git a/drivers/mtd/nand/nomadik_nand.c b/drivers/mtd/nand/nomadik_nand.c index 8c0b69375224..a045a4a581b6 100644 --- a/drivers/mtd/nand/nomadik_nand.c +++ b/drivers/mtd/nand/nomadik_nand.c | |||
@@ -151,7 +151,7 @@ static int nomadik_nand_probe(struct platform_device *pdev) | |||
151 | nand->options = pdata->options; | 151 | nand->options = pdata->options; |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * Scan to find existance of the device | 154 | * Scan to find existence of the device |
155 | */ | 155 | */ |
156 | if (nand_scan(&host->mtd, 1)) { | 156 | if (nand_scan(&host->mtd, 1)) { |
157 | ret = -ENXIO; | 157 | ret = -ENXIO; |
diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c index 59efa829ef24..20bfe5f15afd 100644 --- a/drivers/mtd/nand/pasemi_nand.c +++ b/drivers/mtd/nand/pasemi_nand.c | |||
@@ -157,7 +157,7 @@ static int __devinit pasemi_nand_probe(struct platform_device *ofdev) | |||
157 | /* Enable the following for a flash based bad block table */ | 157 | /* Enable the following for a flash based bad block table */ |
158 | chip->options = NAND_USE_FLASH_BBT | NAND_NO_AUTOINCR; | 158 | chip->options = NAND_USE_FLASH_BBT | NAND_NO_AUTOINCR; |
159 | 159 | ||
160 | /* Scan to find existance of the device */ | 160 | /* Scan to find existence of the device */ |
161 | if (nand_scan(pasemi_nand_mtd, 1)) { | 161 | if (nand_scan(pasemi_nand_mtd, 1)) { |
162 | err = -ENXIO; | 162 | err = -ENXIO; |
163 | goto out_lpc; | 163 | goto out_lpc; |
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c index 317aff428e42..caf5a736340a 100644 --- a/drivers/mtd/nand/plat_nand.c +++ b/drivers/mtd/nand/plat_nand.c | |||
@@ -95,7 +95,7 @@ static int __devinit plat_nand_probe(struct platform_device *pdev) | |||
95 | goto out; | 95 | goto out; |
96 | } | 96 | } |
97 | 97 | ||
98 | /* Scan to find existance of the device */ | 98 | /* Scan to find existence of the device */ |
99 | if (nand_scan(&data->mtd, pdata->chip.nr_chips)) { | 99 | if (nand_scan(&data->mtd, pdata->chip.nr_chips)) { |
100 | err = -ENXIO; | 100 | err = -ENXIO; |
101 | goto out; | 101 | goto out; |
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index ab7f4c33ced6..ff0701276d65 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
@@ -184,7 +184,7 @@ struct pxa3xx_nand_info { | |||
184 | 184 | ||
185 | static int use_dma = 1; | 185 | static int use_dma = 1; |
186 | module_param(use_dma, bool, 0444); | 186 | module_param(use_dma, bool, 0444); |
187 | MODULE_PARM_DESC(use_dma, "enable DMA for data transfering to/from NAND HW"); | 187 | MODULE_PARM_DESC(use_dma, "enable DMA for data transferring to/from NAND HW"); |
188 | 188 | ||
189 | /* | 189 | /* |
190 | * Default NAND flash controller configuration setup by the | 190 | * Default NAND flash controller configuration setup by the |
diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c index 6322d1fb5d62..cae2e013c986 100644 --- a/drivers/mtd/nand/r852.c +++ b/drivers/mtd/nand/r852.c | |||
@@ -185,7 +185,7 @@ static void r852_do_dma(struct r852_device *dev, uint8_t *buf, int do_read) | |||
185 | 185 | ||
186 | dbg_verbose("doing dma %s ", do_read ? "read" : "write"); | 186 | dbg_verbose("doing dma %s ", do_read ? "read" : "write"); |
187 | 187 | ||
188 | /* Set intial dma state: for reading first fill on board buffer, | 188 | /* Set initial dma state: for reading first fill on board buffer, |
189 | from device, for writes first fill the buffer from memory*/ | 189 | from device, for writes first fill the buffer from memory*/ |
190 | dev->dma_state = do_read ? DMA_INTERNAL : DMA_MEMORY; | 190 | dev->dma_state = do_read ? DMA_INTERNAL : DMA_MEMORY; |
191 | 191 | ||
@@ -766,7 +766,7 @@ static irqreturn_t r852_irq(int irq, void *data) | |||
766 | ret = IRQ_HANDLED; | 766 | ret = IRQ_HANDLED; |
767 | dev->card_detected = !!(card_status & R852_CARD_IRQ_INSERT); | 767 | dev->card_detected = !!(card_status & R852_CARD_IRQ_INSERT); |
768 | 768 | ||
769 | /* we shouldn't recieve any interrupts if we wait for card | 769 | /* we shouldn't receive any interrupts if we wait for card |
770 | to settle */ | 770 | to settle */ |
771 | WARN_ON(dev->card_unstable); | 771 | WARN_ON(dev->card_unstable); |
772 | 772 | ||
@@ -794,13 +794,13 @@ static irqreturn_t r852_irq(int irq, void *data) | |||
794 | ret = IRQ_HANDLED; | 794 | ret = IRQ_HANDLED; |
795 | 795 | ||
796 | if (dma_status & R852_DMA_IRQ_ERROR) { | 796 | if (dma_status & R852_DMA_IRQ_ERROR) { |
797 | dbg("recieved dma error IRQ"); | 797 | dbg("received dma error IRQ"); |
798 | r852_dma_done(dev, -EIO); | 798 | r852_dma_done(dev, -EIO); |
799 | complete(&dev->dma_done); | 799 | complete(&dev->dma_done); |
800 | goto out; | 800 | goto out; |
801 | } | 801 | } |
802 | 802 | ||
803 | /* recieved DMA interrupt out of nowhere? */ | 803 | /* received DMA interrupt out of nowhere? */ |
804 | WARN_ON_ONCE(dev->dma_stage == 0); | 804 | WARN_ON_ONCE(dev->dma_stage == 0); |
805 | 805 | ||
806 | if (dev->dma_stage == 0) | 806 | if (dev->dma_stage == 0) |
@@ -960,7 +960,7 @@ int r852_probe(struct pci_dev *pci_dev, const struct pci_device_id *id) | |||
960 | &dev->card_detect_work, 0); | 960 | &dev->card_detect_work, 0); |
961 | 961 | ||
962 | 962 | ||
963 | printk(KERN_NOTICE DRV_NAME ": driver loaded succesfully\n"); | 963 | printk(KERN_NOTICE DRV_NAME ": driver loaded successfully\n"); |
964 | return 0; | 964 | return 0; |
965 | 965 | ||
966 | error10: | 966 | error10: |
diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c index 546c2f0eb2e8..81bbb5ee148d 100644 --- a/drivers/mtd/nand/sh_flctl.c +++ b/drivers/mtd/nand/sh_flctl.c | |||
@@ -78,7 +78,7 @@ static void start_translation(struct sh_flctl *flctl) | |||
78 | 78 | ||
79 | static void timeout_error(struct sh_flctl *flctl, const char *str) | 79 | static void timeout_error(struct sh_flctl *flctl, const char *str) |
80 | { | 80 | { |
81 | dev_err(&flctl->pdev->dev, "Timeout occured in %s\n", str); | 81 | dev_err(&flctl->pdev->dev, "Timeout occurred in %s\n", str); |
82 | } | 82 | } |
83 | 83 | ||
84 | static void wait_completion(struct sh_flctl *flctl) | 84 | static void wait_completion(struct sh_flctl *flctl) |
diff --git a/drivers/mtd/nand/sm_common.c b/drivers/mtd/nand/sm_common.c index 4a8f367c295c..57cc80cd01a3 100644 --- a/drivers/mtd/nand/sm_common.c +++ b/drivers/mtd/nand/sm_common.c | |||
@@ -121,7 +121,7 @@ int sm_register_device(struct mtd_info *mtd, int smartmedia) | |||
121 | if (ret) | 121 | if (ret) |
122 | return ret; | 122 | return ret; |
123 | 123 | ||
124 | /* Bad block marker postion */ | 124 | /* Bad block marker position */ |
125 | chip->badblockpos = 0x05; | 125 | chip->badblockpos = 0x05; |
126 | chip->badblockbits = 7; | 126 | chip->badblockbits = 7; |
127 | chip->block_markbad = sm_block_markbad; | 127 | chip->block_markbad = sm_block_markbad; |
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c index 38fb16771f85..14c578707824 100644 --- a/drivers/mtd/nand/tmio_nand.c +++ b/drivers/mtd/nand/tmio_nand.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Slightly murky pre-git history of the driver: | 4 | * Slightly murky pre-git history of the driver: |
5 | * | 5 | * |
6 | * Copyright (c) Ian Molton 2004, 2005, 2008 | 6 | * Copyright (c) Ian Molton 2004, 2005, 2008 |
7 | * Original work, independant of sharps code. Included hardware ECC support. | 7 | * Original work, independent of sharps code. Included hardware ECC support. |
8 | * Hard ECC did not work for writes in the early revisions. | 8 | * Hard ECC did not work for writes in the early revisions. |
9 | * Copyright (c) Dirk Opfer 2005. | 9 | * Copyright (c) Dirk Opfer 2005. |
10 | * Modifications developed from sharps code but | 10 | * Modifications developed from sharps code but |