Some of the last review chnages were still in the editor

This commit is contained in:
Gregory Nutt
2015-08-21 18:25:10 -06:00
parent 9a32e907df
commit 4c0d36740d
+8 -14
View File
@@ -5170,10 +5170,8 @@ static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv)
/* Deactivate the power down */
#if defined(NOT_CONFIG_STM32_STM32F446)
/* In the case of the STM32F446 the meaning
* of the bit has changed to VBUS Detection Enable
* when set
/* In the case of the STM32F446 the meaning of the bit has changed to VBUS
* Detection Enable when set
*/
regval = OTGFS_GCCFG_PWRDWN;
@@ -5181,10 +5179,10 @@ static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv)
# ifdef CONFIG_USBDEV_VBUSSENSING
regval |= OTGFS_GCCFG_VBDEN;
# endif
#else
/* In the case of the the all others the meaning
* of the bit is No VBUS Sense when Set
#else
/* In the case of the the all others the meaning of the bit is No VBUS
* Sense when Set
*/
regval = (OTGFS_GCCFG_PWRDWN | OTGFS_GCCFG_VBUSASEN | OTGFS_GCCFG_VBUSBSEN);
@@ -5198,17 +5196,13 @@ static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv)
stm32_putreg(regval, STM32_OTGFS_GCCFG);
up_mdelay(20);
/*
* For the new otg controller in the F446 when
* VBUS sensing is not used we need to force the
* B session valid
*
/* For the new OTG controller in the F446 when VBUS sensing is not used we
* need to force the B session valid
*/
#if defined(NOT_CONFIG_STM32_STM32F446)
# ifndef CONFIG_USBDEV_VBUSSENSING
regval = stm32_getreg(STM32_OTGFS_GOTGCTL);
regval = stm32_getreg(STM32_OTGFS_GOTGCTL);
regval |= (OTGFS_GOTGCTL_BVALOEN | OTGFS_GOTGCTL_BVALOVAL);
stm32_putreg(regval, STM32_OTGFS_GOTGCTL);
# endif