gpmc_calc_wa...ring_divider(9)
π gpmc_calc_waitmonitoring_divider(9) β yes bestie, that's the Kernel API Manual π
okay so first thing: the header up top lowkey truncates the name (gpmc_calc_wa...ring_divider(9)) but the full name is gpmc_calc_waitmonitoring_divider, and this whole page lives in the Kernel API Manual. she's a kernel function, she's from ./drivers/memory, and she's about to explain dividers to you. strap in π¦
β¨ NAME β¨
gpmc_calc_waitmonitoring_divider β calculate the proper GPMCFCLKDIVIDER based on WAITMONITORINGTIME π
and the vibe check on WAITMONITORINGTIME? it will be _at least_ as long as desired, i.e.:
- read β don't sample the bus too early π
- write β the data is longer on the bus βοΈ
that's it, that's the whole energy. no cap.
πΈ SYNOPSIS πΈ
int gpmc_calc_waitmonitoring_divider (unsigned int wait_monitoring );
literally one argument, one int back. she's lowkey low maintenance π
π ARGUMENTS π
wait_monitoringβ the WAITMONITORINGTIME, measured in ns β±οΈ (nanoseconds, bestie, not vibes)
π§ DESCRIPTION π§
okay so here's the formula, and yes it's nested ceils, don't panic, we got this:
gpmc_clk_div + 1 = ceil(ceil(waitmonitoringtime_ns / gpmc_fclk_ns) / waitmonitoring_ticks)
that's the whole calculation, character for character, no notes π
and the edge case? if WAITMONITORINGTIME ends up resulting in 0 or 1 tick with div = 1, those get caught by the div <= 0 check. so nobody's out here dividing by zero on my watch, periodt π
π₯ RETURN π₯
-1on failure to scale π (it tried, it really did)- else the proper divider,
> 0β¨ slay
π¦ SEE ALSO π¦
kernel file ./drivers/memory/omap-gpmc.c β the whole friend group lives here:
gpmc_get_clk_period(9)get_gpmc_timing_reg(9)set_gpmc_timing_reg(9)gpmc_calc_divider(9)gpmc_cs_set_timings(9)gpmc_configure(9)gpmc_omap_get_nand_ops(9)gpmc_cs_program_settings(9)gpmc_cs_remap(9)gpmc_read_settings_dt(9)gpmc_probe_generic_child(9)
go read them, iykyk π
okay that's the page!! this lil diva ships from ./drivers/memory, dated October 2026, in the Kernel API Manual (the (9) girlies π«Ά). mwah, go calculate some dividers responsibly πβ¨π
π¦ 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