STRUCT SPI_NOR_ERASE_REGION(9)
π struct spi_nor_erase_region(9) π
okay bestie, welcome to the Kernel API Manual β today's main character is struct spi_nor_erase_region, and honestly? it's giving "small struct, big responsibilities" β¨
β¨ NAME β¨
struct spi_nor_erase_region β the structure that describes a SPI NOR erase region. that's it, that's the vibe π
πΈ SYNOPSIS πΈ
struct spi_nor_erase_region {
u64 offset;
u64 size;
u8 erase_mask;
bool overlaid;
};
like, look at her. four fields. immaculate. no cap π
π¦ Members π¦
offsetβ the offset in the data array of erase region start. yes, in the data array. she's precise like that πsizeβ the size of the region, in bytes. bytes, bestie, keep up π«Άerase_maskβ a bitmask that indicates all the supported erase commands inside this region β‘ the erase types are sorted in ascending order, with the smallest Erase Type size chillin' atBIT(0). so like, smallest one gets the front seat, iykyk π₯overlaidβ determines if this region is overlaid. simple. iconic. periodt π
π SEE ALSO π
Kernel file ./drivers/mtd/spi-nor/core.h β and like, the whole friend group honestly:
struct spi_nor_erase_type(9)struct spi_nor_erase_command(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_fixups(9)struct spi_nor_id(9)struct flash_info(9)struct spi_nor_manufacturer(9)struct sfdp(9)spi_nor_needs_sfdp(9)
go read them too, bestie, don't leave them on read ππ
and that's the whole page!! πβ¨ this lil slice of kernel lore lives over in ./drivers/mtd/spi-nor, dated October 2026, and yes she's still serving struct spi_nor_erase_region(9) energy ππ¦πΈπ
π«Ά
π¦ 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