Commit 66bd1846ef08412c5c850b8a672d6fdc0eab539a
Committed by
Albert ARIBAUD
1 parent
dd2445ec1b
Exists in
master
and in
53 other branches
mtd: nand: Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT
Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT option so that other NAND controller drivers could use it when a 16-bit NAND is deployed. drivers/mtd/nand/ndfc has CONFIG_SYS_NDFC_16BIT, so just rename it, so that other NAND drivers could reuse the same symbol. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Showing 2 changed files with 8 additions and 5 deletions Side-by-side Diff
README
... | ... | @@ -3755,9 +3755,12 @@ |
3755 | 3755 | - CONFIG_SYS_SRIOn_MEM_SIZE: |
3756 | 3756 | Size of SRIO port 'n' memory region |
3757 | 3757 | |
3758 | -- CONFIG_SYS_NDFC_16 | |
3759 | - Defined to tell the NDFC that the NAND chip is using a | |
3760 | - 16 bit bus. | |
3758 | +- CONFIG_SYS_NAND_BUSWIDTH_16BIT | |
3759 | + Defined to tell the NAND controller that the NAND chip is using | |
3760 | + a 16 bit bus. | |
3761 | + Not all NAND drivers use this symbol. | |
3762 | + Example of driver that uses it: | |
3763 | + - drivers/mtd/nand/ndfc.c | |
3761 | 3764 | |
3762 | 3765 | - CONFIG_SYS_NDFC_EBC0_CFG |
3763 | 3766 | Sets the EBC0_CFG register for the NDFC. If not defined |
drivers/mtd/nand/ndfc.c
... | ... | @@ -156,7 +156,7 @@ |
156 | 156 | |
157 | 157 | struct nand_chip *chip = mtd->priv; |
158 | 158 | |
159 | -#ifdef CONFIG_SYS_NDFC_16BIT | |
159 | +#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT | |
160 | 160 | return (uint8_t) readw(chip->IO_ADDR_R); |
161 | 161 | #else |
162 | 162 | return readb(chip->IO_ADDR_R); |
... | ... | @@ -218,7 +218,7 @@ |
218 | 218 | nand->ecc.bytes = 3; |
219 | 219 | nand->select_chip = ndfc_select_chip; |
220 | 220 | |
221 | -#ifdef CONFIG_SYS_NDFC_16BIT | |
221 | +#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT | |
222 | 222 | nand->options |= NAND_BUSWIDTH_16; |
223 | 223 | #endif |
224 | 224 |