/* Get the peripheral clock speed for the USART at base specified.  */
uint32_t rcc_get_usart_clk_freq(uint32_t usart)
/* Get the peripheral clock speed for the USART at base specified.  */
uint32_t rcc_get_usart_clk_freq(uint32_t usart)
{
	if (usart == USART1_BASE) {
		return rcc_get_usart_clksel_freq(RCC_CFGR3_USART1SW_SHIFT);
	} else if (usart == USART2_BASE) {
		return rcc_get_usart_clksel_freq(RCC_CFGR3_USART2SW_SHIFT);
	} else if (usart == USART3_BASE) {
		return rcc_get_usart_clksel_freq(RCC_CFGR3_USART3SW_SHIFT);
	} else {
		return rcc_apb1_frequency;
	}
}