Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "usb: cdns3: Add USBSSP platform driver support"

This reverts commit 6076388ca1eda808b95f9479f3b04839d348a2f7.

There were some build issues as reported by Arnd, so revert this for
now.

Cc: Peter Chen <peter.chen@cixtech.com>
Cc: Pawel Laszczak <pawell@cadence.com>
Reported-by: Arnd Bergmann <arnd@kernel.org>
Link: https://lore.kernel.org/r/ac+LEWMCQpLSnfoD@nchen-desktop
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+175 -161
+22 -28
drivers/usb/cdns3/Kconfig
··· 20 20 Say Y here if your system has a Cadence USB3 dual-role controller. 21 21 It supports: dual-role switch, Host-only, and Peripheral-only. 22 22 23 + If you choose to build this driver is a dynamically linked 24 + as module, the module will be called cdns3.ko. 25 + endif 26 + 23 27 if USB_CDNS3 24 28 25 29 config USB_CDNS3_GADGET ··· 89 85 90 86 If you choose to build this driver as module it will 91 87 be dynamically linked and module will be called cdns3-starfive.ko 88 + endif 92 89 93 - endif # USB_CDNS3 90 + if USB_CDNS_SUPPORT 94 91 95 - config USB_CDNSP 96 - tristate "Cadence USBSSP Dual-Role Controller" 97 - depends on USB_CDNS_SUPPORT 92 + config USB_CDNSP_PCI 93 + tristate "Cadence CDNSP Dual-Role Controller" 94 + depends on USB_CDNS_SUPPORT && USB_PCI && ACPI 98 95 help 99 - Say Y here if your system has a Cadence USBSSP dual-role controller. 100 - It supports: dual-role switch, Host-only, and Peripheral-only. 101 - Cadence CDNSP Controller device mode is very similar to XHCI controller. 102 - Therefore some algorithms used has been taken from xHCI driver. 103 - Host controller is compliant with XHCI so it uses standard XHCI driver. 96 + Say Y here if your system has a Cadence CDNSP dual-role controller. 97 + It supports: dual-role switch Host-only, and Peripheral-only. 104 98 105 - if USB_CDNSP 99 + If you choose to build this driver is a dynamically linked 100 + module, the module will be called cdnsp.ko. 101 + endif 102 + 103 + if USB_CDNSP_PCI 106 104 107 105 config USB_CDNSP_GADGET 108 - bool "Cadence USBSSP device controller" 109 - depends on USB_GADGET=y || USB_GADGET=USB_CDNSP 106 + bool "Cadence CDNSP device controller" 107 + depends on USB_GADGET=y || USB_GADGET=USB_CDNSP_PCI 110 108 help 111 109 Say Y here to enable device controller functionality of the 112 - Cadence USBSSP-DEV driver. 110 + Cadence CDNSP-DEV driver. 113 111 114 112 Cadence CDNSP Device Controller in device mode is 115 113 very similar to XHCI controller. Therefore some algorithms ··· 120 114 It doesn't support LS. 121 115 122 116 config USB_CDNSP_HOST 123 - bool "Cadence USBSSP host controller" 124 - depends on USB=y || USB=USB_CDNSP 117 + bool "Cadence CDNSP host controller" 118 + depends on USB=y || USB=USB_CDNSP_PCI 125 119 select USB_CDNS_HOST 126 120 help 127 121 Say Y here to enable host controller functionality of the ··· 130 124 Host controller is compliant with XHCI so it uses 131 125 standard XHCI driver. 132 126 133 - config USB_CDNSP_PCI 134 - tristate "Cadence USBSSP support on PCIe-based platforms" 135 - depends on USB_PCI && ACPI 136 - help 137 - If you're using the USBSSP Core IP with a PCIe, please say 138 - 'Y' or 'M' here. 139 - 140 - If you choose to build this driver as module it will 141 - be dynamically linked and module will be called cdnsp-pci.ko 142 - 143 - endif # USB_CDNSP 144 - 145 - endif # USB_CDNS_SUPPORT 127 + endif
+20 -12
drivers/usb/cdns3/Makefile
··· 4 4 CFLAGS_cdnsp-trace.o := -I$(src) 5 5 6 6 cdns-usb-common-y := core.o drd.o 7 + cdns3-y := cdns3-plat.o 7 8 8 9 ifeq ($(CONFIG_USB),m) 9 10 obj-m += cdns-usb-common.o 10 - obj-m += cdns3-plat.o 11 + obj-m += cdns3.o 11 12 else 12 13 obj-$(CONFIG_USB_CDNS_SUPPORT) += cdns-usb-common.o 13 - obj-$(CONFIG_USB_CDNS_SUPPORT) += cdns3-plat.o 14 + obj-$(CONFIG_USB_CDNS3) += cdns3.o 14 15 endif 15 16 16 17 cdns-usb-common-$(CONFIG_USB_CDNS_HOST) += host.o 18 + cdns3-$(CONFIG_USB_CDNS3_GADGET) += cdns3-gadget.o cdns3-ep0.o 17 19 18 - # For CDNS3 gadget 19 20 ifneq ($(CONFIG_USB_CDNS3_GADGET),) 20 - cdns3-y := cdns3-gadget.o cdns3-ep0.o 21 21 cdns3-$(CONFIG_TRACING) += cdns3-trace.o 22 - obj-$(CONFIG_USB_CDNS3) += cdns3.o 23 22 endif 23 + 24 24 obj-$(CONFIG_USB_CDNS3_PCI_WRAP) += cdns3-pci-wrap.o 25 25 obj-$(CONFIG_USB_CDNS3_TI) += cdns3-ti.o 26 26 obj-$(CONFIG_USB_CDNS3_IMX) += cdns3-imx.o 27 27 obj-$(CONFIG_USB_CDNS3_STARFIVE) += cdns3-starfive.o 28 28 29 - # For CDNSP gadget 30 - ifneq ($(CONFIG_USB_CDNSP_GADGET),) 31 - cdnsp-y := cdnsp-ring.o cdnsp-gadget.o \ 32 - cdnsp-mem.o cdnsp-ep0.o 33 - cdnsp-$(CONFIG_TRACING) += cdnsp-trace.o 34 - obj-$(CONFIG_USB_CDNSP) += cdnsp.o 29 + cdnsp-udc-pci-y := cdnsp-pci.o 30 + 31 + ifdef CONFIG_USB_CDNSP_PCI 32 + ifeq ($(CONFIG_USB),m) 33 + obj-m += cdnsp-udc-pci.o 34 + else 35 + obj-$(CONFIG_USB_CDNSP_PCI) += cdnsp-udc-pci.o 35 36 endif 36 - obj-$(CONFIG_USB_CDNSP_PCI) += cdnsp-pci.o 37 + endif 38 + 39 + cdnsp-udc-pci-$(CONFIG_USB_CDNSP_GADGET) += cdnsp-ring.o cdnsp-gadget.o \ 40 + cdnsp-mem.o cdnsp-ep0.o 41 + 42 + ifneq ($(CONFIG_USB_CDNSP_GADGET),) 43 + cdnsp-udc-pci-$(CONFIG_TRACING) += cdnsp-trace.o 44 + endif
-4
drivers/usb/cdns3/cdns3-gadget.c
··· 3508 3508 3509 3509 return 0; 3510 3510 } 3511 - EXPORT_SYMBOL_GPL(cdns3_gadget_init); 3512 - 3513 - MODULE_LICENSE("GPL"); 3514 - MODULE_DESCRIPTION("Cadence USBSS DRD Driver - gadget");
+2 -15
drivers/usb/cdns3/cdns3-plat.c
··· 44 44 phy_power_off(cdns->usb2_phy); 45 45 } 46 46 47 - static int cdns3_plat_gadget_init(struct cdns *cdns) 48 - { 49 - if (cdns->version < CDNSP_CONTROLLER_V2) 50 - return cdns3_gadget_init(cdns); 51 - else 52 - return cdnsp_gadget_init(cdns); 53 - } 54 - 55 47 /** 56 48 * cdns3_plat_probe - probe for cdns3 core device 57 49 * @pdev: Pointer to cdns3 core platform device ··· 64 72 65 73 cdns->dev = dev; 66 74 cdns->pdata = dev_get_platdata(dev); 67 - if (cdns->pdata && cdns->pdata->override_apb_timeout) 68 - cdns->override_apb_timeout = cdns->pdata->override_apb_timeout; 69 75 70 76 platform_set_drvdata(pdev, cdns); 71 77 ··· 143 153 if (ret) 144 154 goto err_phy_power_on; 145 155 146 - ret = cdns_init(cdns); 147 - if (ret) 148 - goto err_cdns_init; 156 + cdns->gadget_init = cdns3_gadget_init; 149 157 150 - cdns->gadget_init = cdns3_plat_gadget_init; 151 - ret = cdns_core_init_role(cdns); 158 + ret = cdns_init(cdns); 152 159 if (ret) 153 160 goto err_cdns_init; 154 161
-4
drivers/usb/cdns3/cdnsp-gadget.c
··· 2075 2075 2076 2076 return 0; 2077 2077 } 2078 - EXPORT_SYMBOL_GPL(cdnsp_gadget_init); 2079 - 2080 - MODULE_LICENSE("GPL"); 2081 - MODULE_DESCRIPTION("Cadence CDNSP DRD Driver - gadget");
+120 -89
drivers/usb/cdns3/cdnsp-pci.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 /* 3 - * Cadence USBSSP PCI Glue driver. 3 + * Cadence PCI Glue driver. 4 4 * 5 5 * Copyright (C) 2019 Cadence. 6 6 * ··· 16 16 #include <linux/pci.h> 17 17 18 18 #include "core.h" 19 - 20 - struct cdnsp_wrap { 21 - struct platform_device *plat_dev; 22 - struct resource dev_res[6]; 23 - int devfn; 24 - }; 25 - 26 - #define RES_IRQ_HOST_ID 0 27 - #define RES_IRQ_PERIPHERAL_ID 1 28 - #define RES_IRQ_OTG_ID 2 29 - #define RES_HOST_ID 3 30 - #define RES_DEV_ID 4 31 - #define RES_DRD_ID 5 19 + #include "gadget-export.h" 32 20 33 21 #define PCI_BAR_HOST 0 34 22 #define PCI_BAR_OTG 0 ··· 26 38 #define PCI_DEV_FN_OTG 1 27 39 28 40 #define PCI_DRIVER_NAME "cdns-pci-usbssp" 29 - #define PLAT_DRIVER_NAME "cdns-usb3" 41 + #define PLAT_DRIVER_NAME "cdns-usbssp" 30 42 31 - #define CHICKEN_APB_TIMEOUT_VALUE 0x1C20 43 + #define CHICKEN_APB_TIMEOUT_VALUE 0x1C20 32 44 33 45 static struct pci_dev *cdnsp_get_second_fun(struct pci_dev *pdev) 34 46 { 35 47 /* 36 48 * Gets the second function. 37 - * Platform has two function. The first keeps resources for 38 - * Host/Device while the second keeps resources for DRD/OTG. 49 + * Platform has two function. The fist keeps resources for 50 + * Host/Device while the secon keeps resources for DRD/OTG. 39 51 */ 40 52 if (pdev->device == PCI_DEVICE_ID_CDNS_USBSSP) 41 53 return pci_get_device(pdev->vendor, PCI_DEVICE_ID_CDNS_USBSS, NULL); ··· 48 60 static int cdnsp_pci_probe(struct pci_dev *pdev, 49 61 const struct pci_device_id *id) 50 62 { 51 - struct platform_device_info plat_info; 52 - static struct cdns3_platform_data pdata; 53 - struct cdnsp_wrap *wrap; 54 - struct resource *res; 63 + struct device *dev = &pdev->dev; 55 64 struct pci_dev *func; 56 - int ret = 0; 65 + struct resource *res; 66 + struct cdns *cdnsp; 67 + int ret; 57 68 58 69 /* 59 70 * For GADGET/HOST PCI (devfn) function number is 0, ··· 79 92 } 80 93 81 94 pci_set_master(pdev); 82 - 83 95 if (pci_is_enabled(func)) { 84 - wrap = pci_get_drvdata(func); 96 + cdnsp = pci_get_drvdata(func); 85 97 } else { 86 - wrap = kzalloc_obj(*wrap); 87 - if (!wrap) { 98 + cdnsp = kzalloc_obj(*cdnsp); 99 + if (!cdnsp) { 88 100 ret = -ENOMEM; 89 101 goto put_pci; 90 102 } 91 103 } 92 104 93 - res = wrap->dev_res; 105 + /* For GADGET device function number is 0. */ 106 + if (pdev->devfn == 0) { 107 + resource_size_t rsrc_start, rsrc_len; 94 108 95 - if (pdev->devfn == PCI_DEV_FN_HOST_DEVICE) { 96 - /* Function 0: host(BAR_0) + device(BAR_2). */ 97 - dev_dbg(&pdev->dev, "Initialize Device resources\n"); 98 - res[RES_DEV_ID].start = pci_resource_start(pdev, PCI_BAR_DEV); 99 - res[RES_DEV_ID].end = pci_resource_end(pdev, PCI_BAR_DEV); 100 - res[RES_DEV_ID].name = "dev"; 101 - res[RES_DEV_ID].flags = IORESOURCE_MEM; 102 - dev_dbg(&pdev->dev, "USBSSP-DEV physical base addr: %pa\n", 103 - &res[RES_DEV_ID].start); 109 + /* Function 0: host(BAR_0) + device(BAR_1).*/ 110 + dev_dbg(dev, "Initialize resources\n"); 111 + rsrc_start = pci_resource_start(pdev, PCI_BAR_DEV); 112 + rsrc_len = pci_resource_len(pdev, PCI_BAR_DEV); 113 + res = devm_request_mem_region(dev, rsrc_start, rsrc_len, "dev"); 114 + if (!res) { 115 + dev_dbg(dev, "controller already in use\n"); 116 + ret = -EBUSY; 117 + goto free_cdnsp; 118 + } 104 119 105 - res[RES_HOST_ID].start = pci_resource_start(pdev, PCI_BAR_HOST); 106 - res[RES_HOST_ID].end = pci_resource_end(pdev, PCI_BAR_HOST); 107 - res[RES_HOST_ID].name = "xhci"; 108 - res[RES_HOST_ID].flags = IORESOURCE_MEM; 109 - dev_dbg(&pdev->dev, "USBSSP-XHCI physical base addr: %pa\n", 110 - &res[RES_HOST_ID].start); 120 + cdnsp->dev_regs = devm_ioremap(dev, rsrc_start, rsrc_len); 121 + if (!cdnsp->dev_regs) { 122 + dev_dbg(dev, "error mapping memory\n"); 123 + ret = -EFAULT; 124 + goto free_cdnsp; 125 + } 111 126 112 - /* Interrupt for XHCI */ 113 - wrap->dev_res[RES_IRQ_HOST_ID].start = pdev->irq; 114 - wrap->dev_res[RES_IRQ_HOST_ID].name = "host"; 115 - wrap->dev_res[RES_IRQ_HOST_ID].flags = IORESOURCE_IRQ; 127 + cdnsp->dev_irq = pdev->irq; 128 + dev_dbg(dev, "USBSS-DEV physical base addr: %pa\n", 129 + &rsrc_start); 116 130 117 - /* Interrupt for device. It's the same as for HOST. */ 118 - wrap->dev_res[RES_IRQ_PERIPHERAL_ID].start = pdev->irq; 119 - wrap->dev_res[RES_IRQ_PERIPHERAL_ID].name = "peripheral"; 120 - wrap->dev_res[RES_IRQ_PERIPHERAL_ID].flags = IORESOURCE_IRQ; 131 + res = &cdnsp->xhci_res[0]; 132 + res->start = pci_resource_start(pdev, PCI_BAR_HOST); 133 + res->end = pci_resource_end(pdev, PCI_BAR_HOST); 134 + res->name = "xhci"; 135 + res->flags = IORESOURCE_MEM; 136 + dev_dbg(dev, "USBSS-XHCI physical base addr: %pa\n", 137 + &res->start); 138 + 139 + /* Interrupt for XHCI, */ 140 + res = &cdnsp->xhci_res[1]; 141 + res->start = pdev->irq; 142 + res->name = "host"; 143 + res->flags = IORESOURCE_IRQ; 121 144 } else { 122 - res[RES_DRD_ID].start = pci_resource_start(pdev, PCI_BAR_OTG); 123 - res[RES_DRD_ID].end = pci_resource_end(pdev, PCI_BAR_OTG); 124 - res[RES_DRD_ID].name = "otg"; 125 - res[RES_DRD_ID].flags = IORESOURCE_MEM; 126 - dev_dbg(&pdev->dev, "CDNSP-DRD physical base addr: %pa\n", 127 - &res[RES_DRD_ID].start); 145 + res = &cdnsp->otg_res; 146 + res->start = pci_resource_start(pdev, PCI_BAR_OTG); 147 + res->end = pci_resource_end(pdev, PCI_BAR_OTG); 148 + res->name = "otg"; 149 + res->flags = IORESOURCE_MEM; 150 + dev_dbg(dev, "CDNSP-DRD physical base addr: %pa\n", 151 + &res->start); 128 152 129 153 /* Interrupt for OTG/DRD. */ 130 - wrap->dev_res[RES_IRQ_OTG_ID].start = pdev->irq; 131 - wrap->dev_res[RES_IRQ_OTG_ID].name = "otg"; 132 - wrap->dev_res[RES_IRQ_OTG_ID].flags = IORESOURCE_IRQ; 154 + cdnsp->otg_irq = pdev->irq; 133 155 } 156 + 157 + /* 158 + * Cadence PCI based platform require some longer timeout for APB 159 + * to fixes domain clock synchronization issue after resuming 160 + * controller from L1 state. 161 + */ 162 + cdnsp->override_apb_timeout = CHICKEN_APB_TIMEOUT_VALUE; 163 + pci_set_drvdata(pdev, cdnsp); 134 164 135 165 if (pci_is_enabled(func)) { 136 - /* set up platform device info */ 137 - pdata.override_apb_timeout = CHICKEN_APB_TIMEOUT_VALUE; 138 - memset(&plat_info, 0, sizeof(plat_info)); 139 - plat_info.parent = &pdev->dev; 140 - plat_info.fwnode = pdev->dev.fwnode; 141 - plat_info.name = PLAT_DRIVER_NAME; 142 - plat_info.id = pdev->devfn; 143 - plat_info.res = wrap->dev_res; 144 - plat_info.num_res = ARRAY_SIZE(wrap->dev_res); 145 - plat_info.dma_mask = pdev->dma_mask; 146 - plat_info.data = &pdata; 147 - plat_info.size_data = sizeof(pdata); 148 - wrap->devfn = pdev->devfn; 149 - /* register platform device */ 150 - wrap->plat_dev = platform_device_register_full(&plat_info); 151 - if (IS_ERR(wrap->plat_dev)) { 152 - ret = PTR_ERR(wrap->plat_dev); 153 - kfree(wrap); 154 - goto put_pci; 155 - } 166 + cdnsp->dev = dev; 167 + cdnsp->gadget_init = cdnsp_gadget_init; 168 + 169 + ret = cdns_init(cdnsp); 170 + if (ret) 171 + goto free_cdnsp; 156 172 } 157 173 158 - pci_set_drvdata(pdev, wrap); 174 + device_wakeup_enable(&pdev->dev); 175 + if (pci_dev_run_wake(pdev)) 176 + pm_runtime_put_noidle(&pdev->dev); 177 + 178 + return 0; 179 + 180 + free_cdnsp: 181 + if (!pci_is_enabled(func)) 182 + kfree(cdnsp); 183 + 159 184 put_pci: 160 185 pci_dev_put(func); 186 + 161 187 return ret; 162 188 } 163 189 164 190 static void cdnsp_pci_remove(struct pci_dev *pdev) 165 191 { 166 - struct cdnsp_wrap *wrap; 192 + struct cdns *cdnsp; 167 193 struct pci_dev *func; 168 194 169 195 func = cdnsp_get_second_fun(pdev); 170 - wrap = pci_get_drvdata(pdev); 196 + cdnsp = (struct cdns *)pci_get_drvdata(pdev); 171 197 172 - if (wrap->devfn == pdev->devfn) 173 - platform_device_unregister(wrap->plat_dev); 198 + if (pci_dev_run_wake(pdev)) 199 + pm_runtime_get_noresume(&pdev->dev); 174 200 175 - if (!pci_is_enabled(func)) 176 - kfree(wrap); 201 + if (pci_is_enabled(func)) { 202 + cdns_remove(cdnsp); 203 + } else { 204 + kfree(cdnsp); 205 + } 177 206 178 207 pci_dev_put(func); 179 208 } 209 + 210 + static int __maybe_unused cdnsp_pci_suspend(struct device *dev) 211 + { 212 + struct cdns *cdns = dev_get_drvdata(dev); 213 + 214 + return cdns_suspend(cdns); 215 + } 216 + 217 + static int __maybe_unused cdnsp_pci_resume(struct device *dev) 218 + { 219 + struct cdns *cdns = dev_get_drvdata(dev); 220 + unsigned long flags; 221 + int ret; 222 + 223 + spin_lock_irqsave(&cdns->lock, flags); 224 + ret = cdns_resume(cdns); 225 + spin_unlock_irqrestore(&cdns->lock, flags); 226 + cdns_set_active(cdns, 1); 227 + 228 + return ret; 229 + } 230 + 231 + static const struct dev_pm_ops cdnsp_pci_pm_ops = { 232 + SET_SYSTEM_SLEEP_PM_OPS(cdnsp_pci_suspend, cdnsp_pci_resume) 233 + }; 180 234 181 235 static const struct pci_device_id cdnsp_pci_ids[] = { 182 236 { PCI_DEVICE(PCI_VENDOR_ID_CDNS, PCI_DEVICE_ID_CDNS_USBSSP), ··· 230 202 }; 231 203 232 204 static struct pci_driver cdnsp_pci_driver = { 233 - .name = PCI_DRIVER_NAME, 205 + .name = "cdnsp-pci", 234 206 .id_table = cdnsp_pci_ids, 235 207 .probe = cdnsp_pci_probe, 236 208 .remove = cdnsp_pci_remove, 209 + .driver = { 210 + .pm = &cdnsp_pci_pm_ops, 211 + } 237 212 }; 238 213 239 214 module_pci_driver(cdnsp_pci_driver); ··· 245 214 MODULE_ALIAS("pci:cdnsp"); 246 215 MODULE_AUTHOR("Pawel Laszczak <pawell@cadence.com>"); 247 216 MODULE_LICENSE("GPL v2"); 248 - MODULE_DESCRIPTION("Cadence CDNSP PCI wrapper"); 217 + MODULE_DESCRIPTION("Cadence CDNSP PCI driver");
+7 -4
drivers/usb/cdns3/core.c
··· 80 80 * 81 81 * Returns 0 on success otherwise negative errno 82 82 */ 83 - int cdns_core_init_role(struct cdns *cdns) 83 + static int cdns_core_init_role(struct cdns *cdns) 84 84 { 85 85 struct device *dev = cdns->dev; 86 86 enum usb_dr_mode best_dr_mode; ··· 197 197 goto err; 198 198 } 199 199 200 - dev_dbg(dev, "Cadence USB3 core: probe succeed\n"); 201 - 202 200 return 0; 203 201 err: 204 202 cdns_exit_roles(cdns); 205 203 return ret; 206 204 } 207 - EXPORT_SYMBOL_GPL(cdns_core_init_role); 208 205 209 206 /** 210 207 * cdns_hw_role_state_machine - role switch state machine based on hw events. ··· 469 472 if (ret) 470 473 goto init_failed; 471 474 475 + ret = cdns_core_init_role(cdns); 476 + if (ret) 477 + goto init_failed; 478 + 472 479 spin_lock_init(&cdns->lock); 480 + 481 + dev_dbg(dev, "Cadence USB3 core: probe succeed\n"); 473 482 474 483 return 0; 475 484 init_failed:
+2 -3
drivers/usb/cdns3/core.h
··· 45 45 unsigned long quirks; 46 46 #define CDNS3_DEFAULT_PM_RUNTIME_ALLOW BIT(0) 47 47 #define CDNS3_DRD_SUSPEND_RESIDENCY_ENABLE BIT(1) 48 - u32 override_apb_timeout; /* 0 = use default (e.g. for PCI) */ 49 48 }; 50 49 51 50 /** ··· 119 120 struct cdns3_platform_data *pdata; 120 121 spinlock_t lock; 121 122 struct xhci_plat_priv *xhci_plat_data; 122 - int (*gadget_init)(struct cdns *cdns); 123 123 u32 override_apb_timeout; 124 + 125 + int (*gadget_init)(struct cdns *cdns); 124 126 }; 125 127 126 128 int cdns_hw_role_switch(struct cdns *cdns); 127 129 int cdns_init(struct cdns *cdns); 128 130 int cdns_remove(struct cdns *cdns); 129 - int cdns_core_init_role(struct cdns *cdns); 130 131 131 132 #ifdef CONFIG_PM_SLEEP 132 133 int cdns_resume(struct cdns *cdns);
+2 -2
drivers/usb/cdns3/gadget-export.h
··· 10 10 #ifndef __LINUX_CDNS3_GADGET_EXPORT 11 11 #define __LINUX_CDNS3_GADGET_EXPORT 12 12 13 - #if defined(CONFIG_USB_CDNSP_GADGET) && IS_REACHABLE(CONFIG_USB_CDNSP) 13 + #if IS_ENABLED(CONFIG_USB_CDNSP_GADGET) 14 14 15 15 int cdnsp_gadget_init(struct cdns *cdns); 16 16 #else ··· 22 22 23 23 #endif /* CONFIG_USB_CDNSP_GADGET */ 24 24 25 - #if defined(CONFIG_USB_CDNS3_GADGET) && IS_REACHABLE(CONFIG_USB_CDNS3) 25 + #if IS_ENABLED(CONFIG_USB_CDNS3_GADGET) 26 26 27 27 int cdns3_gadget_init(struct cdns *cdns); 28 28 #else