diff options
-rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 1dcda6badfdc..6e28121d3118 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
@@ -185,6 +185,7 @@ struct pxa3xx_nand_info { | |||
185 | int cs; | 185 | int cs; |
186 | int use_ecc; /* use HW ECC ? */ | 186 | int use_ecc; /* use HW ECC ? */ |
187 | int use_dma; /* use DMA ? */ | 187 | int use_dma; /* use DMA ? */ |
188 | int use_spare; /* use spare ? */ | ||
188 | int is_ready; | 189 | int is_ready; |
189 | 190 | ||
190 | unsigned int page_size; /* page size of attached chip */ | 191 | unsigned int page_size; /* page size of attached chip */ |
@@ -325,6 +326,11 @@ static void pxa3xx_nand_start(struct pxa3xx_nand_info *info) | |||
325 | else | 326 | else |
326 | ndcr &= ~NDCR_DMA_EN; | 327 | ndcr &= ~NDCR_DMA_EN; |
327 | 328 | ||
329 | if (info->use_spare) | ||
330 | ndcr |= NDCR_SPARE_EN; | ||
331 | else | ||
332 | ndcr &= ~NDCR_SPARE_EN; | ||
333 | |||
328 | ndcr |= NDCR_ND_RUN; | 334 | ndcr |= NDCR_ND_RUN; |
329 | 335 | ||
330 | /* clear status bits and run */ | 336 | /* clear status bits and run */ |
@@ -526,6 +532,7 @@ static int prepare_command_pool(struct pxa3xx_nand_info *info, int command, | |||
526 | info->buf_count = 0; | 532 | info->buf_count = 0; |
527 | info->oob_size = 0; | 533 | info->oob_size = 0; |
528 | info->use_ecc = 0; | 534 | info->use_ecc = 0; |
535 | info->use_spare = 1; | ||
529 | info->use_dma = (use_dma) ? 1 : 0; | 536 | info->use_dma = (use_dma) ? 1 : 0; |
530 | info->is_ready = 0; | 537 | info->is_ready = 0; |
531 | info->retcode = ERR_NONE; | 538 | info->retcode = ERR_NONE; |