summaryrefslogtreecommitdiff
path: root/common/usb.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-02-16 11:14:33 -0800
committerRemy Bohmer <linux@bohmer.net>2011-02-19 20:32:36 +0100
commit89d48367edbc878f86db3008a4107331ef07f578 (patch)
tree808742d920445274c97d867422762b3b67cc8391 /common/usb.c
parent96820a35873b4c005f732432c6a168decc9d22b9 (diff)
downloadu-boot-imx-89d48367edbc878f86db3008a4107331ef07f578.zip
u-boot-imx-89d48367edbc878f86db3008a4107331ef07f578.tar.gz
u-boot-imx-89d48367edbc878f86db3008a4107331ef07f578.tar.bz2
Add USB host ethernet adapter support
This adds support for using USB Ethernet dongles in host mode. This is just the framework - drivers will come later. A new config option called CONFIG_USB_HOST_ETHER can be defined in board config files to switch this on. The was originally written by NVIDIA and was cleaned up for release by the Chromium authors. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/usb.c')
-rw-r--r--common/usb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/usb.c b/common/usb.c
index 44a435a..4f7c520 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -145,10 +145,14 @@ int usb_stop(void)
/*
* disables the asynch behaviour of the control message. This is used for data
* transfers that uses the exclusiv access to the control and bulk messages.
+ * Returns the old value so it can be restored later.
*/
-void usb_disable_asynch(int disable)
+int usb_disable_asynch(int disable)
{
+ int old_value = asynch_allowed;
+
asynch_allowed = !disable;
+ return old_value;
}