STRUCT NAND_FLASH_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

struct nand_flash_dev(9) 🌸

okay bestie, this page is straight out of the Kernel API Manual, and it’s literally the struct nand_flash_dev NAND Flash Device ID Structure. no cap, it’s giving β€œtiny but important kernel struct” energy πŸ’…


✨ NAME ✨

struct nand_flash_dev β€” NAND Flash Device ID Structure


🌈 SYNOPSIS 🌈

       struct nand_flash_dev {
           char *name;
           union {
             struct {
               uint8_t mfr_id;
               uint8_t dev_id;
             };
             uint8_t id[NAND_MAX_ID_LEN];
           };
           unsigned int pagesize;
           unsigned int chipsize;
           unsigned int erasesize;
           unsigned int options;
           uint16_t id_len;
           uint16_t oobsize;
           struct {
             uint16_t strength_ds;
             uint16_t step_ds;
           } ecc;
        };

🫢 Members 🫢

  • name β€” a human-readable name of the NAND chip. iconic, tbh.
  • {unnamed_union} β€” anonymous.
  • {unnamed_struct} β€” anonymous.
  • mfr_id β€” manufacturer ID part of the full chip ID array (refers the same memory address as id[0]).
  • dev_id β€” device ID part of the full chip ID array (refers the same memory address as id[1]).
  • id β€” full device ID array.
  • pagesize β€” size of the NAND page in bytes; if 0, then the real page size (as well as the eraseblock size) is determined from the extended NAND chip ID array.
  • chipsize β€” total chip size in MiB.
  • erasesize β€” eraseblock size in bytes (determined from the extended ID if 0).
  • options β€” stores various chip bit options.
  • id_len β€” The valid length of the id.
  • oobsize β€” OOB size.
  • ecc β€” ECC correctability and step information from the datasheet.
  • ecc.strength_ds β€” The ECC correctability from the datasheet, same as the ecc_strength_ds in nand_chip{}.
  • ecc.step_ds β€” The ECC step required by the ecc.strength_ds, same as the ecc_step_ds in nand_chip{}, also from the datasheet. For example, the "4bit ECC for each 512Byte" can be set with NAND_ECC_INFO(4, 512).

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./include/linux/mtd/rawnand.h is the main character here, and the whole squad is:

  • struct nand_parameters(9)
  • struct nand_id(9)
  • struct nand_ecc_step_info(9)
  • struct nand_ecc_caps(9)
  • struct nand_ecc_ctrl(9)
  • struct nand_sdr_timings(9)
  • struct nand_nvddr_timings(9)
  • enum nand_interface_type(9)
  • struct nand_interface_config(9)
  • nand_interface_is_sdr(9)
  • nand_interface_is_nvddr(9)
  • nand_get_sdr_timings(9)
  • nand_get_nvddr_timings(9)
  • struct nand_op_cmd_instr(9)
  • struct nand_op_addr_instr(9)
  • struct nand_op_data_instr(9)
  • struct nand_op_waitrdy_instr(9)
  • enum nand_op_instr_type(9)
  • struct nand_op_instr(9)
  • struct nand_subop(9)
  • struct nand_op_parser_addr_constraints(9)
  • struct nand_op_parser_data_constraints(9)
  • struct nand_op_parser_pattern_elem(9)
  • struct nand_op_parser_pattern(9)
  • struct nand_op_parser(9)
  • struct nand_operation(9)
  • struct nand_controller_ops(9)
  • struct nand_controller(9)
  • struct nand_legacy(9)
  • struct nand_chip_ops(9)
  • struct nand_manufacturer(9)
  • struct nand_secure_region(9)
  • struct nand_chip(9)
  • nand_get_interface_config(9)
  • nand_opcode_8bits(9)
  • nand_get_data_buf(9)

xoxo, source/version: ./include/linux/mtd, date: October 2026 πŸ’…πŸŽ€βœ¨

πŸ“¦ where this page comes from