drivers/usb: usb_dc_stm32: Convert to DT_INST

Convert usb_stm32 driver to use of DT_INST macros.

Since driver is compatible with 3 different dt compatibles and
compatible string is included in DT_INST macros, I've kept the
DT_USB_ compatible agnostic macros based on DT_INST ones, which
allowed to remove fixup definitions.
Use of DT_USB symbols is now limited to usb_dc_stm32.

Additionally, compatible "st,stm32-otgfs" is removed from list
of compatibles for usbotg_hs ips.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2020-03-04 14:15:11 +01:00 committed by Kumar Gala
commit 9367c6ad3f
14 changed files with 51 additions and 139 deletions

View file

@ -129,27 +129,6 @@
#define DT_FLASH_DEV_NAME DT_INST_0_ST_STM32L4_FLASH_CONTROLLER_LABEL
#if defined(DT_ST_STM32_USB_40006800_BASE_ADDRESS)
#define DT_USB_BASE_ADDRESS DT_ST_STM32_USB_40006800_BASE_ADDRESS
#define DT_USB_IRQ DT_ST_STM32_USB_40006800_IRQ_USB
#define DT_USB_IRQ_PRI DT_ST_STM32_USB_40006800_IRQ_USB_PRIORITY
#define DT_USB_NUM_BIDIR_ENDPOINTS DT_ST_STM32_USB_40006800_NUM_BIDIR_ENDPOINTS
#define DT_USB_RAM_SIZE DT_ST_STM32_USB_40006800_RAM_SIZE
#define DT_USB_CLOCK_BITS DT_ST_STM32_USB_40006800_CLOCK_BITS
#define DT_USB_CLOCK_BUS DT_ST_STM32_USB_40006800_CLOCK_BUS
#endif
#if defined(DT_ST_STM32_OTGFS_50000000_BASE_ADDRESS)
#define DT_USB_BASE_ADDRESS DT_ST_STM32_OTGFS_50000000_BASE_ADDRESS
#define DT_USB_IRQ DT_ST_STM32_OTGFS_50000000_IRQ_OTGFS
#define DT_USB_IRQ_PRI DT_ST_STM32_OTGFS_50000000_IRQ_OTGFS_PRIORITY
#define DT_USB_NUM_BIDIR_ENDPOINTS DT_ST_STM32_OTGFS_50000000_NUM_BIDIR_ENDPOINTS
#define DT_USB_RAM_SIZE DT_ST_STM32_OTGFS_50000000_RAM_SIZE
#define DT_USB_MAXIMUM_SPEED DT_ST_STM32_OTGFS_50000000_MAXIMUM_SPEED
#define DT_USB_CLOCK_BITS DT_ST_STM32_OTGFS_50000000_CLOCK_BITS
#define DT_USB_CLOCK_BUS DT_ST_STM32_OTGFS_50000000_CLOCK_BUS
#endif
#define DT_CAN_1_BASE_ADDRESS DT_ST_STM32_CAN_40006400_BASE_ADDRESS
#define DT_CAN_1_BUS_SPEED DT_ST_STM32_CAN_40006400_BUS_SPEED
#define DT_CAN_1_NAME DT_ST_STM32_CAN_40006400_LABEL