clk: clk_stm32fx: add clock configuration for mmc usage

MMC block needs 48Mhz source clock, for that we choose
to select the SAI PLL.
Update also stm32_clock_get_rate() to retrieve the MMC
clock source needed in MMC driver.

STM32F4 uses a different RCC variant than STM32F7. For STM32F4
sdmmc clocks bit are located into dckcfgr register whereas there
are located into dckcfgr2 registers on STM32F7.
In both registers, bits CK48MSEL and SDMMC1SEL are located at
the same position.

Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
This commit is contained in:
Patrice Chotard
2017-11-15 13:14:52 +01:00
committed by Tom Rini
parent 928954fe58
commit 4e97e25723
4 changed files with 103 additions and 1 deletions

View File

@ -37,6 +37,7 @@ struct pll_psc {
struct stm32_clk_info {
struct pll_psc sys_pll_psc;
bool has_overdrive;
bool v2;
};
enum soc_family {