Lines Matching +full:clock +full:- +full:src
2 * Copyright 2022-2023 NXP
3 * SPDX-License-Identifier: Apache-2.0
15 * @brief Set flexspi clock to given frequency
19 * is used by the clock control framework to set the clock frequency of
29 /* Get the root clock rate: FlexSPI clock * divisor */ in flexspi_clock_set_freq()
30 root_rate = ((CLKCTL0->FLEXSPIFCLKDIV & CLKCTL0_FLEXSPIFCLKDIV_DIV_MASK) + 1) * in flexspi_clock_set_freq()
36 divider = ((root_rate + (rate - 1)) / rate) - 1; in flexspi_clock_set_freq()
45 set_flexspi_clock(FLEXSPI, (CLKCTL0->FLEXSPIFCLKSEL & in flexspi_clock_set_freq()
58 * @brief Set flexspi clock
60 void __ramfunc set_flexspi_clock(FLEXSPI_Type *base, uint32_t src, uint32_t divider) in set_flexspi_clock() argument
62 CLKCTL0->FLEXSPIFCLKSEL = CLKCTL0_FLEXSPIFCLKSEL_SEL(src); in set_flexspi_clock()
63 CLKCTL0->FLEXSPIFCLKDIV |= in set_flexspi_clock()
65 CLKCTL0->FLEXSPIFCLKDIV = CLKCTL0_FLEXSPIFCLKDIV_DIV(divider - 1); in set_flexspi_clock()
66 while ((CLKCTL0->FLEXSPIFCLKDIV) & CLKCTL0_FLEXSPIFCLKDIV_REQFLAG_MASK) { in set_flexspi_clock()