Skip to contentSkip to conversation

NAND: add support for reading ONFI parameters from NAND device

PATCH In review Florian Fainelli 1 participant 1 message Aug 18, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

---
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
index 8b4b67c..f6254a3 100644
@@ -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