STRUCT SPI_NOR_ERASE_REGION(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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' at BIT(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