summaryrefslogtreecommitdiff
path: root/include/dwc3-uboot.h
diff options
context:
space:
mode:
authorJean-Jacques Hiblot <jjhiblot@ti.com>2018-11-29 10:52:45 +0100
committerMarek Vasut <marex@denx.de>2018-12-07 16:31:45 +0100
commitd648a50c0a27452a5439e7982b23b97c64820430 (patch)
tree5b32bcb24a3c0cb98de3bf12307097b3db024aaa /include/dwc3-uboot.h
parent20bebd866690bb09dd1c1cb8ac674c3b17b63c6d (diff)
dwc3: move phy operation to core.c
Those operations can be used for peripheral operation as well as host operation. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> # Conflicts: # drivers/usb/dwc3/core.c # drivers/usb/host/xhci-dwc3.c
Diffstat (limited to 'include/dwc3-uboot.h')
-rw-r--r--include/dwc3-uboot.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h
index 228ab3b102..9941cc37a3 100644
--- a/include/dwc3-uboot.h
+++ b/include/dwc3-uboot.h
@@ -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_ */