STRUCT NAND_LEGACY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 to NULL, 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