Merged in elbeinformatik/nuttx/NX-PR (pull request #449)

NX PR

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
Titus von Boxberg 2017-08-01 15:02:14 +00:00 committed by Gregory Nutt
commit b7b3876e8f
2 changed files with 58 additions and 0 deletions

View File

@ -243,6 +243,28 @@ void stm32_rcc_enablelsi(void);
void stm32_rcc_disablelsi(void);
#if defined(CONFIG_STM32F7_STM32F76XX) || defined(CONFIG_STM32F7_STM32F77XX)
/****************************************************************************
* Name: stm32f7x9_rcc_dsisrcphy
*
* Description:
* Set DSI clock source to DSI PHY
*
****************************************************************************/
void stm32f7x9_rcc_dsisrcphy(void);
/****************************************************************************
* Name: stm32f7x9_rcc_dsisrcpllr
*
* Description:
* Set DSI clock source to PLLR
*
****************************************************************************/
void stm32f7x9_rcc_dsisrcpllr(void);
#endif
#undef EXTERN
#if defined(__cplusplus)
}

View File

@ -985,3 +985,39 @@ static inline void rcc_enableperipherals(void)
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: stm32f7x9_rcc_dsisrcphy
*
* Description:
* Set DSI clock source to DSI PHY
*
****************************************************************************/
void stm32f7x9_rcc_dsisrcphy(void)
{
uint32_t regval;
regval = getreg32(STM32_RCC_DCKCFGR2);
regval &= ~(RCC_DCKCFGR2_DSISEL_MASK);
regval |= (RCC_DCKCFGR2_DSISEL_PHY);
putreg32(regval, STM32_RCC_DCKCFGR2);
}
/****************************************************************************
* Name: stm32f7x9_rcc_dsisrcpllr
*
* Description:
* Set DSI clock source to PLLR
*
****************************************************************************/
void stm32f7x9_rcc_dsisrcpllr(void)
{
uint32_t regval;
regval = getreg32(STM32_RCC_DCKCFGR2);
regval &= ~RCC_DCKCFGR2_DSISEL_MASK;
regval |= RCC_DCKCFGR2_DSISEL_SYSCLK;
putreg32(regval, STM32_RCC_DCKCFGR2);
}