/* Duplicate implementation of CLOCK_SetMux() provided by SDK. This function must be linked to ITCM, as it will be used to change the clocks of the FLEXSPI and SEMC peripherals. Any function called from this function must also reside in ITCM  */
static void clock_set_mux(clock_mux_t mux, uint32_t value)
/* Duplicate implementation of CLOCK_SetMux() provided by SDK. This function must be linked to ITCM, as it will be used to change the clocks of the FLEXSPI and SEMC peripherals. Any function called from this function must also reside in ITCM  */
static void clock_set_mux(clock_mux_t mux, uint32_t value)
{
	uint32_t busy_shift;
	busy_shift = (uint32_t)CCM_TUPLE_BUSY_SHIFT(mux);
	CCM_TUPLE_REG(CCM, mux) = (CCM_TUPLE_REG(CCM, mux) & (~CCM_TUPLE_MASK(mux))) |
		  (((uint32_t)((value) << CCM_TUPLE_SHIFT(mux))) & CCM_TUPLE_MASK(mux));
	if (busy_shift != CCM_NO_BUSY_WAIT) {
		while ((CCM->CDHIPR & ((1UL << busy_shift))) != 0UL) {
		}
	}
}