dm: usb: Allow ECHI to hold private data for the controller
Add a private data pointer that clients of EHCI can use to access their
private information. This establishes a link between struct ehci_ctrl and
its associated controller data structure.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index cc71016..5c71882 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -930,6 +930,16 @@
return -1;
}
+void ehci_set_controller_priv(int index, void *priv)
+{
+ ehcic[index].priv = priv;
+}
+
+void *ehci_get_controller_priv(int index)
+{
+ return ehcic[index].priv;
+}
+
int usb_lowlevel_stop(int index)
{
ehci_shutdown(&ehcic[index]);