summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-09-09 16:04:49 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2013-09-09 16:04:49 +0200
commitf3c3cb8634c91632ad78bf5165a07a980d736947 (patch)
tree27443434ab55e77f0b3ecd2f7f6798046303ddb7
parentec8c22004a2dd68771d33a8fe5e38b10c465dcc2 (diff)
mtd/nand: fsl_nfc: add option for 8-bit wide bus width
Add configuration option CONFIG_NAND_FSL_NFC_8BIT to be able to specify narrow 8-bit wide bus width in connecting NAND chips.
-rw-r--r--drivers/mtd/nand/fsl_nfc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mtd/nand/fsl_nfc.c b/drivers/mtd/nand/fsl_nfc.c
index 231490a7b20..a211d541706 100644
--- a/drivers/mtd/nand/fsl_nfc.c
+++ b/drivers/mtd/nand/fsl_nfc.c
@@ -882,7 +882,10 @@ int board_nand_init(struct nand_chip *chip)
chip->write_buf = fsl_nfc_write_buf;
chip->verify_buf = fsl_nfc_verify_buf;
chip->options = NAND_NO_AUTOINCR | NAND_USE_FLASH_BBT |
- NAND_BUSWIDTH_16 | NAND_CACHEPRG;
+ NAND_CACHEPRG;
+#ifndef CONFIG_NAND_FSL_NFC_8BIT
+ chip->options |= NAND_BUSWIDTH_16;
+#endif
chip->select_chip = nfc_select_chip;
@@ -939,9 +942,11 @@ int board_nand_init(struct nand_chip *chip)
CONFIG_BUFNO_AUTO_INCR_MASK,
CONFIG_BUFNO_AUTO_INCR_SHIFT, 0);
+#ifndef CONFIG_NAND_FSL_NFC_8BIT
nfc_set_field(mtd, NFC_FLASH_CONFIG,
CONFIG_16BIT_MASK,
CONFIG_16BIT_SHIFT, 1);
+#endif /* CONFIG_NAND_FSL_NFC_8BIT */
/* SET FAST_FLASH = 1 */
nfc_set_field(mtd, NFC_FLASH_CONFIG,