STRUCT NAND_FLASH_DEV(9)
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 asid[0]).dev_idβ device ID part of the full chip ID array (refers the same memory address asid[1]).idβ full device ID array.pagesizeβ size of the NAND page in bytes; if0, 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 if0).optionsβ stores various chip bit options.id_lenβ The valid length of theid.oobsizeβ OOB size.eccβ ECC correctability and step information from the datasheet.ecc.strength_dsβ The ECC correctability from the datasheet, same as theecc_strength_dsinnand_chip{}.ecc.step_dsβ The ECC step required by theecc.strength_ds, same as theecc_step_dsinnand_chip{}, also from the datasheet. For example, the "4bit ECC for each 512Byte" can be set withNAND_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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms