Home
last modified time | relevance | path

Searched refs:host_div (Results 1 – 1 of 1) sorted by relevance

/Zephyr-latest/drivers/sdhc/
Dsdhc_esp32.c758 void sdmmc_host_get_clk_dividers(uint32_t freq_khz, int *host_div, int *card_div) in sdmmc_host_get_clk_dividers() argument
768 *host_div = 4; /* 160 MHz / 4 = 40 MHz */ in sdmmc_host_get_clk_dividers()
771 *host_div = 8; /* 160 MHz / 8 = 20 MHz */ in sdmmc_host_get_clk_dividers()
774 *host_div = 10; /* 160 MHz / 10 / (20 * 2) = 400 kHz */ in sdmmc_host_get_clk_dividers()
783 *host_div = (clk_src_freq_hz) / (freq_khz * 1000); in sdmmc_host_get_clk_dividers()
784 if (*host_div > 15) { in sdmmc_host_get_clk_dividers()
785 *host_div = 2; in sdmmc_host_get_clk_dividers()
791 (*host_div)++; in sdmmc_host_get_clk_dividers()
796 static int sdmmc_host_calc_freq(const int host_div, const int card_div) in sdmmc_host_calc_freq() argument
804 return clk_src_freq_hz / host_div / ((card_div == 0) ? 1 : card_div * 2) / 1000; in sdmmc_host_calc_freq()
[all …]