X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fdwc3-uboot.h;h=3c9e204cf0705bfdd6aed4e8e2fbf765ce9e82e1;hb=7086de4948ba2bc46cdd3001f7d845535f05f7fe;hp=6d1b42af0395efccaf9ba07013c054a380287922;hpb=da0d9e42a3cef095994efb27ae36754befcec795;p=oweals%2Fu-boot.git diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h index 6d1b42af03..3c9e204cf0 100644 --- a/include/dwc3-uboot.h +++ b/include/dwc3-uboot.h @@ -1,20 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* include/dwc3-uboot.h * * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com * * Designware SuperSpeed USB uboot init - * - * SPDX-License-Identifier: GPL-2.0 */ #ifndef __DWC3_UBOOT_H_ #define __DWC3_UBOOT_H_ #include +#include struct dwc3_device { - int base; + unsigned long base; enum usb_dr_mode dr_mode; + enum usb_phy_interface hsphy_mode; u32 maximum_speed; unsigned tx_fifo_resize:1; unsigned has_lpm_erratum; @@ -33,8 +34,29 @@ struct dwc3_device { unsigned dis_u2_susphy_quirk; unsigned tx_de_emphasis_quirk; unsigned tx_de_emphasis; + int index; }; int dwc3_uboot_init(struct dwc3_device *dev); -void dwc3_uboot_exit(void); +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_ */