NAND: add support for reading ONFI parameters from NAND device
Subsystems (2)
PATCH v2 4/4 NAND: add support for reading ONFI parameters from NAND device
This patch adds support for reading NAND device ONFI parameters and use the ONFI informations to define its geometry. In case the device supports ONFI, the onfi_version field in struct nand_chip contains the version (BCD) and the onfi_params structure can be used by drivers to set up timings and such. We currently only support ONFI 1.0 parameters.
Signed-off-by Brian Norris <[email protected]>
Signed-off-by Matthieu Castet <[email protected]>
Signed-off-by Maxime Bizon <[email protected]>
Signed-off-by Florian Fainelli <[email protected]>
---
Changes since v1:
- factored out crc16 to lib/crc16.c
- reversed the ONFI version checking order: from highest to lowest
- added define for the CRC16 initialization value
- use strim to cleanup whitespace in string
drivers/mtd/nand/Kconfig +1 -0
@@ -15,6 +15,7 @@ menuconfig MTD_NAND depends on MTD select MTD_NAND_IDS select MTD_NAND_ECC + select CRC16 help This enables support for accessing all type of NAND flash devices. For further information see
drivers/mtd/nand/nand_base.c +122 -30
237 lines not on this page · raw message
include/linux/mtd/nand.h +68 -0
86 lines not on this page · raw message