Exposing NAND chip information

Tom Isaacson Tom.Isaacson at navico.com
Sun Apr 15 19:20:25 EDT 2012


Hi,

Our production software needs to record the NAND chip type used in production so we have a record in case we get problems later. The information we need is printed out by nand_get_flash_type(), e.g.:
  NAND device: Manufacturer ID: 0x98, Chip ID: 0xd1 (Toshiba NAND 128MiB 3,3V 8-bit)
My plan is to add some files to the /sys tree to expose this information. But the only part of that information stored is the device name, in mtd_info.name. Is there any reason why I shouldn't add the manufacturer name and ID and the chip ID to mtd_info so they can be accessed later on? Or should I add them to mxd_mtd_s (in nand_base.c) and keep it local?

Also, when I add the files to the /sys tree is there any naming convention I should follow? I was going to copy the way the eMMC device does it:
  manfid - Manufacturer ID
  devid - Chip ID
  manf_name - Manufacturer name
  dev_name - Chip name

Thanks for any help.

Tom Isaacson
Senior Software Developer
Navico



More information about the linux-mtd mailing list