mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
Merge branch 'master' of git://git.denx.de/u-boot-usb
- DWC3 and UDC cleanup
This commit is contained in:
@@ -94,6 +94,7 @@ enum uclass_id {
|
||||
UCLASS_USB, /* USB bus */
|
||||
UCLASS_USB_DEV_GENERIC, /* USB generic device */
|
||||
UCLASS_USB_HUB, /* USB hub */
|
||||
UCLASS_USB_GADGET_GENERIC, /* USB generic device */
|
||||
UCLASS_VIDEO, /* Video or LCD device */
|
||||
UCLASS_VIDEO_BRIDGE, /* Video bridge, e.g. DisplayPort to LVDS */
|
||||
UCLASS_VIDEO_CONSOLE, /* Text console driver for video device */
|
||||
|
||||
@@ -38,4 +38,23 @@ struct dwc3_device {
|
||||
int dwc3_uboot_init(struct dwc3_device *dev);
|
||||
void dwc3_uboot_exit(int index);
|
||||
void dwc3_uboot_handle_interrupt(int index);
|
||||
|
||||
struct phy;
|
||||
#if CONFIG_IS_ENABLED(PHY) && CONFIG_IS_ENABLED(DM_USB)
|
||||
int dwc3_setup_phy(struct udevice *dev, struct phy **array, int *num_phys);
|
||||
int dwc3_shutdown_phy(struct udevice *dev, struct phy *usb_phys, int num_phys);
|
||||
#else
|
||||
static inline int dwc3_setup_phy(struct udevice *dev, struct phy **array,
|
||||
int *num_phys)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int dwc3_shutdown_phy(struct udevice *dev, struct phy *usb_phys,
|
||||
int num_phys)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DWC3_UBOOT_H_ */
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#define __LINUX_USB_GADGET_H
|
||||
|
||||
#include <errno.h>
|
||||
#include <usb.h>
|
||||
#include <linux/compat.h>
|
||||
#include <linux/list.h>
|
||||
|
||||
@@ -926,4 +927,21 @@ extern void usb_ep_autoconfig_reset(struct usb_gadget *);
|
||||
|
||||
extern int usb_gadget_handle_interrupts(int index);
|
||||
|
||||
#if CONFIG_IS_ENABLED(DM_USB_GADGET)
|
||||
int usb_gadget_initialize(int index);
|
||||
int usb_gadget_release(int index);
|
||||
int dm_usb_gadget_handle_interrupts(struct udevice *dev);
|
||||
#else
|
||||
#include <usb.h>
|
||||
static inline int usb_gadget_initialize(int index)
|
||||
{
|
||||
return board_usb_init(index, USB_INIT_DEVICE);
|
||||
}
|
||||
|
||||
static inline int usb_gadget_release(int index)
|
||||
{
|
||||
return board_usb_cleanup(index, USB_INIT_DEVICE);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_USB_GADGET_H */
|
||||
|
||||
@@ -73,6 +73,19 @@ int syscon_get_by_driver_data(ulong driver_data, struct udevice **devp);
|
||||
*/
|
||||
struct regmap *syscon_get_regmap_by_driver_data(ulong driver_data);
|
||||
|
||||
/**
|
||||
* syscon_regmap_lookup_by_phandle() - Look up a controller by a phandle
|
||||
*
|
||||
* This operates by looking up the given name in the device (device
|
||||
* tree property) of the device using the system controller.
|
||||
*
|
||||
* @dev: Device using the system controller
|
||||
* @name: Name of property referring to the system controller
|
||||
* @return A pointer to the regmap if found, ERR_PTR(-ve) on error
|
||||
*/
|
||||
struct regmap *syscon_regmap_lookup_by_phandle(struct udevice *dev,
|
||||
const char *name);
|
||||
|
||||
/**
|
||||
* syscon_get_first_range() - get the first memory range from a syscon regmap
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user