spi_nor_init_params(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… spi_nor_init_params β€” Kernel API Manual ✨

okay so bestie, welcome to spi_nor_init_params(9) from the Kernel API Manual β€” yes that manual, the one with all the vibes. this is where your flash's parameters and settings get their whole personality set up. let's go πŸŽ€


🌸 NAME 🌸

spi_nor_init_params β€” Initialize the flash's parameters and settings. literally what it says on the tin, no cap πŸ’–


✨ SYNOPSIS ✨

int spi_nor_init_params (struct spi_nor *nor );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • nor β€” pointer to a struct spi_nor. that's your flash's little passport photo, basically 🫢

πŸ’… DESCRIPTION πŸ’…

okay so here's the tea: the flash parameters and settings are initialized based on a sequence of calls, and those calls are ordered by priority. think of it like a group chat where the most reliable friend speaks first and everyone after can absolutely quote-tweet and override them 😭

  1. Default flash parameters initialization. the initializations are done based on nor->info data: spi_nor_info_init_params

which can be overwritten by:

  1. Manufacturer flash parameters initialization. the initializations are done based on MFR register, or β€” when the decisions can not be done solely based on MFR β€” by using specific flash_info tweeks, ->default_init: spi_nor_manufacturer_init_params

which can be overwritten by:

  1. SFDP flash parameters initialization. JESD216 SFDP is a standard and should be more accurate that the above. spi_nor_parse_sfdp or spi_nor_no_sfdp_init_params
🚨 important bestie, please note: there is a ->post_bfpt fixup hook that can overwrite the flash parameters and settings immediately after parsing the Basic Flash Parameter Table. spi_nor_post_sfdp_fixups is called after the SFDP tables are parsed. It is used to tweak various flash parameters when information provided by the SFDP tables are wrong. it's giving "the source lied, we fix it in post" πŸ’€

which can be overwritten by:

  1. Late flash parameters initialization, used to initialize flash parameters that are not declared in the JESD216 SFDP standard, or where SFDP tables are not defined at all. spi_nor_late_init_params

like, everyone gets a turn to edit the doc and the last editor has main character energy πŸ‘‘


🌈 RETURN 🌈

  • 0 on success πŸŽ‰
  • -errno otherwise πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/mtd/spi-nor/core.c, plus this absolutely iconic roster of friends:

spi_nor_get_cmd_ext(9), spi_nor_spimem_setup_op(9), spi_nor_spimem_bounce(9), spi_nor_spimem_exec_op(9), spi_nor_spimem_read_data(9), spi_nor_read_data(9), spi_nor_spimem_write_data(9), spi_nor_write_data(9), spi_nor_read_any_reg(9), spi_nor_write_any_volatile_reg(9), spi_nor_write_enable(9), spi_nor_write_disable(9), spi_nor_read_id(9), spi_nor_read_sr(9), spi_nor_read_cr(9), spi_nor_set_4byte_addr_mode_en4b_ex4b(9), spi_nor_set_4byte_addr_mode_wren_en4b_ex4b(9), spi_nor_set_4byte_addr_mode_brwr(9), spi_nor_sr_ready(9), spi_nor_use_parallel_locking(9), spi_nor_ready(9), spi_nor_wait_till_ready_with_timeout(9), spi_nor_wait_till_ready(9), spi_nor_global_block_unlock(9), spi_nor_write_sr(9), spi_nor_write_sr1_and_check(9), spi_nor_write_16bit_sr_and_check(9), spi_nor_write_16bit_cr_and_check(9), spi_nor_write_16bit_sr_cr_and_check(9), spi_nor_write_sr_and_check(9), spi_nor_write_sr_cr_and_check(9), spi_nor_write_sr2(9), spi_nor_read_sr2(9), spi_nor_erase_die(9), spi_nor_div_by_erase_size(9), spi_nor_find_best_erase_type(9), spi_nor_init_erase_cmd(9), spi_nor_destroy_erase_cmd_list(9), spi_nor_init_erase_cmd_list(9), spi_nor_erase_multi_sectors(9), spi_nor_sr1_bit6_quad_enable(9), spi_nor_sr2_bit1_quad_enable(9), spi_nor_sr2_bit7_quad_enable(9), spi_nor_spimem_check_read_pp_op(9), spi_nor_spimem_check_readop(9), spi_nor_spimem_check_pp(9), spi_nor_spimem_adjust_hwcaps(9), spi_nor_set_erase_type(9), spi_nor_mask_erase_type(9), spi_nor_init_uniform_erase_map(9), spi_nor_select_uniform_erase(9), spi_nor_manufacturer_init_params(9), spi_nor_no_sfdp_init_params(9), spi_nor_init_flags(9), spi_nor_init_fixup_flags(9), spi_nor_late_init_params(9), spi_nor_sfdp_init_params_deprecated(9), spi_nor_init_params_deprecated(9), spi_nor_init_default_params(9), spi_nor_quad_enable(9), spi_nor_set_4byte_addr_mode(9), spi_nor_soft_reset(9)

like?? the way this function knows everybody at the party πŸ§šπŸ’œ


that's the whole page babes πŸ’– this one came out of ./drivers/mtd/spi-nor, dated October 2026, and it signs off as spi_nor_init_params(9) β€” periodt πŸ“πŸ¦‹ go forth and init those params, bestie ⭐🌸

πŸ“¦ where this page comes from