STRUCT NAND_LEGACY(9)
π
struct nand_legacy(9) β Kernel API Manual π
Okay bestie, welcome to the manual page for struct nand_legacy! This is the Kernel API Manual entry, and we're about to get into some legacy NAND chip fields and hooks. Buckle up! π
β¨ NAME β¨
struct nand_legacy β NAND chip legacy fields/hooks, no cap π
π SYNOPSIS π
struct nand_legacy {
void __iomem *IO_ADDR_R;
void __iomem *IO_ADDR_W;
void (*select_chip)(struct nand_chip *chip, int cs);
u8 (*read_byte)(struct nand_chip *chip);
void (*write_byte)(struct nand_chip *chip, u8 byte);
void (*write_buf)(struct nand_chip *chip, const u8 *buf, int len);
void (*read_buf)(struct nand_chip *chip, u8 *buf, int len);
void (*cmd_ctrl)(struct nand_chip *chip, int dat, unsigned int
ctrl);
void (*cmdfunc)(struct nand_chip *chip, unsigned command, int
column, int page_addr);
int (*dev_ready)(struct nand_chip *chip);
int (*waitfunc)(struct nand_chip *chip);
int (*block_bad)(struct nand_chip *chip, loff_t ofs);
int (*block_markbad)(struct nand_chip *chip, loff_t ofs);
int (*set_features)(struct nand_chip *chip, int feature_addr, u8
*subfeature_para);
int (*get_features)(struct nand_chip *chip, int feature_addr, u8
*subfeature_para);
int chip_delay;
struct nand_controller dummy_controller;
};
π§ MEMBERS π§
Here's the full rundown of every single member, bestie. Don't skip anyβthey're all important for understanding this legacy situation! πΈ
IO_ADDR_Rβ the address for reading those 8 I/O lines of the flash device, periodt πIO_ADDR_Wβ the address for writing those 8 I/O lines of the flash device, slay β¨select_chipβ function to select or deselect a specific target/die, no cap π―read_byteβ reads one single byte from the chip, literally πwrite_byteβ writes a single byte to the chip on the low 8 I/O lines, fr fr ποΈwrite_bufβ writes data from the buffer to the chip, it's giving data transfer πread_bufβ reads data from the chip into the buffer, main character energy π₯cmd_ctrlβ hardware-specific function for controlling ALE/CLE/nCE. Also used to write command and address, iykyk π§ββοΈcmdfuncβ hardware-specific function for writing commands to the chip, periodt πdev_readyβ hardware-specific function for accessing the device ready/busy line. If set toNULL, no access to ready/busy is available and the ready/busy information is read from the chip status register, bestie π«Άwaitfuncβ hardware-specific function for wait on ready, lowkey important β³block_badβ checks if a block is bad, using OOB markers, ngl π©block_markbadβ marks a block bad, highkey useful πset_featuresβ sets the NAND chip features, slay β¨get_featuresβ gets the NAND chip features, obsessed πchip_delayβ chip-dependent delay for transferring data from array to read regs (tR), fr fr β±οΈdummy_controllerβ dummy controller implementation for drivers that can only control a single chip, it's giving placeholder π
π DESCRIPTION π
Okay so real talk: if you look at this structure you're already wrong. These fields/hooks are all deprecated. No cap. It's giving legacy code that you shouldn't be using. Periodt. πβ¨
π«Ά SEE ALSO π«Ά
Check out these other pages, bestieβthey're all in the kernel file ./include/linux/mtd/rawnand.h and honestly they're way more current:
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_chip_ops(9)struct nand_manufacturer(9)struct nand_secure_region(9)struct nand_chip(9)nand_get_interface_config(9)struct nand_flash_dev(9)nand_opcode_8bits(9)nand_get_data_buf(9)
Catch you later, bestie! This page is from the ./include/linux/mtd directory and it's dated October 2026. Stay slaying! π
β¨πΈ
π¦ 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