diff options
author | Simon Glass <sjg@chromium.org> | 2015-03-25 12:22:19 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-18 11:11:23 -0600 |
commit | c4a3141d55398660a65417fa15c05d2630400af7 (patch) | |
tree | 27bdfc1808365a794346eb229dca302379b54cec /drivers/usb/host/ehci-hcd.c | |
parent | 7338287d580fba4f09d052960941c23039e8919d (diff) |
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>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index cc71016b29..5c71882e3a 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -930,6 +930,16 @@ unknown: 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]); |