Index: uspace/drv/bus/usb/ohci/Makefile
===================================================================
--- uspace/drv/bus/usb/ohci/Makefile	(revision 23b0fe8e5a14774779ca68b936cc950407e553b8)
+++ uspace/drv/bus/usb/ohci/Makefile	(revision e20eaed316ce4d05fbacbcf2391fa52e9fc09c30)
@@ -47,8 +47,8 @@
 	endpoint_list.c \
 	hc.c \
-	hcd_endpoint.c \
 	iface.c \
 	main.c \
 	ohci.c \
+	ohci_endpoint.c \
 	pci.c \
 	root_hub.c \
Index: uspace/drv/bus/usb/ohci/batch.c
===================================================================
--- uspace/drv/bus/usb/ohci/batch.c	(revision 23b0fe8e5a14774779ca68b936cc950407e553b8)
+++ uspace/drv/bus/usb/ohci/batch.c	(revision e20eaed316ce4d05fbacbcf2391fa52e9fc09c30)
@@ -39,5 +39,5 @@
 
 #include "batch.h"
-#include "hcd_endpoint.h"
+#include "ohci_endpoint.h"
 #include "utils/malloc32.h"
 #include "hw_struct/endpoint_descriptor.h"
@@ -122,6 +122,6 @@
         } else (void)0
 
-	const hcd_endpoint_t *hcd_ep = hcd_endpoint_get(batch->ep);
-	assert(hcd_ep);
+	const ohci_endpoint_t *ohci_ep = ohci_endpoint_get(batch->ep);
+	assert(ohci_ep);
 
 	ohci_transfer_batch_t *data = calloc(sizeof(ohci_transfer_batch_t), 1);
@@ -135,5 +135,5 @@
 	}
 
-	/* We need an extra place for TD that is currently assigned to hcd_ep*/
+	/* We need an extra place for TD that is assigned to ohci_ep */
 	data->tds = calloc(sizeof(td_t*), data->td_count + 1);
 	CHECK_NULL_DISPOSE_RETURN(data->tds,
@@ -141,5 +141,5 @@
 
 	/* Add TD left over by the previous transfer */
-	data->tds[0] = hcd_ep->td;
+	data->tds[0] = ohci_ep->td;
 	data->leave_td = 0;
 	unsigned i = 1;
@@ -150,5 +150,5 @@
 	}
 
-	data->ed = hcd_ep->ed;
+	data->ed = ohci_ep->ed;
 	batch->private_data = data;
 	batch->private_data_dtor = ohci_batch_dispose;
@@ -213,6 +213,6 @@
 	    ohci_batch_dispose);
 
-	const hcd_endpoint_t *hcd_ep = hcd_endpoint_get(ep);
-	assert(hcd_ep);
+	const ohci_endpoint_t *ohci_ep = ohci_endpoint_get(ep);
+	assert(ohci_ep);
 
 	ohci_transfer_batch_t *data = calloc(sizeof(ohci_transfer_batch_t), 1);
@@ -233,5 +233,5 @@
 
 	/* Add TD left over by the previous transfer */
-	data->tds[0] = hcd_ep->td;
+	data->tds[0] = ohci_ep->td;
 	data->leave_td = 0;
 	unsigned i = 1;
@@ -242,5 +242,5 @@
 	}
 
-	data->ed = hcd_ep->ed;
+	data->ed = ohci_ep->ed;
 
 	/* NOTE: OHCI is capable of handling buffer that crosses page boundaries
@@ -303,7 +303,8 @@
 	data->leave_td = i;
 	assert(data->leave_td <= data->td_count);
-	hcd_endpoint_t *hcd_ep = hcd_endpoint_get(instance->ep);
-	assert(hcd_ep);
-	hcd_ep->td = data->tds[i];
+
+	ohci_endpoint_t *ohci_ep = ohci_endpoint_get(instance->ep);
+	assert(ohci_ep);
+	ohci_ep->td = data->tds[i];
 	assert(i > 0);
 	for (--i;i < data->td_count; ++i)
@@ -312,5 +313,5 @@
 	/* Clear possible ED HALT */
 	data->ed->td_head &= ~ED_TDHEAD_HALTED_FLAG;
-	const uint32_t pa = addr_to_phys(hcd_ep->td);
+	const uint32_t pa = addr_to_phys(ohci_ep->td);
 	assert(pa == (data->ed->td_head & ED_TDHEAD_PTR_MASK));
 	assert(pa == (data->ed->td_tail & ED_TDTAIL_PTR_MASK));
Index: uspace/drv/bus/usb/ohci/endpoint_list.c
===================================================================
--- uspace/drv/bus/usb/ohci/endpoint_list.c	(revision 23b0fe8e5a14774779ca68b936cc950407e553b8)
+++ uspace/drv/bus/usb/ohci/endpoint_list.c	(revision e20eaed316ce4d05fbacbcf2391fa52e9fc09c30)
@@ -87,10 +87,9 @@
  * The endpoint is added to the end of the list and queue.
  */
-void endpoint_list_add_ep(endpoint_list_t *instance, hcd_endpoint_t *hcd_ep)
+void endpoint_list_add_ep(endpoint_list_t *instance, ohci_endpoint_t *ep)
 {
 	assert(instance);
-	assert(hcd_ep);
-	usb_log_debug2("Queue %s: Adding endpoint(%p).\n",
-	    instance->name, hcd_ep);
+	assert(ep);
+	usb_log_debug2("Queue %s: Adding endpoint(%p).\n", instance->name, ep);
 
 	fibril_mutex_lock(&instance->guard);
@@ -103,25 +102,25 @@
 	} else {
 		/* There are active EDs, get the last one */
-		hcd_endpoint_t *last = list_get_instance(
-		    list_last(&instance->endpoint_list), hcd_endpoint_t, link);
+		ohci_endpoint_t *last = list_get_instance(
+		    list_last(&instance->endpoint_list), ohci_endpoint_t, link);
 		last_ed = last->ed;
 	}
 	/* Keep link */
-	hcd_ep->ed->next = last_ed->next;
+	ep->ed->next = last_ed->next;
 	/* Make sure ED is written to the memory */
 	write_barrier();
 
 	/* Add ed to the hw queue */
-	ed_append_ed(last_ed, hcd_ep->ed);
+	ed_append_ed(last_ed, ep->ed);
 	/* Make sure ED is updated */
 	write_barrier();
 
 	/* Add to the sw list */
-	list_append(&hcd_ep->link, &instance->endpoint_list);
+	list_append(&ep->link, &instance->endpoint_list);
 
-	hcd_endpoint_t *first = list_get_instance(
-	    list_first(&instance->endpoint_list), hcd_endpoint_t, link);
+	ohci_endpoint_t *first = list_get_instance(
+	    list_first(&instance->endpoint_list), ohci_endpoint_t, link);
 	usb_log_debug("HCD EP(%p) added to list %s, first is %p(%p).\n",
-		hcd_ep, instance->name, first, first->ed);
+		ep, instance->name, first, first->ed);
 	if (last_ed == instance->list_head) {
 		usb_log_debug2("%s head ED(%p-0x%0" PRIx32 "): %x:%x:%x:%x.\n",
@@ -138,39 +137,38 @@
  * @param[in] endpoint Endpoint to remove.
  */
-void endpoint_list_remove_ep(endpoint_list_t *instance, hcd_endpoint_t *hcd_ep)
+void endpoint_list_remove_ep(endpoint_list_t *instance, ohci_endpoint_t *ep)
 {
 	assert(instance);
 	assert(instance->list_head);
-	assert(hcd_ep);
-	assert(hcd_ep->ed);
+	assert(ep);
+	assert(ep->ed);
 
 	fibril_mutex_lock(&instance->guard);
 
-	usb_log_debug2(
-	    "Queue %s: removing endpoint(%p).\n", instance->name, hcd_ep);
+	usb_log_debug2("Queue %s: removing endpoint(%p).\n", instance->name, ep);
 
 	const char *qpos = NULL;
 	ed_t *prev_ed;
 	/* Remove from the hardware queue */
-	if (list_first(&instance->endpoint_list) == &hcd_ep->link) {
+	if (list_first(&instance->endpoint_list) == &ep->link) {
 		/* I'm the first one here */
 		prev_ed = instance->list_head;
 		qpos = "FIRST";
 	} else {
-		hcd_endpoint_t *prev =
-		    list_get_instance(hcd_ep->link.prev, hcd_endpoint_t, link);
+		ohci_endpoint_t *prev =
+		    list_get_instance(ep->link.prev, ohci_endpoint_t, link);
 		prev_ed = prev->ed;
 		qpos = "NOT FIRST";
 	}
-	assert((prev_ed->next & ED_NEXT_PTR_MASK) == addr_to_phys(hcd_ep->ed));
-	prev_ed->next = hcd_ep->ed->next;
+	assert((prev_ed->next & ED_NEXT_PTR_MASK) == addr_to_phys(ep->ed));
+	prev_ed->next = ep->ed->next;
 	/* Make sure ED is updated */
 	write_barrier();
 
 	usb_log_debug("HCD EP(%p) removed (%s) from %s, next %x.\n",
-	    hcd_ep, qpos, instance->name, hcd_ep->ed->next);
+	    ep, qpos, instance->name, ep->ed->next);
 
 	/* Remove from the endpoint list */
-	list_remove(&hcd_ep->link);
+	list_remove(&ep->link);
 	fibril_mutex_unlock(&instance->guard);
 }
Index: uspace/drv/bus/usb/ohci/endpoint_list.h
===================================================================
--- uspace/drv/bus/usb/ohci/endpoint_list.h	(revision 23b0fe8e5a14774779ca68b936cc950407e553b8)
+++ uspace/drv/bus/usb/ohci/endpoint_list.h	(revision e20eaed316ce4d05fbacbcf2391fa52e9fc09c30)
@@ -37,5 +37,5 @@
 #include <fibril_synch.h>
 
-#include "hcd_endpoint.h"
+#include "ohci_endpoint.h"
 #include "hw_struct/endpoint_descriptor.h"
 #include "utils/malloc32.h"
@@ -69,6 +69,6 @@
 int endpoint_list_init(endpoint_list_t *instance, const char *name);
 void endpoint_list_set_next(endpoint_list_t *instance, endpoint_list_t *next);
-void endpoint_list_add_ep(endpoint_list_t *instance, hcd_endpoint_t *hcd_ep);
-void endpoint_list_remove_ep(endpoint_list_t *instance, hcd_endpoint_t *hcd_ep);
+void endpoint_list_add_ep(endpoint_list_t *instance, ohci_endpoint_t *ep);
+void endpoint_list_remove_ep(endpoint_list_t *instance, ohci_endpoint_t *ep);
 #endif
 /**
Index: uspace/drv/bus/usb/ohci/hc.c
===================================================================
--- uspace/drv/bus/usb/ohci/hc.c	(revision 23b0fe8e5a14774779ca68b936cc950407e553b8)
+++ uspace/drv/bus/usb/ohci/hc.c	(revision e20eaed316ce4d05fbacbcf2391fa52e9fc09c30)
@@ -42,5 +42,5 @@
 
 #include "hc.h"
-#include "hcd_endpoint.h"
+#include "ohci_endpoint.h"
 
 #define OHCI_USED_INTERRUPTS \
@@ -203,5 +203,5 @@
 	instance->generic.private_data = instance;
 	instance->generic.schedule = schedule;
-	instance->generic.ep_add_hook = NULL;
+	instance->generic.ep_add_hook = ohci_endpoint_assign;
 
 	ret = hc_init_memory(instance);
@@ -249,5 +249,5 @@
 		return ENOMEM;
 
-	int ret = hcd_endpoint_assign(ep);
+	int ret = ohci_endpoint_assign(&instance->generic, ep);
 	if (ret != EOK) {
 		endpoint_destroy(ep);
@@ -261,10 +261,10 @@
 	}
 
-	/* Enqueue hcd_ep */
+	/* Enqueue ep */
 	switch (ep->transfer_type) {
 	case USB_TRANSFER_CONTROL:
 		instance->registers->control &= ~C_CLE;
 		endpoint_list_add_ep(
-		    &instance->lists[ep->transfer_type], hcd_endpoint_get(ep));
+		    &instance->lists[ep->transfer_type], ohci_endpoint_get(ep));
 		instance->registers->control_current = 0;
 		instance->registers->control |= C_CLE;
@@ -273,5 +273,5 @@
 		instance->registers->control &= ~C_BLE;
 		endpoint_list_add_ep(
-		    &instance->lists[ep->transfer_type], hcd_endpoint_get(ep));
+		    &instance->lists[ep->transfer_type], ohci_endpoint_get(ep));
 		instance->registers->control |= C_BLE;
 		break;
@@ -280,5 +280,5 @@
 		instance->registers->control &= (~C_PLE & ~C_IE);
 		endpoint_list_add_ep(
-		    &instance->lists[ep->transfer_type], hcd_endpoint_get(ep));
+		    &instance->lists[ep->transfer_type], ohci_endpoint_get(ep));
 		instance->registers->control |= C_PLE | C_IE;
 		break;
@@ -309,12 +309,12 @@
 	}
 
-	hcd_endpoint_t *hcd_ep = hcd_endpoint_get(ep);
-	if (hcd_ep) {
-		/* Dequeue hcd_ep */
+	ohci_endpoint_t *ohci_ep = ohci_endpoint_get(ep);
+	if (ohci_ep) {
+		/* Dequeue ep */
 		switch (ep->transfer_type) {
 		case USB_TRANSFER_CONTROL:
 			instance->registers->control &= ~C_CLE;
 			endpoint_list_remove_ep(
-			    &instance->lists[ep->transfer_type], hcd_ep);
+			    &instance->lists[ep->transfer_type], ohci_ep);
 			instance->registers->control_current = 0;
 			instance->registers->control |= C_CLE;
@@ -323,5 +323,5 @@
 			instance->registers->control &= ~C_BLE;
 			endpoint_list_remove_ep(
-			    &instance->lists[ep->transfer_type], hcd_ep);
+			    &instance->lists[ep->transfer_type], ohci_ep);
 			instance->registers->control |= C_BLE;
 			break;
@@ -330,5 +330,5 @@
 			instance->registers->control &= (~C_PLE & ~C_IE);
 			endpoint_list_remove_ep(
-			    &instance->lists[ep->transfer_type], hcd_ep);
+			    &instance->lists[ep->transfer_type], ohci_ep);
 			instance->registers->control |= C_PLE | C_IE;
 			break;
Index: uspace/drv/bus/usb/ohci/hcd_endpoint.c
===================================================================
--- uspace/drv/bus/usb/ohci/hcd_endpoint.c	(revision 23b0fe8e5a14774779ca68b936cc950407e553b8)
+++ 	(revision )
@@ -1,111 +1,0 @@
-/*
- * 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 drvusbohci
- * @{
- */
-/** @file
- * @brief OHCI driver
- */
-#include "utils/malloc32.h"
-#include "hcd_endpoint.h"
-
-/** Callback to set toggle on ED.
- *
- * @param[in] hcd_ep hcd endpoint structure
- * @param[in] toggle new value of toggle bit
- */
-static void hcd_ep_toggle_set(void *hcd_ep, int toggle)
-{
-	hcd_endpoint_t *instance = hcd_ep;
-	assert(instance);
-	assert(instance->ed);
-	ed_toggle_set(instance->ed, toggle);
-}
-/*----------------------------------------------------------------------------*/
-/** Callback to get value of toggle bit.
- *
- * @param[in] hcd_ep hcd endpoint structure
- * @return Current value of toggle bit.
- */
-static int hcd_ep_toggle_get(void *hcd_ep)
-{
-	hcd_endpoint_t *instance = hcd_ep;
-	assert(instance);
-	assert(instance->ed);
-	return ed_toggle_get(instance->ed);
-}
-/*----------------------------------------------------------------------------*/
-/** Disposes hcd endpoint structure
- *
- * @param[in] hcd_ep endpoint structure
- */
-static void hcd_ep_destroy(void *hcd_ep)
-{
-	if (hcd_ep) {
-		hcd_endpoint_t *instance = hcd_ep;
-		free32(instance->ed);
-		free32(instance->td);
-		free(instance);
-	}
-}
-/*----------------------------------------------------------------------------*/
-/** Creates new hcd endpoint representation.
- *
- * @param[in] ep USBD endpoint structure
- * @return pointer to a new hcd endpoint structure, NULL on failure.
- */
-int hcd_endpoint_assign(endpoint_t *ep)
-{
-	assert(ep);
-	hcd_endpoint_t *hcd_ep = malloc(sizeof(hcd_endpoint_t));
-	if (hcd_ep == NULL)
-		return ENOMEM;
-
-	hcd_ep->ed = malloc32(sizeof(ed_t));
-	if (hcd_ep->ed == NULL) {
-		free(hcd_ep);
-		return ENOMEM;
-	}
-
-	hcd_ep->td = malloc32(sizeof(td_t));
-	if (hcd_ep->td == NULL) {
-		free32(hcd_ep->ed);
-		free(hcd_ep);
-		return ENOMEM;
-	}
-
-	ed_init(hcd_ep->ed, ep);
-	ed_set_td(hcd_ep->ed, hcd_ep->td);
-	endpoint_set_hc_data(
-	    ep, hcd_ep, hcd_ep_destroy, hcd_ep_toggle_get, hcd_ep_toggle_set);
-
-	return EOK;
-}
-/**
- * @}
- */
Index: uspace/drv/bus/usb/ohci/hcd_endpoint.h
===================================================================
--- uspace/drv/bus/usb/ohci/hcd_endpoint.h	(revision 23b0fe8e5a14774779ca68b936cc950407e553b8)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/*
- * 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 drvusbohci
- * @{
- */
-/** @file
- * @brief OHCI driver
- */
-#ifndef DRV_OHCI_HCD_ENDPOINT_H
-#define DRV_OHCI_HCD_ENDPOINT_H
-
-#include <assert.h>
-#include <adt/list.h>
-#include <usb/host/endpoint.h>
-
-#include "hw_struct/endpoint_descriptor.h"
-#include "hw_struct/transfer_descriptor.h"
-
-/** Connector structure linking ED to to prepared TD. */
-typedef struct hcd_endpoint {
-	/** OHCI endpoint descriptor */
-	ed_t *ed;
-	/** Currently enqueued transfer descriptor */
-	td_t *td;
-	/** Linked list used by driver software */
-	link_t link;
-} hcd_endpoint_t;
-
-int hcd_endpoint_assign(endpoint_t *ep);
-
-/** Get and convert assigned hcd_endpoint_t structure
- * @param[in] ep USBD endpoint structure.
- * @return Pointer to assigned hcd endpoint structure
- */
-static inline hcd_endpoint_t * hcd_endpoint_get(endpoint_t *ep)
-{
-	assert(ep);
-	return ep->hc_data.data;
-}
-
-#endif
-/**
- * @}
- */
Index: uspace/drv/bus/usb/ohci/ohci_endpoint.c
===================================================================
--- uspace/drv/bus/usb/ohci/ohci_endpoint.c	(revision e20eaed316ce4d05fbacbcf2391fa52e9fc09c30)
+++ uspace/drv/bus/usb/ohci/ohci_endpoint.c	(revision e20eaed316ce4d05fbacbcf2391fa52e9fc09c30)
@@ -0,0 +1,111 @@
+/*
+ * 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 drvusbohci
+ * @{
+ */
+/** @file
+ * @brief OHCI driver
+ */
+#include "utils/malloc32.h"
+#include "ohci_endpoint.h"
+
+/** Callback to set toggle on ED.
+ *
+ * @param[in] hcd_ep hcd endpoint structure
+ * @param[in] toggle new value of toggle bit
+ */
+static void ohci_ep_toggle_set(void *ohci_ep, int toggle)
+{
+	ohci_endpoint_t *instance = ohci_ep;
+	assert(instance);
+	assert(instance->ed);
+	ed_toggle_set(instance->ed, toggle);
+}
+/*----------------------------------------------------------------------------*/
+/** Callback to get value of toggle bit.
+ *
+ * @param[in] hcd_ep hcd endpoint structure
+ * @return Current value of toggle bit.
+ */
+static int ohci_ep_toggle_get(void *ohci_ep)
+{
+	ohci_endpoint_t *instance = ohci_ep;
+	assert(instance);
+	assert(instance->ed);
+	return ed_toggle_get(instance->ed);
+}
+/*----------------------------------------------------------------------------*/
+/** Disposes hcd endpoint structure
+ *
+ * @param[in] hcd_ep endpoint structure
+ */
+static void ohci_ep_destroy(void *ohci_ep)
+{
+	if (ohci_ep) {
+		ohci_endpoint_t *instance = ohci_ep;
+		free32(instance->ed);
+		free32(instance->td);
+		free(instance);
+	}
+}
+/*----------------------------------------------------------------------------*/
+/** Creates new hcd endpoint representation.
+ *
+ * @param[in] ep USBD endpoint structure
+ * @return pointer to a new hcd endpoint structure, NULL on failure.
+ */
+int ohci_endpoint_assign(hcd_t *hcd, endpoint_t *ep)
+{
+	assert(ep);
+	ohci_endpoint_t *ohci_ep = malloc(sizeof(ohci_endpoint_t));
+	if (ohci_ep == NULL)
+		return ENOMEM;
+
+	ohci_ep->ed = malloc32(sizeof(ed_t));
+	if (ohci_ep->ed == NULL) {
+		free(ohci_ep);
+		return ENOMEM;
+	}
+
+	ohci_ep->td = malloc32(sizeof(td_t));
+	if (ohci_ep->td == NULL) {
+		free32(ohci_ep->ed);
+		free(ohci_ep);
+		return ENOMEM;
+	}
+
+	ed_init(ohci_ep->ed, ep);
+	ed_set_td(ohci_ep->ed, ohci_ep->td);
+	endpoint_set_hc_data(
+	    ep, ohci_ep, ohci_ep_destroy, ohci_ep_toggle_get, ohci_ep_toggle_set);
+
+	return EOK;
+}
+/**
+ * @}
+ */
Index: uspace/drv/bus/usb/ohci/ohci_endpoint.h
===================================================================
--- uspace/drv/bus/usb/ohci/ohci_endpoint.h	(revision e20eaed316ce4d05fbacbcf2391fa52e9fc09c30)
+++ uspace/drv/bus/usb/ohci/ohci_endpoint.h	(revision e20eaed316ce4d05fbacbcf2391fa52e9fc09c30)
@@ -0,0 +1,72 @@
+/*
+ * 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 drvusbohci
+ * @{
+ */
+/** @file
+ * @brief OHCI driver
+ */
+#ifndef DRV_OHCI_HCD_ENDPOINT_H
+#define DRV_OHCI_HCD_ENDPOINT_H
+
+#include <assert.h>
+#include <adt/list.h>
+#include <usb/host/endpoint.h>
+#include <usb/host/hcd.h>
+
+#include "hw_struct/endpoint_descriptor.h"
+#include "hw_struct/transfer_descriptor.h"
+
+/** Connector structure linking ED to to prepared TD. */
+typedef struct ohci_endpoint {
+	/** OHCI endpoint descriptor */
+	ed_t *ed;
+	/** Currently enqueued transfer descriptor */
+	td_t *td;
+	/** Linked list used by driver software */
+	link_t link;
+	/** Device using this ep */
+	hcd_t *hcd;
+} ohci_endpoint_t;
+
+int ohci_endpoint_assign(hcd_t *hcd, endpoint_t *ep);
+
+/** Get and convert assigned ohci_endpoint_t structure
+ * @param[in] ep USBD endpoint structure.
+ * @return Pointer to assigned hcd endpoint structure
+ */
+static inline ohci_endpoint_t * ohci_endpoint_get(endpoint_t *ep)
+{
+	assert(ep);
+	return ep->hc_data.data;
+}
+
+#endif
+/**
+ * @}
+ */
