diff --git a/drivers/usb/uhc/uhc_mcux_ehci.c b/drivers/usb/uhc/uhc_mcux_ehci.c index 90ba04b6f6f..6f3e87f250c 100644 --- a/drivers/usb/uhc/uhc_mcux_ehci.c +++ b/drivers/usb/uhc/uhc_mcux_ehci.c @@ -92,8 +92,7 @@ static usb_status_t mcux_host_callback(usb_device_handle deviceHandle, static int uhc_mcux_init(const struct device *dev) { - const struct uhc_mcux_config *config = dev->config; - usb_phy_config_struct_t *phy_config; + const struct uhc_mcux_ehci_config *config = dev->config; struct uhc_mcux_data *priv = uhc_get_private(dev); k_thread_entry_t thread_entry = NULL; usb_status_t status; @@ -108,9 +107,8 @@ static int uhc_mcux_init(const struct device *dev) } #ifdef CONFIG_DT_HAS_NXP_USBPHY_ENABLED - phy_config = ((const struct uhc_mcux_ehci_config *)dev->config)->phy_config; - if (phy_config != NULL) { - USB_EhciPhyInit(priv->controller_id, 0u, phy_config); + if (config->phy_config != NULL) { + USB_EhciPhyInit(priv->controller_id, 0u, config->phy_config); } #endif @@ -124,8 +122,9 @@ static int uhc_mcux_init(const struct device *dev) } /* Create MCUX USB host driver task */ - k_thread_create(&priv->drv_stack_data, config->drv_stack, CONFIG_UHC_NXP_THREAD_STACK_SIZE, - thread_entry, (void *)dev, NULL, NULL, K_PRIO_COOP(2), 0, K_NO_WAIT); + k_thread_create(&priv->drv_stack_data, config->uhc_config.drv_stack, + CONFIG_UHC_NXP_THREAD_STACK_SIZE, thread_entry, + (void *)dev, NULL, NULL, K_PRIO_COOP(2), 0, K_NO_WAIT); k_thread_name_set(&priv->drv_stack_data, "uhc_mcux_ehci"); return 0; diff --git a/drivers/usb/uhc/uhc_mcux_ip3516hs.c b/drivers/usb/uhc/uhc_mcux_ip3516hs.c index ac9f36c83a9..03bddb11059 100644 --- a/drivers/usb/uhc/uhc_mcux_ip3516hs.c +++ b/drivers/usb/uhc/uhc_mcux_ip3516hs.c @@ -67,8 +67,7 @@ static usb_status_t mcux_host_callback(usb_device_handle deviceHandle, static int uhc_mcux_init(const struct device *dev) { - const struct uhc_mcux_config *config = dev->config; - usb_phy_config_struct_t *phy_config; + const struct uhc_mcux_ip3516hs_config *config = dev->config; struct uhc_mcux_data *priv = uhc_get_private(dev); k_thread_entry_t thread_entry = NULL; usb_status_t status; @@ -83,9 +82,8 @@ static int uhc_mcux_init(const struct device *dev) } #ifdef CONFIG_DT_HAS_NXP_USBPHY_ENABLED - phy_config = ((const struct uhc_mcux_ip3516hs_config *)dev->config)->phy_config; - if (phy_config != NULL) { - USB_EhciPhyInit(priv->controller_id, 0u, phy_config); + if (config->phy_config != NULL) { + USB_EhciPhyInit(priv->controller_id, 0u, config->phy_config); } #endif @@ -99,8 +97,9 @@ static int uhc_mcux_init(const struct device *dev) } /* Create MCUX USB host driver task */ - k_thread_create(&priv->drv_stack_data, config->drv_stack, CONFIG_UHC_NXP_THREAD_STACK_SIZE, - thread_entry, (void *)dev, NULL, NULL, K_PRIO_COOP(2), 0, K_NO_WAIT); + k_thread_create(&priv->drv_stack_data, config->uhc_config.drv_stack, + CONFIG_UHC_NXP_THREAD_STACK_SIZE, thread_entry, + (void *)dev, NULL, NULL, K_PRIO_COOP(2), 0, K_NO_WAIT); k_thread_name_set(&priv->drv_stack_data, "uhc_mcux_ip3516hs"); return 0;