20
20
#include "usb_device_config.h"
21
21
#include "usb_device_mcux_drv_port.h"
22
22
#include "usb_device_lpcip3511.h"
23
- #ifdef CONFIG_DT_HAS_NXP_USBPHY_ENABLED
24
23
#include "usb_phy.h"
25
- #endif
26
24
27
25
#include <zephyr/logging/log.h>
28
26
LOG_MODULE_REGISTER (udc_mcux , CONFIG_UDC_DRIVER_LOG_LEVEL );
@@ -45,9 +43,7 @@ struct udc_mcux_config {
45
43
struct udc_ep_config * ep_cfg_out ;
46
44
uintptr_t base ;
47
45
const struct pinctrl_dev_config * pincfg ;
48
- #ifdef CONFIG_DT_HAS_NXP_USBPHY_ENABLED
49
46
usb_phy_config_struct_t * phy_config ;
50
- #endif
51
47
};
52
48
53
49
struct udc_mcux_data {
@@ -817,7 +813,6 @@ static const usb_device_controller_interface_struct_t udc_mcux_if = {
817
813
USB_DeviceLpc3511IpRecv , USB_DeviceLpc3511IpCancel , USB_DeviceLpc3511IpControl
818
814
};
819
815
820
- #ifdef CONFIG_DT_HAS_NXP_USBPHY_ENABLED
821
816
#define UDC_MCUX_PHY_DEFINE (n ) \
822
817
static usb_phy_config_struct_t phy_config_##n = { \
823
818
.D_CAL = DT_PROP_OR(DT_INST_PHANDLE(n, phy_handle), tx_d_cal, 0), \
@@ -830,12 +825,8 @@ static usb_phy_config_struct_t phy_config_##n = { \
830
825
(UDC_MCUX_PHY_DEFINE(n)), ())
831
826
832
827
#define UDC_MCUX_PHY_CFG_PTR_OR_NULL (n ) \
833
- .phy_config = COND_CODE_1(DT_NODE_HAS_PROP(DT_DRV_INST(n), phy_handle), \
828
+ COND_CODE_1(DT_NODE_HAS_PROP(DT_DRV_INST(n), phy_handle), \
834
829
(&phy_config_##n), (NULL))
835
- #else
836
- #define UDC_MCUX_PHY_DEFINE_OR (n )
837
- #define UDC_MCUX_PHY_CFG_PTR_OR_NULL (n )
838
- #endif
839
830
840
831
#define USB_MCUX_IP3511_DEVICE_DEFINE (n ) \
841
832
UDC_MCUX_PHY_DEFINE_OR(n); \
@@ -871,7 +862,7 @@ static usb_phy_config_struct_t phy_config_##n = { \
871
862
.ep_cfg_out = ep_cfg_out##n, \
872
863
.mcux_if = &udc_mcux_if, \
873
864
.pincfg = PINCTRL_DT_INST_DEV_CONFIG_GET(n), \
874
- UDC_MCUX_PHY_CFG_PTR_OR_NULL(n), \
865
+ .phy_config = UDC_MCUX_PHY_CFG_PTR_OR_NULL(n), \
875
866
}; \
876
867
\
877
868
static struct udc_mcux_data priv_data_##n = { \
0 commit comments