stm32h7: Don't automatically select HSI48 as it may depend on USBSEL.

Add preprocessor logic that can catch the condition where the board is selecting the HSI48 as the USBSEL source, but the HSI48 isn't enabled.
This commit is contained in:
Anthony Merlino 2021-04-12 15:33:55 -04:00 committed by David Sidrane
parent 4c8d70dd2e
commit b1f637a6ea
2 changed files with 4 additions and 4 deletions

View File

@ -501,14 +501,12 @@ config STM32H7_OTGFS
bool "OTG FS"
default n
select USBHOST_HAVE_ASYNCH if USBHOST
select STM32H7_HSI48
config STM32H7_OTGHS
bool "OTG HS"
default n
depends on EXPERIMENTAL
select USBHOST_HAVE_ASYNCH if USBHOST
select STM32H7_HSI48
config STM32H7_OTG_SOFOUTPUT
bool "OTG SOF output"

View File

@ -52,8 +52,10 @@
#if defined(CONFIG_USBDEV) && (defined(CONFIG_STM32H7_OTGFS) || \
defined(CONFIG_STM32H7_OTGHS))
#ifdef CONFIG_STM32H7_OTGHS
# warning OTG HS not tested for STM32H7 !
#if (STM32_RCC_D2CCIP2R_USBSRC == RCC_D2CCIP2R_USBSEL_HSI48) && \
!defined(CONFIG_STM32H7_HSI48)
# error board.h selected HSI48 as USB clock source, but HSI48 is not \
enabled. Enable STM32H7_HSI48
#endif
/****************************************************************************