spi_nor_read_raw(9)
π spi_nor_read_raw(9) β the Kernel API Manual, but make it make sense
okay so this is spi_nor_read_raw(9), straight out of the Kernel API Manual, and it's literally the raw read of serial flash memory. bestie, before you even think about calling this, know that read_opcode, addr_nbytes and read_dummy β all three of those members of the struct spi_nor β should be previously set. like, set them first. π
β¨ NAME β¨
spi_nor_read_raw β raw read of serial flash memory. read_opcode, addr_nbytes and read_dummy members of the struct spi_nor should be previously set.
π SYNOPSIS π
int spi_nor_read_raw (struct spi_nor *nor , u32 addr , size_t len , u8
*buf );
πΈ ARGUMENTS πΈ
norβ pointer to a'struct spi_nor'π¦addrβ offset in the serial flash memorylenβ number of bytes to readbufβ buffer where the data is copied into (dma-safe memory, no cap, keep it dma-safe or it's giving chaos π)
β RETURN β
0 on success, -errno otherwise. that's it, that's the whole vibe check. π«Ά
ngl, if you get anything other than0back it's a-errnosituation, so go read the errno and be nice to yourself about it. π
π SEE ALSO π
Kernel file ./drivers/mtd/spi-nor/sfdp.c and honestly the whole friend group:
spi_nor_read_sfdp(9)spi_nor_read_sfdp_dma_unsafe(9)spi_nor_set_erase_settings_from_bfpt(9)spi_nor_map_cmp_erase_type(9)spi_nor_sort_erase_mask(9)spi_nor_regions_sort_erase_types(9)spi_nor_parse_bfpt(9)spi_nor_smpt_addr_nbytes(9)spi_nor_smpt_read_dummy(9)spi_nor_get_map_in_use(9)spi_nor_region_check_overlay(9)spi_nor_init_non_uniform_erase_map(9)spi_nor_parse_smpt(9)spi_nor_parse_4bait(9)spi_nor_parse_profile1(9)spi_nor_parse_sccr(9)spi_nor_parse_sccr_mc(9)spi_nor_post_sfdp_fixups(9)spi_nor_check_sfdp_signature(9)spi_nor_parse_sfdp(9)
okay that's the whole page, mwah π
β¨ this iconic little entry lives in ./drivers/mtd/spi-nor and it's dated October 2026 β periodt. ππ₯
π¦ 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