Lines Matching +full:clock +full:- +full:divider
4 * SPDX-License-Identifier: Apache-2.0
12 #include <zephyr/dt-bindings/clock/imx_ccm.h>
16 uint8_t divider; in flexspi_clock_set_freq() local
24 /* Get clock root frequency */ in flexspi_clock_set_freq()
33 /* Get clock root frequency */ in flexspi_clock_set_freq()
42 return -ENOTSUP; in flexspi_clock_set_freq()
44 /* Select a divider based on root frequency. in flexspi_clock_set_freq()
45 * if we can't get an exact divider, round down in flexspi_clock_set_freq()
47 divider = ((root_rate + (rate - 1)) / rate) - 1; in flexspi_clock_set_freq()
48 /* Cap divider to max value */ in flexspi_clock_set_freq()
49 divider = MIN(divider, kCLOCK_FlexspiDivBy8); in flexspi_clock_set_freq()
58 CLOCK_SetDiv(div_sel, divider); in flexspi_clock_set_freq()