Index: uspace/drv/bus/usb/ohci/hc.c
===================================================================
--- uspace/drv/bus/usb/ohci/hc.c	(revision f29931c06e9f7b30dd0e88fbb3ec883e88b8b258)
+++ uspace/drv/bus/usb/ohci/hc.c	(revision 4daee7a5b30c2945ce9343544a718b31f03de131)
@@ -135,63 +135,4 @@
 
 	return EOK;
-}
-
-/** Announce OHCI root hub to the DDF
- *
- * @param[in] instance OHCI driver intance
- * @param[in] hub_fun DDF fuction representing OHCI root hub
- * @return Error code
- */
-int hc_register_hub(hc_t *instance, ddf_fun_t *hub_fun)
-{
-	assert(instance);
-	assert(hub_fun);
-
-	/* Try to get address 1 for root hub. */
-	instance->rh.address = 1;
-	int ret = usb_device_manager_request_address(
-	    &instance->generic.dev_manager, &instance->rh.address, false,
-	    USB_SPEED_FULL);
-	if (ret != EOK) {
-		usb_log_error("Failed to get OHCI root hub address: %s\n",
-		    str_error(ret));
-		return ret;
-	}
-
-#define CHECK_RET_UNREG_RETURN(ret, message...) \
-if (ret != EOK) { \
-	usb_log_error(message); \
-	usb_endpoint_manager_remove_ep( \
-	    &instance->generic.ep_manager, instance->rh.address, 0, \
-	    USB_DIRECTION_BOTH, NULL, NULL); \
-	usb_device_manager_release_address( \
-	    &instance->generic.dev_manager, instance->rh.address); \
-	return ret; \
-} else (void)0
-
-	ret = usb_endpoint_manager_add_ep(
-	    &instance->generic.ep_manager, instance->rh.address, 0,
-	    USB_DIRECTION_BOTH, USB_TRANSFER_CONTROL, USB_SPEED_FULL, 64,
-	    0, NULL, NULL);
-	CHECK_RET_UNREG_RETURN(ret,
-	    "Failed to register root hub control endpoint: %s.\n",
-	    str_error(ret));
-
-	ret = ddf_fun_add_match_id(hub_fun, "usb&class=hub", 100);
-	CHECK_RET_UNREG_RETURN(ret,
-	    "Failed to add root hub match-id: %s.\n", str_error(ret));
-
-	ret = ddf_fun_bind(hub_fun);
-	CHECK_RET_UNREG_RETURN(ret,
-	    "Failed to bind root hub function: %s.\n", str_error(ret));
-
-	ret = usb_device_manager_bind_address(&instance->generic.dev_manager,
-	    instance->rh.address, ddf_fun_get_handle(hub_fun));
-	if (ret != EOK)
-		usb_log_warning("Failed to bind root hub address: %s.\n",
-		    str_error(ret));
-
-	return EOK;
-#undef CHECK_RET_RELEASE
 }
 
Index: uspace/drv/bus/usb/ohci/ohci.c
===================================================================
--- uspace/drv/bus/usb/ohci/ohci.c	(revision f29931c06e9f7b30dd0e88fbb3ec883e88b8b258)
+++ uspace/drv/bus/usb/ohci/ohci.c	(revision 4daee7a5b30c2945ce9343544a718b31f03de131)
@@ -248,5 +248,5 @@
 	    "Failed to add OHCI to HC class: %s.\n", str_error(ret));
 
-	ret = hc_register_hub(hc, instance->rh_fun);
+	ret = hcd_register_hub(&hc->generic, &hc->rh.address, instance->rh_fun);
 	CHECK_RET_FINI_RETURN(ret,
 	    "Failed to register OHCI root hub: %s.\n", str_error(ret));
Index: uspace/lib/usbhost/Makefile
===================================================================
--- uspace/lib/usbhost/Makefile	(revision f29931c06e9f7b30dd0e88fbb3ec883e88b8b258)
+++ uspace/lib/usbhost/Makefile	(revision 4daee7a5b30c2945ce9343544a718b31f03de131)
@@ -36,4 +36,5 @@
 SOURCES = \
 	src/endpoint.c \
+	src/hcd.c \
 	src/iface.c \
 	src/usb_device_manager.c \
Index: uspace/lib/usbhost/include/usb/host/hcd.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/hcd.h	(revision f29931c06e9f7b30dd0e88fbb3ec883e88b8b258)
+++ uspace/lib/usbhost/include/usb/host/hcd.h	(revision 4daee7a5b30c2945ce9343544a718b31f03de131)
@@ -74,5 +74,5 @@
  */
 static inline void hcd_init(hcd_t *hcd, usb_speed_t max_speed, size_t bandwidth,
-    size_t (*bw_count)(usb_speed_t, usb_transfer_type_t, size_t, size_t))
+    bw_count_func_t bw_count)
 {
 	assert(hcd);
@@ -83,4 +83,15 @@
 	hcd->ep_add_hook = NULL;
 	hcd->ep_remove_hook = NULL;
+}
+
+static inline void hcd_set_implementation(hcd_t *hcd, void *data,
+    schedule_hook_t schedule, ep_add_hook_t add_hook, ep_remove_hook_t rem_hook)
+{
+	assert(hcd);
+	hcd->private_data = data;
+	hcd->schedule = schedule;
+	hcd->ep_add_hook = add_hook;
+	hcd->ep_remove_hook = rem_hook;
+
 }
 
@@ -98,4 +109,7 @@
 }
 
+int hcd_register_hub(hcd_t *instance, usb_address_t *address, ddf_fun_t *hub_fun);
+
+
 /** Data retrieve wrapper.
  * @param fun ddf function, non-null.
@@ -107,4 +121,5 @@
 }
 
+
 extern usbhc_iface_t hcd_iface;
 
Index: uspace/lib/usbhost/src/hcd.c
===================================================================
--- uspace/lib/usbhost/src/hcd.c	(revision 4daee7a5b30c2945ce9343544a718b31f03de131)
+++ uspace/lib/usbhost/src/hcd.c	(revision 4daee7a5b30c2945ce9343544a718b31f03de131)
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2011 Jan Vesely
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libusbhost
+ * @{
+ */
+/** @file
+ *
+ */
+
+#include <errno.h>
+#include <str_error.h>
+#include <usb/debug.h>
+
+#include <usb/host/hcd.h>
+
+/** Announce root hub to the DDF
+ *
+ * @param[in] instance OHCI driver instance
+ * @param[in] hub_fun DDF function representing OHCI root hub
+ * @return Error code
+ */
+int hcd_register_hub(hcd_t *instance, usb_address_t *address, ddf_fun_t *hub_fun)
+{
+	assert(instance);
+	assert(address);
+	assert(hub_fun);
+
+	int ret = usb_device_manager_request_address(
+	    &instance->dev_manager, address, false,
+	    USB_SPEED_FULL);
+	if (ret != EOK) {
+		usb_log_error("Failed to get root hub address: %s\n",
+		    str_error(ret));
+		return ret;
+	}
+
+#define CHECK_RET_UNREG_RETURN(ret, message...) \
+if (ret != EOK) { \
+	usb_log_error(message); \
+	usb_endpoint_manager_remove_ep( \
+	    &instance->ep_manager, *address, 0, \
+	    USB_DIRECTION_BOTH, NULL, NULL); \
+	usb_device_manager_release_address( \
+	    &instance->dev_manager, *address); \
+	return ret; \
+} else (void)0
+
+	ret = usb_endpoint_manager_add_ep(
+	    &instance->ep_manager, *address, 0,
+	    USB_DIRECTION_BOTH, USB_TRANSFER_CONTROL, USB_SPEED_FULL, 64,
+	    0, NULL, NULL);
+	CHECK_RET_UNREG_RETURN(ret,
+	    "Failed to register root hub control endpoint: %s.\n",
+	    str_error(ret));
+
+	ret = ddf_fun_add_match_id(hub_fun, "usb&class=hub", 100);
+	CHECK_RET_UNREG_RETURN(ret,
+	    "Failed to add root hub match-id: %s.\n", str_error(ret));
+
+	ret = ddf_fun_bind(hub_fun);
+	CHECK_RET_UNREG_RETURN(ret,
+	    "Failed to bind root hub function: %s.\n", str_error(ret));
+
+	ret = usb_device_manager_bind_address(&instance->dev_manager,
+	    *address, ddf_fun_get_handle(hub_fun));
+	if (ret != EOK)
+		usb_log_warning("Failed to bind root hub address: %s.\n",
+		    str_error(ret));
+
+	return EOK;
+#undef CHECK_RET_UNREG_RETURN
+}
+
+/**
+ * @}
+ */
