usb: dwc_otg: enable clocks automatically.

ST usbfs-v1, v2, EFM32 USB, lm4f usb all automatically enable the clock
in their _init routine.  Do the same for the dwc_otg drivers to be
consistent.
This commit is contained in:
Karl Palsson 2016-10-04 20:42:33 +00:00 committed by Karl Palsson
parent 011b5c615a
commit 422d708384
2 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,7 @@ const struct _usbd_driver stm32f107_usb_driver = {
/** Initialize the USB device controller hardware of the STM32. */
static usbd_device *stm32f107_usbd_init(void)
{
rcc_periph_clock_enable(RCC_OTGFS);
OTG_FS_GINTSTS = OTG_GINTSTS_MMIS;
OTG_FS_GUSBCFG |= OTG_GUSBCFG_PHYSEL;

View File

@ -52,6 +52,7 @@ const struct _usbd_driver stm32f207_usb_driver = {
/** Initialize the USB device controller hardware of the STM32. */
static usbd_device *stm32f207_usbd_init(void)
{
rcc_periph_clock_enable(RCC_OTGHS);
OTG_HS_GINTSTS = OTG_GINTSTS_MMIS;
OTG_HS_GUSBCFG |= OTG_GUSBCFG_PHYSEL;