Commit 24af0c8e authored by Fabrice DJIATSA's avatar Fabrice DJIATSA Committed by Daniel DeGrasse
Browse files

drivers: pwm: stm32: add stm32h7rs bus prescalers



The clock tree of the STM32H7RS series uses the ppre1
and ppre2 naming convention instead of apb1_prescaler
and apb2_prescaler for bus prescaler.

Signed-off-by: default avatarFabrice DJIATSA <fabrice.djiatsa-ext@st.com>
parent 12fdde66
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -247,6 +247,8 @@ static int get_tim_clk(const struct stm32_pclken *pclken, uint32_t *tim_clk)
	if (pclken->bus == STM32_CLOCK_BUS_APB1) {
#if defined(CONFIG_SOC_SERIES_STM32MP1X)
		apb_psc = (uint32_t)(READ_BIT(RCC->APB1DIVR, RCC_APB1DIVR_APB1DIV));
#elif defined(CONFIG_SOC_SERIES_STM32H7RSX)
		apb_psc = STM32_PPRE1;
#else
		apb_psc = STM32_APB1_PRESCALER;
#endif
@@ -256,6 +258,8 @@ static int get_tim_clk(const struct stm32_pclken *pclken, uint32_t *tim_clk)
	else {
#if defined(CONFIG_SOC_SERIES_STM32MP1X)
		apb_psc = (uint32_t)(READ_BIT(RCC->APB2DIVR, RCC_APB2DIVR_APB2DIV));
#elif defined(CONFIG_SOC_SERIES_STM32H7RSX)
		apb_psc = STM32_PPRE2;
#else
		apb_psc = STM32_APB2_PRESCALER;
#endif