gpmc_cs_program_settings(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ gpmc_cs_program_settings πŸ’…

okay so real talk, this is a page from the Kernel API Manual, section 9, and the function is gpmc_cs_program_settings. she does exactly what her name says and we love her for it 🫢


🌸 NAME 🌸

gpmc_cs_program_settings β€” programs non-timing related settings ✨

like literally. the non-timing ones. timing is a whole other girl's job (we'll get to her, don't worry πŸŽ€).


πŸ¦‹ SYNOPSIS πŸ¦‹

int gpmc_cs_program_settings (int cs , struct gpmc_settings *p );

two args, one int, one pointer, returns an int. short and iconic, no notes πŸ‘‘


πŸ’– ARGUMENTS πŸ’–

  • cs β€” the GPMC chip-select you're programming. that's the one, bestie. pick your chip-select 🎯
  • p β€” pointer to the GPMC settings struct. this is where all your settings live, she's just reading what you put in there πŸ’…

🌈 DESCRIPTION 🌈

so what does she actually do? she programs the non-timing related settings for a GPMC chip-select β€” stuff like bus-width, burst configuration, etc. the vibes-y settings, not the clock-y ones ✨

the way you have to use her is very specific and i need you to hear me on this:

  • call her once for each chip-select that is being used β€” one call per chip-select, no sharing, no cutting corners πŸŽ€
  • she must be called before you call gpmc_cs_set_timings ⚠️ like genuinely, this is not optional
🚨 and why, you ask? because the timing parameters in the CONFIG1 register will be initialised to zero by this function. she zeroes them. all of them. so if you go calling gpmc_cs_set_timings first and then her, you've just yeeted your own timings into the void. don't do that to yourself 😭

returns 0 on success and an appropriate negative error code on failure. classic. good girl, honest girl πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

go read the kernel file ./drivers/memory/omap-gpmc.c (yes, the whole file, she's worth it), plus her whole friend group:


and that's the page!! πŸŽ€ this one lives in ./drivers/memory, dated October 2026, and she's filed under gpmc_cs_program_settings(9) β€” that's the version, that's the date, that's the whole footer, mwah πŸ’‹ iykyk 🌟

πŸ“¦ where this page comes from