Home
last modified time | relevance | path

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

/Zephyr-latest/drivers/sdhc/
Dsam_hsmci.c121 uint32_t div_val; in sam_hsmci_set_io() local
141 div_val = frequency / ios->clock - 2; in sam_hsmci_set_io()
143 if (div_val < 0) { in sam_hsmci_set_io()
144 div_val = 0; in sam_hsmci_set_io()
147 if (div_val > _MSMCI_MAX_DIVISOR) { in sam_hsmci_set_io()
148 div_val = _MSMCI_MAX_DIVISOR; in sam_hsmci_set_io()
151 LOG_DBG("divider: %d (freq=%d)", div_val, frequency / (div_val + 2)); in sam_hsmci_set_io()
155 ((div_val & 1) ? HSMCI_MR_CLKODD : 0) | HSMCI_MR_CLKDIV(div_val >> 1); in sam_hsmci_set_io()