STRUCT SPI_NOR_FIXUPS(9)
π NAME π
Bestie, welcome to the struct spi_nor_fixups page from the Kernel API Manual π
this one is literally about SPI NOR fixup hooks β the little hook squad that swoops in when the flash config needs a glow-up.
β¨ SYNOPSIS β¨
Hereβs the struct, exactly as it shows up, no edits, no cap:
struct spi_nor_fixups {
void (*default_init)(struct spi_nor *nor);
int (*post_bfpt)(struct spi_nor *nor, const struct
sfdp_parameter_header *bfpt_header, const struct sfdp_bfpt *bfpt);
void (*smpt_read_dummy)(const struct spi_nor *nor, u8 *read_dummy);
void (*smpt_map_id)(const struct spi_nor *nor, u8 *map_id);
int (*post_sfdp)(struct spi_nor *nor);
int (*late_init)(struct spi_nor *nor);
};
πΈ Members πΈ
default_initβ called after default flash parameters init. Itβs your little tweak moment for flash parameters when the info from theflash_infotable is incomplete or wrong. lowkey essential when the table didnβt get the memo π«post_bfptβ called after the BFPT table has been parsed. Thatβs it, thatβs the job, and it ate πsmpt_read_dummyβ called while the SMPT table is being parsed. Itβs there to fix the number of dummy cycles in read register ops. tiny detail, big main character energy β¨smpt_map_idβ called after the map ID in the SMPT table has been determined, specifically for when that map ID is wrong and needs to be fixed. not me fixing the ID at the function afterparty πpost_sfdpβ called after SFDP has been parsed. Important little caveat: it is not called for SPI NORs that do not support RDSFDP. Typically used to tweak various parameters that could not be extracted by other means (i.e. when information provided by theSFDP/flash_infotables are incomplete or wrong). This is the βbestie, the table liedβ hook πlate_initβ used to initialize flash parameters that are not declared in the JESD216 SFDP standard, or where SFDP tables not defined at all. It will replace thedefault_inithook. so itβs giving βnew hook, same lane, upgraded fitβ π
π¦ Description π¦
Those hooks can be used to tweak the SPI NOR configuration when the SFDP table is broken or not available. Basically: when the flash situation is a mess, these are the designated fixers on call π₯
π SEE ALSO π
Kernel file ./drivers/mtd/spi-nor/core.h β and the whole supporting cast, iykyk:
struct spi_nor_erase_type(9)struct spi_nor_erase_command(9)struct spi_nor_erase_region(9)struct spi_nor_erase_map(9)struct spi_nor_locking_ops(9)struct spi_nor_otp_organization(9)struct spi_nor_otp_ops(9)struct spi_nor_otp(9)struct spi_nor_flash_parameter(9)struct spi_nor_id(9)struct flash_info(9)struct spi_nor_manufacturer(9)struct sfdp(9)spi_nor_needs_sfdp(9)
Okay bestie, thatβs the whole page π it lives in ./drivers/mtd/spi-nor, dated October 2026, and its manual identity is struct spi_nor_fixups(9) π«Άπβ¨
π¦ 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