Remove non-functional vestiges of OTGHS in FS mode (including OTGFS2); try to convert the stm32f429i-disco configuration to use OTGHS instead of OTFHS in FS mode (OTGFS2). But I don't have the boards and can't test
This commit is contained in:
parent
c448888810
commit
868fa211bc
@ -1403,9 +1403,6 @@ config STM32_I2C
|
||||
config STM32_CAN
|
||||
bool
|
||||
|
||||
config STM32_OTGFS2
|
||||
bool
|
||||
|
||||
menu "Alternate Pin Mapping"
|
||||
|
||||
choice
|
||||
|
@ -400,12 +400,6 @@
|
||||
#define GPIO_OTGHSFS_DP (GPIO_ALT|GPIO_FLOAT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN15)
|
||||
#define GPIO_OTGHSFS_ID (GPIO_ALT|GPIO_PULLUP|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN12)
|
||||
|
||||
#ifdef CONFIG_STM32_OTGFS2
|
||||
# define GPIO_OTGFS2_DM (GPIO_ALT|GPIO_FLOAT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN14)
|
||||
# define GPIO_OTGFS2_DP (GPIO_ALT|GPIO_FLOAT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN15)
|
||||
# define GPIO_OTGFS2_ID (GPIO_ALT|GPIO_PULLUP|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN12)
|
||||
#endif
|
||||
|
||||
#define GPIO_OTGHS_DM (GPIO_ALT|GPIO_FLOAT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN14)
|
||||
#define GPIO_OTGHS_DP (GPIO_ALT|GPIO_FLOAT|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN15)
|
||||
#define GPIO_OTGHS_ID (GPIO_ALT|GPIO_PULLUP|GPIO_AF12|GPIO_SPEED_100MHz|GPIO_OPENDRAIN|GPIO_PORTB|GPIO_PIN12)
|
||||
|
@ -5132,10 +5132,6 @@ static void stm32_hwinitialize(FAR struct stm32_usbdev_s *priv)
|
||||
|
||||
stm32_putreg(OTGFS_GAHBCFG_TXFELVL, STM32_OTGFS_GAHBCFG);
|
||||
|
||||
/* For OTGFS2 mode (FS mode of the HS module), we must select the FS PHY
|
||||
* mode prior to issuing a soft reset.
|
||||
*/
|
||||
|
||||
/* Common USB OTG core initialization */
|
||||
/* Reset after a PHY select and set Host mode. First, wait for AHB master
|
||||
* IDLE state.
|
||||
|
@ -57,6 +57,7 @@ fi
|
||||
# the CodeSourcery toolchain in any other location
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
|
||||
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||
|
||||
# These are the Cygwin paths to the locations where I installed the Atollic
|
||||
# toolchain under windows. You will also have to edit this if you install
|
||||
|
@ -57,6 +57,7 @@ fi
|
||||
# the CodeSourcery toolchain in any other location
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
|
||||
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||
|
||||
# These are the Cygwin paths to the locations where I installed the Atollic
|
||||
# toolchain under windows. You will also have to edit this if you install
|
||||
|
@ -68,7 +68,7 @@ ifeq ($(CONFIG_STM32_FSMC),y)
|
||||
CSRCS += stm32_extmem.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_STM32_OTGFS2),y)
|
||||
ifeq ($(CONFIG_STM32_OTGFHS),y)
|
||||
CSRCS += stm32_usb.c
|
||||
endif
|
||||
|
||||
|
@ -88,7 +88,7 @@ void stm32_boardinitialize(void)
|
||||
* selected.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_STM32_OTGFS2
|
||||
#ifdef CONFIG_STM32_OTGHS
|
||||
if (stm32_usbinitialize)
|
||||
{
|
||||
stm32_usbinitialize();
|
||||
|
@ -68,7 +68,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_OTGFS2
|
||||
#ifdef CONFIG_STM32_OTGHS
|
||||
# include "stm32_usbhost.h"
|
||||
#endif
|
||||
|
||||
@ -87,7 +87,7 @@
|
||||
|
||||
/* Can't support USB host or device features if USB OTG HS is not enabled */
|
||||
|
||||
#ifndef CONFIG_STM32_OTGFS2
|
||||
#ifndef CONFIG_STM32_OTGHS
|
||||
# undef HAVE_USBDEV
|
||||
# undef HAVE_USBHOST
|
||||
# undef HAVE_USBMONITOR
|
||||
|
@ -55,7 +55,7 @@
|
||||
#include "stm32_otgfs.h"
|
||||
#include "stm32f429i-disco.h"
|
||||
|
||||
#ifdef CONFIG_STM32_OTGFS2
|
||||
#ifdef CONFIG_STM32_OTGHS
|
||||
|
||||
/************************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@ -64,7 +64,7 @@
|
||||
#if defined(CONFIG_USBDEV) || defined(CONFIG_USBHOST)
|
||||
# define HAVE_USB 1
|
||||
#else
|
||||
# warning "CONFIG_STM32_OTGFS2 is enabled but neither CONFIG_USBDEV nor CONFIG_USBHOST"
|
||||
# warning "CONFIG_STM32_OTGHS is enabled but neither CONFIG_USBDEV nor CONFIG_USBHOST"
|
||||
# undef HAVE_USB
|
||||
#endif
|
||||
|
||||
@ -148,7 +148,7 @@ void stm32_usbinitialize(void)
|
||||
|
||||
/* Configure the OTG HS VBUS sensing GPIO, Power On, and Overcurrent GPIOs */
|
||||
|
||||
#ifdef CONFIG_STM32_OTGFS2
|
||||
#ifdef CONFIG_STM32_OTGHS
|
||||
stm32_configgpio(GPIO_OTGHS_VBUS);
|
||||
stm32_configgpio(GPIO_OTGHS_PWRON);
|
||||
stm32_configgpio(GPIO_OTGHS_OVER);
|
||||
@ -288,5 +288,5 @@ void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_STM32_OTGFS2 */
|
||||
#endif /* CONFIG_STM32_OTGHS */
|
||||
|
||||
|
@ -149,7 +149,7 @@ void weak_function stm32_spiinitialize(void);
|
||||
*
|
||||
****************************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32_OTGFS2
|
||||
#ifdef CONFIG_STM32_OTGHS
|
||||
void weak_function stm32_usbinitialize(void);
|
||||
#endif
|
||||
|
||||
@ -162,7 +162,7 @@ void weak_function stm32_usbinitialize(void);
|
||||
*
|
||||
****************************************************************************************************/
|
||||
|
||||
#if defined(CONFIG_STM32_OTGFS2) && defined(CONFIG_USBHOST)
|
||||
#if defined(CONFIG_STM32_OTGHS) && defined(CONFIG_USBHOST)
|
||||
int stm32_usbhost_initialize(void);
|
||||
#endif
|
||||
|
||||
|
@ -262,7 +262,6 @@ CONFIG_STM32_FSMC=y
|
||||
# CONFIG_STM32_LTDC is not set
|
||||
# CONFIG_STM32_OTGFS is not set
|
||||
CONFIG_STM32_OTGHS=y
|
||||
CONFIG_STM32_OTGHS_FS_MODE=y
|
||||
CONFIG_STM32_PWR=y
|
||||
# CONFIG_STM32_RNG is not set
|
||||
# CONFIG_STM32_SDIO is not set
|
||||
@ -298,7 +297,6 @@ CONFIG_STM32_USART1=y
|
||||
# CONFIG_STM32_IWDG is not set
|
||||
# CONFIG_STM32_WWDG is not set
|
||||
CONFIG_STM32_SPI=y
|
||||
CONFIG_STM32_OTGFS2=y
|
||||
|
||||
#
|
||||
# Alternate Pin Mapping
|
||||
|
@ -57,6 +57,7 @@ fi
|
||||
# the CodeSourcery toolchain in any other location
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
|
||||
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||
|
||||
# These are the Cygwin paths to the locations where I installed the Atollic
|
||||
# toolchain under windows. You will also have to edit this if you install
|
||||
|
@ -259,7 +259,6 @@ CONFIG_STM32_FSMC=y
|
||||
# CONFIG_STM32_LTDC is not set
|
||||
# CONFIG_STM32_OTGFS is not set
|
||||
CONFIG_STM32_OTGHS=y
|
||||
CONFIG_STM32_OTGHS_FS_MODE=y
|
||||
CONFIG_STM32_PWR=y
|
||||
# CONFIG_STM32_RNG is not set
|
||||
# CONFIG_STM32_SDIO is not set
|
||||
@ -295,7 +294,6 @@ CONFIG_STM32_USART1=y
|
||||
# CONFIG_STM32_IWDG is not set
|
||||
# CONFIG_STM32_WWDG is not set
|
||||
CONFIG_STM32_SPI=y
|
||||
CONFIG_STM32_OTGFS2=y
|
||||
|
||||
#
|
||||
# Alternate Pin Mapping
|
||||
|
@ -57,6 +57,7 @@ fi
|
||||
# the CodeSourcery toolchain in any other location
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
|
||||
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||
|
||||
# These are the Cygwin paths to the locations where I installed the Atollic
|
||||
# toolchain under windows. You will also have to edit this if you install
|
||||
|
Loading…
Reference in New Issue
Block a user