mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-25 23:06:15 +00:00

Add driver model support by using the uclass UCLASS_USB_GADGET_GENERIC. Disable local usb_gadget_register_driver()/usb_gadget_unregister_driver() implementation which is implemented in udc-core.c when DM_USB_GADGET is enabled. Replace dm_usb_gadget_handle_interrupts() with handle_interrupts ops when DM_USB_GADGET is enabled. Disable legacy struct usba_udc controller as controller point is extracted from udevice private data with DM. Disable legacy usba_udc_probe() to avoid conflict with DM when it's enabled. Compared to Linux driver only supported devices' DT bindings are included (sorted as Linux driver) Signed-off-by: Zixun LI <admin@hifiphile.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/20240725153204.358925-8-admin@hifiphile.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
27 lines
555 B
C
27 lines
555 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Platform data definitions for Atmel USBA gadget driver
|
|
* [Original from Linux kernel: include/linux/usb/atmel_usba_udc.h]
|
|
*/
|
|
#ifndef __LINUX_USB_USBA_H__
|
|
#define __LINUX_USB_USBA_H__
|
|
|
|
struct usba_ep_data {
|
|
char *name;
|
|
int index;
|
|
int fifo_size;
|
|
int nr_banks;
|
|
int can_dma;
|
|
int can_isoc;
|
|
};
|
|
|
|
struct usba_platform_data {
|
|
int num_ep;
|
|
struct usba_ep_data *ep;
|
|
};
|
|
|
|
#if !CONFIG_IS_ENABLED(DM_USB_GADGET)
|
|
extern int usba_udc_probe(struct usba_platform_data *pdata);
|
|
#endif
|
|
|
|
#endif /* __LINUX_USB_USBA_H */
|