Index: boot/arch/amd64/Makefile.inc
===================================================================
--- boot/arch/amd64/Makefile.inc	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ boot/arch/amd64/Makefile.inc	(revision 74271e0a1348908216d562f2d82b720a726c6aff)
@@ -46,5 +46,4 @@
 	bus/usb/ohci \
 	bus/usb/uhci \
-	bus/usb/uhcirh \
 	bus/usb/usbflbk \
 	bus/usb/usbhub \
Index: uspace/Makefile
===================================================================
--- uspace/Makefile	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ uspace/Makefile	(revision 74271e0a1348908216d562f2d82b720a726c6aff)
@@ -126,5 +126,4 @@
 	drv/bus/usb/ohci \
 	drv/bus/usb/uhci \
-	drv/bus/usb/uhcirh \
 	drv/bus/usb/usbflbk \
 	drv/bus/usb/usbhid \
Index: uspace/doc/doxygroups.h
===================================================================
--- uspace/doc/doxygroups.h	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ uspace/doc/doxygroups.h	(revision 74271e0a1348908216d562f2d82b720a726c6aff)
@@ -285,16 +285,4 @@
 	 */
 
-		/**
-		 * @defgroup drvusbuhcirh UHCI root hub driver
-		 * @ingroup drvusbuhci
-		 * @brief Driver for UHCI complaint root hub.
-		 */
-
-		/**
-		 * @defgroup drvusbuhcihc UHCI host controller driver
-		 * @ingroup drvusbuhci
-		 * @brief Driver for UHCI complaint USB host controller.
-		 */
-
 	/**
 	 * @defgroup drvusbohci OHCI driver
Index: uspace/drv/bus/usb/uhci/Makefile
===================================================================
--- uspace/drv/bus/usb/uhci/Makefile	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ uspace/drv/bus/usb/uhci/Makefile	(revision 74271e0a1348908216d562f2d82b720a726c6aff)
@@ -48,5 +48,4 @@
 	main.c \
 	res.c \
-	root_hub.c \
 	transfer_list.c \
 	uhci.c \
Index: pace/drv/bus/usb/uhci/root_hub.c
===================================================================
--- uspace/drv/bus/usb/uhci/root_hub.c	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ 	(revision )
@@ -1,150 +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 drvusbuhci
- * @{
- */
-/** @file
- * @brief UHCI driver
- */
-#include <assert.h>
-#include <errno.h>
-#include <str_error.h>
-#include <stdio.h>
-#include <ops/hw_res.h>
-
-#include <usb_iface.h>
-#include <usb/debug.h>
-
-#include "root_hub.h"
-/** DDF support structure for uhci_rhd driver, provides I/O resources */
-typedef struct {
-	/** List of resources available to the root hub. */
-	hw_resource_list_t resource_list;
-	/** The only resource in the RH resource list */
-	hw_resource_t io_regs;
-
-	devman_handle_t hc_handle;
-} rh_t;
-
-/** Gets handle of the respective hc.
- *
- * @param[in] fun DDF function of uhci device.
- * @param[out] handle Host cotnroller handle.
- * @return Error code.
- */
-static int usb_iface_get_hc_handle(ddf_fun_t *fun, devman_handle_t *handle)
-{
-	assert(fun);
-	rh_t *rh = ddf_fun_data_get(fun);
-
-	if (handle != NULL)
-		*handle = rh->hc_handle;
-	return EOK;
-}
-
-/** USB interface implementation used by RH */
-static usb_iface_t usb_iface = {
-	.get_hc_handle = usb_iface_get_hc_handle,
-};
-
-/** Get root hub hw resources (I/O registers).
- *
- * @param[in] fun Root hub function.
- * @return Pointer to the resource list used by the root hub.
- */
-static hw_resource_list_t *get_resource_list(ddf_fun_t *fun)
-{
-	assert(fun);
-	rh_t *rh = ddf_fun_data_get(fun);
-	assert(rh);
-	return &rh->resource_list;
-}
-
-/** Interface to provide the root hub driver with hw info */
-static hw_res_ops_t hw_res_iface = {
-	.get_resource_list = get_resource_list,
-	.enable_interrupt = NULL,
-};
-
-/** RH function support for uhci_rhd */
-static ddf_dev_ops_t rh_ops = {
-	.interfaces[USB_DEV_IFACE] = &usb_iface,
-	.interfaces[HW_RES_DEV_IFACE] = &hw_res_iface
-};
-/** Root hub initialization
- * @param[in] instance RH structure to initialize
- * @param[in] fun DDF function representing UHCI root hub
- * @param[in] reg_addr Address of root hub status and control registers.
- * @param[in] reg_size Size of accessible address space.
- * @return Error code.
- */
-int rh_init(ddf_dev_t *device, uintptr_t reg_addr, size_t reg_size,
-    devman_handle_t handle)
-{
-	assert(device);
-	
-	ddf_fun_t *fun = ddf_fun_create(device, fun_inner, "uhci_rh");
-	if (!fun) {
-		usb_log_error("Failed to create UHCI RH function.\n");
-		return ENOMEM;
-	}
-	ddf_fun_set_ops(fun, &rh_ops);
-
-	rh_t *instance = ddf_fun_data_alloc(fun, sizeof(rh_t));
-
-	/* Initialize resource structure */
-	instance->resource_list.count = 1;
-	instance->resource_list.resources = &instance->io_regs;
-
-	instance->io_regs.type = IO_RANGE;
-	instance->io_regs.res.io_range.address = reg_addr;
-	instance->io_regs.res.io_range.size = reg_size;
-	instance->io_regs.res.io_range.endianness = LITTLE_ENDIAN;
-
-	instance->hc_handle = handle;	
-
-	int ret = ddf_fun_add_match_id(fun, "usb&uhci&root-hub", 100);
-	if (ret != EOK) {
-		usb_log_error("Failed to add root hub match id: %s\n",
-		    str_error(ret));
-		ddf_fun_destroy(fun);
-	}
-
-	ret = ddf_fun_bind(fun);
-	if (ret != EOK) {
-		usb_log_error("Failed to bind root function: %s\n",
-		    str_error(ret));
-		ddf_fun_destroy(fun);
-	}
-
-	usb_log_fatal("RH ready, hc handle: %"PRIun"\n", handle);
-	return ret;
-}
-/**
- * @}
- */
Index: pace/drv/bus/usb/uhci/root_hub.h
===================================================================
--- uspace/drv/bus/usb/uhci/root_hub.h	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ 	(revision )
@@ -1,46 +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 drvusbuhci
- * @{
- */
-/** @file
- * @brief UHCI driver
- */
-#ifndef DRV_UHCI_RH_H
-#define DRV_UHCI_RH_H
-
-#include <ddf/driver.h>
-
-int rh_init(ddf_dev_t *device, uintptr_t reg_addr, size_t reg_size,
-    devman_handle_t handle);
-
-#endif
-/**
- * @}
- */
Index: uspace/drv/bus/usb/uhci/uhci.c
===================================================================
--- uspace/drv/bus/usb/uhci/uhci.c	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ uspace/drv/bus/usb/uhci/uhci.c	(revision 74271e0a1348908216d562f2d82b720a726c6aff)
@@ -49,5 +49,4 @@
 #include "res.h"
 #include "hc.h"
-#include "root_hub.h"
 
 
@@ -159,6 +158,4 @@
 } else (void)0
 
-//	ret = rh_init(device, (uintptr_t)hc->registers + 0x10, 4,
-//	    ddf_fun_get_handle(hc_fun));
 	ret = hcd_ddf_setup_root_hub(device, USB_SPEED_FULL);
 	CHECK_RET_FINI_RETURN(ret,
Index: pace/drv/bus/usb/uhcirh/Makefile
===================================================================
--- uspace/drv/bus/usb/uhcirh/Makefile	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ 	(revision )
@@ -1,48 +1,0 @@
-#
-# Copyright (c) 2010 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.
-#
-
-USPACE_PREFIX = ../../../..
-
-LIBS = \
-	$(LIBUSBDEV_PREFIX)/libusbdev.a \
-	$(LIBUSB_PREFIX)/libusb.a \
-	$(LIBDRV_PREFIX)/libdrv.a
-
-EXTRA_CFLAGS += \
-	-I$(LIBUSB_PREFIX)/include \
-	-I$(LIBUSBDEV_PREFIX)/include \
-	-I$(LIBDRV_PREFIX)/include
-
-BINARY = uhcirh
-
-SOURCES = \
-	main.c \
-	port.c \
-	root_hub.c
-
-include $(USPACE_PREFIX)/Makefile.common
Index: pace/drv/bus/usb/uhcirh/main.c
===================================================================
--- uspace/drv/bus/usb/uhcirh/main.c	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ 	(revision )
@@ -1,165 +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 drvusbuhcirh
- * @{
- */
-/** @file
- * @brief UHCI root hub initialization routines
- */
-
-#include <ddf/driver.h>
-#include <devman.h>
-#include <device/hw_res_parsed.h>
-#include <errno.h>
-#include <str_error.h>
-
-#include <usb_iface.h>
-#include <usb/ddfiface.h>
-#include <usb/debug.h>
-
-#include "root_hub.h"
-
-#define NAME "uhcirh"
-
-static int hc_get_my_registers(ddf_dev_t *dev,
-    uintptr_t *io_reg_address, size_t *io_reg_size);
-
-static int uhci_rh_dev_add(ddf_dev_t *device);
-
-static driver_ops_t uhci_rh_driver_ops = {
-	.dev_add = uhci_rh_dev_add,
-};
-
-static driver_t uhci_rh_driver = {
-	.name = NAME,
-	.driver_ops = &uhci_rh_driver_ops
-};
-
-/** Initialize global driver structures (NONE).
- *
- * @param[in] argc Nmber of arguments in argv vector (ignored).
- * @param[in] argv Cmdline argument vector (ignored).
- * @return Error code.
- *
- * Driver debug level is set here.
- */
-int main(int argc, char *argv[])
-{
-	printf(NAME ": HelenOS UHCI root hub driver.\n");
-	log_init(NAME);
-	return ddf_driver_main(&uhci_rh_driver);
-}
-
-/** Initialize a new ddf driver instance of UHCI root hub.
- *
- * @param[in] device DDF instance of the device to initialize.
- * @return Error code.
- */
-static int uhci_rh_dev_add(ddf_dev_t *device)
-{
-	if (!device)
-		return EINVAL;
-
-	usb_log_debug2("uhci_rh_dev_add(handle=%" PRIun ")\n",
-	    ddf_dev_get_handle(device));
-
-	uintptr_t io_regs = 0;
-	size_t io_size = 0;
-	uhci_root_hub_t *rh = NULL;
-	int ret = EOK;
-
-#define CHECK_RET_FREE_RH_RETURN(ret, message...) \
-if (ret != EOK) { \
-	usb_log_error(message); \
-	return ret; \
-} else (void)0
-
-	ret = hc_get_my_registers(device, &io_regs, &io_size);
-	CHECK_RET_FREE_RH_RETURN(ret,
-	    "Failed to get registers from HC: %s.\n", str_error(ret));
-	usb_log_debug("I/O regs at %p (size %zuB).\n",
-	    (void *) io_regs, io_size);
-
-	rh = ddf_dev_data_alloc(device, sizeof(uhci_root_hub_t));
-	ret = (rh == NULL) ? ENOMEM : EOK;
-	CHECK_RET_FREE_RH_RETURN(ret,
-	    "Failed to allocate rh driver instance.\n");
-
-	ret = uhci_root_hub_init(rh, (void*)io_regs, io_size, device);
-	CHECK_RET_FREE_RH_RETURN(ret,
-	    "Failed(%d) to initialize rh driver instance: %s.\n",
-	    ret, str_error(ret));
-
-	usb_log_info("Controlling root hub '%s' (%" PRIun ").\n",
-	    ddf_dev_get_name(device), ddf_dev_get_handle(device));
-	return EOK;
-}
-
-/** Get address of I/O registers.
- *
- * @param[in] dev Device asking for the addresses.
- * @param[out] io_reg_address Base address of the memory range.
- * @param[out] io_reg_size Size of the memory range.
- * @return Error code.
- */
-int hc_get_my_registers(
-    ddf_dev_t *dev, uintptr_t *io_reg_address, size_t *io_reg_size)
-{
-	async_sess_t *parent_sess =
-	    devman_parent_device_connect(EXCHANGE_SERIALIZE,
-	    ddf_dev_get_handle(dev), IPC_FLAG_BLOCKING);
-	if (!parent_sess)
-		return ENOMEM;
-
-	hw_res_list_parsed_t hw_res;
-	hw_res_list_parsed_init(&hw_res);
-	const int ret =  hw_res_get_list_parsed(parent_sess, &hw_res, 0);
-	async_hangup(parent_sess);
-	if (ret != EOK) {
-		return ret;
-	}
-
-	if (hw_res.io_ranges.count != 1) {
-		hw_res_list_parsed_clean(&hw_res);
-		return EINVAL;
-	}
-
-	if (io_reg_address != NULL)
-		*io_reg_address = hw_res.io_ranges.ranges[0].address;
-
-	if (io_reg_size != NULL)
-		*io_reg_size = hw_res.io_ranges.ranges[0].size;
-
-	hw_res_list_parsed_clean(&hw_res);
-	return EOK;
-}
-
-/**
- * @}
- */
Index: pace/drv/bus/usb/uhcirh/port.c
===================================================================
--- uspace/drv/bus/usb/uhcirh/port.c	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ 	(revision )
@@ -1,386 +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 drvusbuhcirh
- * @{
- */
-/** @file
- * @brief UHCI root hub port routines
- */
-#include <ddi.h>
-#include <fibril_synch.h> /* async_usleep */
-#include <errno.h>
-#include <str_error.h>
-#include <async.h>
-
-#include <usb/usb.h>    /* usb_address_t */
-#include <usb/debug.h>
-
-#include "port.h"
-
-#define MAX_ERROR_COUNT 5
-
-static int uhci_port_check(void *port);
-static int uhci_port_reset_enable(void *arg);
-static int uhci_port_new_device(uhci_port_t *port, usb_speed_t speed);
-static int uhci_port_remove_device(uhci_port_t *port);
-static int uhci_port_set_enabled(uhci_port_t *port, bool enabled);
-static void uhci_port_print_status(
-    uhci_port_t *port, const port_status_t value);
-
-/** Register reading helper function.
- *
- * @param[in] port Structure to use.
- * @return Error code. (Always EOK)
- */
-static inline port_status_t uhci_port_read_status(uhci_port_t *port)
-{
-	assert(port);
-	return pio_read_16(port->address);
-}
-
-/** Register writing helper function.
- *
- * @param[in] port Structure to use.
- * @param[in] val New register value.
- * @return Error code. (Always EOK)
- */
-static inline void uhci_port_write_status(uhci_port_t *port, port_status_t val)
-{
-	assert(port);
-	pio_write_16(port->address, val);
-}
-
-/** Initialize UHCI root hub port instance.
- *
- * @param[in] port Memory structure to use.
- * @param[in] address Address of I/O register.
- * @param[in] number Port number.
- * @param[in] usec Polling interval.
- * @param[in] rh Pointer to ddf instance of the root hub driver.
- * @return Error code.
- *
- * Creates and starts the polling fibril.
- */
-int uhci_port_init(uhci_port_t *port,
-    port_status_t *address, unsigned number, unsigned usec, ddf_dev_t *rh)
-{
-	assert(port);
-	char *id_string;
-	asprintf(&id_string, "Port (%p - %u)", port, number);
-	if (id_string == NULL) {
-		return ENOMEM;
-	}
-
-	port->id_string = id_string;
-	port->address = address;
-	port->number = number;
-	port->wait_period_usec = usec;
-	port->attached_device.fun = NULL;
-	port->attached_device.address = -1;
-	port->rh = rh;
-
-	int ret =
-	    usb_hc_connection_initialize_from_device(&port->hc_connection, rh);
-	if (ret != EOK) {
-		usb_log_error("%s: failed to initialize connection to HC.",
-		    port->id_string);
-		free(id_string);
-		return ret;
-	}
-
-	port->checker = fibril_create(uhci_port_check, port);
-	if (port->checker == 0) {
-		usb_log_error("%s: failed to create polling fibril.",
-		    port->id_string);
-		free(id_string);
-		return ENOMEM;
-	}
-
-	fibril_add_ready(port->checker);
-	usb_log_debug("%s: Started polling fibril (%" PRIun ").\n",
-	    port->id_string, port->checker);
-	return EOK;
-}
-
-/** Cleanup UHCI root hub port instance.
- *
- * @param[in] port Memory structure to use.
- *
- * Stops the polling fibril.
- */
-void uhci_port_fini(uhci_port_t *port)
-{
-	assert(port);
-	free(port->id_string);
-	// TODO: Kill fibril here
-	return;
-}
-
-/** Periodically checks port status and reports new devices.
- *
- * @param[in] port Port structure to use.
- * @return Error code.
- */
-int uhci_port_check(void *port)
-{
-	uhci_port_t *instance = port;
-	assert(instance);
-
-	unsigned allowed_failures = MAX_ERROR_COUNT;
-#define CHECK_RET_FAIL(ret, msg...) \
-	if (ret != EOK) { \
-		usb_log_error(msg); \
-		if (!(allowed_failures-- > 0)) { \
-			usb_log_fatal( \
-			   "Maximum number of failures reached, " \
-			   "bailing out.\n"); \
-			return ret; \
-		} \
-		continue; \
-	} else (void)0
-
-	while (1) {
-		async_usleep(instance->wait_period_usec);
-
-		/* Read register value */
-		const port_status_t port_status =
-		    uhci_port_read_status(instance);
-
-		/* Print the value if it's interesting */
-		if (port_status & ~STATUS_ALWAYS_ONE)
-			uhci_port_print_status(instance, port_status);
-
-		if ((port_status & STATUS_CONNECTED_CHANGED) == 0)
-			continue;
-
-		usb_log_debug("%s: Connected change detected: %x.\n",
-		    instance->id_string, port_status);
-
-		int ret = usb_hc_connection_open(&instance->hc_connection);
-		CHECK_RET_FAIL(ret, "%s: Failed to connect to HC %s.\n",
-		    instance->id_string, str_error(ret));
-
-		/* Remove any old device */
-		if (instance->attached_device.fun) {
-			uhci_port_remove_device(instance);
-		}
-
-		if ((port_status & STATUS_CONNECTED) != 0) {
-			/* New device, this will take care of WC bits */
-			const usb_speed_t speed =
-			    ((port_status & STATUS_LOW_SPEED) != 0) ?
-			    USB_SPEED_LOW : USB_SPEED_FULL;
-			uhci_port_new_device(instance, speed);
-		} else {
-			/* Write one to WC bits, to ack changes */
-			uhci_port_write_status(instance, port_status);
-			usb_log_debug("%s: status change ACK.\n",
-			    instance->id_string);
-		}
-
-		ret = usb_hc_connection_close(&instance->hc_connection);
-		CHECK_RET_FAIL(ret, "%s: Failed to disconnect from hc: %s.\n",
-		    instance->id_string, str_error(ret));
-	}
-	return EOK;
-}
-
-/** Callback for enabling port during adding a new device.
- *
- * @param portno Port number (unused).
- * @param arg Pointer to uhci_port_t of port with the new device.
- * @return Error code.
- *
- * Resets and enables the ub port.
- */
-int uhci_port_reset_enable(void *arg)
-{
-	uhci_port_t *port = arg;
-	assert(port);
-
-	usb_log_debug2("%s: new_device_enable_port.\n", port->id_string);
-
-	/*
-	 * Resets from root ports should be nominally 50ms (USB spec 7.1.7.3)
-	 */
-	{
-		usb_log_debug("%s: Reset Signal start.\n", port->id_string);
-		port_status_t port_status = uhci_port_read_status(port);
-		port_status |= STATUS_IN_RESET;
-		uhci_port_write_status(port, port_status);
-		async_usleep(50000);
-		port_status = uhci_port_read_status(port);
-		port_status &= ~STATUS_IN_RESET;
-		uhci_port_write_status(port, port_status);
-		while (uhci_port_read_status(port) & STATUS_IN_RESET);
-	}
-	/* PIO delay, should not be longer than 3ms as the device might
-	 * enter suspend state. */
-	udelay(10);
-	/* Enable the port. */
-	uhci_port_set_enabled(port, true);
-	return EOK;
-}
-
-/** Initialize and report connected device.
- *
- * @param[in] port Port structure to use.
- * @param[in] speed Detected speed.
- * @return Error code.
- *
- * Uses libUSB function to do the actual work.
- */
-int uhci_port_new_device(uhci_port_t *port, usb_speed_t speed)
-{
-	assert(port);
-
-	usb_log_debug("%s: Detected new device.\n", port->id_string);
-
-	int ret, count = MAX_ERROR_COUNT;
-	do {
-		ret = usb_hc_new_device_wrapper(port->rh, &port->hc_connection,
-		    speed, uhci_port_reset_enable, port,
-		    &port->attached_device.address, &port->attached_device.fun);
-	} while (ret != EOK && count-- > 0);
-
-	if (ret != EOK) {
-		usb_log_error("%s: Failed(%d) to add device: %s.\n",
-		    port->id_string, ret, str_error(ret));
-		uhci_port_set_enabled(port, false);
-		return ret;
-	}
-
-	usb_log_info("%s: New device, address %d (handle %" PRIun ").\n",
-	    port->id_string, port->attached_device.address,
-	    ddf_fun_get_handle(port->attached_device.fun));
-	return EOK;
-}
-
-/** Remove device.
- *
- * @param[in] port Port instance to use.
- * @return Error code.
- */
-int uhci_port_remove_device(uhci_port_t *port)
-{
-	assert(port);
-	/* There is nothing to remove. */
-	if (port->attached_device.fun == NULL) {
-		usb_log_warning("%s: Removed a ghost device.\n",
-		    port->id_string);
-		assert(port->attached_device.address == -1);
-		return EOK;
-	}
-
-	usb_log_debug("%s: Removing device.\n", port->id_string);
-
-	/* Stop driver first */
-	int ret = ddf_fun_unbind(port->attached_device.fun);
-	if (ret != EOK) {
-		usb_log_error("%s: Failed to remove child function: %s.\n",
-		   port->id_string, str_error(ret));
-		return ret;
-	}
-	ddf_fun_destroy(port->attached_device.fun);
-	port->attached_device.fun = NULL;
-
-	/* Driver stopped, free used address */
-	ret = usb_hub_unregister_device(&port->hc_connection,
-	    &port->attached_device);
-	if (ret != EOK) {
-		usb_log_error("%s: Failed to unregister address of removed "
-		    "device: %s.\n", port->id_string, str_error(ret));
-		return ret;
-	}
-	port->attached_device.address = -1;
-
-	usb_log_info("%s: Removed attached device.\n", port->id_string);
-	return EOK;
-}
-
-/** Enable or disable root hub port.
- *
- * @param[in] port Port structure to use.
- * @param[in] enabled Port status to set.
- * @return Error code. (Always EOK)
- */
-int uhci_port_set_enabled(uhci_port_t *port, bool enabled)
-{
-	assert(port);
-
-	/* Read register value */
-	port_status_t port_status = uhci_port_read_status(port);
-
-	/* Set enabled bit */
-	if (enabled) {
-		port_status |= STATUS_ENABLED;
-	} else {
-		port_status &= ~STATUS_ENABLED;
-	}
-
-	/* Write new value. */
-	uhci_port_write_status(port, port_status);
-
-	/* Wait for port to become enabled */
-	do {
-		port_status = uhci_port_read_status(port);
-	} while ((port_status & STATUS_CONNECTED) &&
-	    !(port_status & STATUS_ENABLED));
-
-	usb_log_debug("%s: %sabled port.\n",
-		port->id_string, enabled ? "En" : "Dis");
-	return EOK;
-}
-
-/** Print the port status value in a human friendly way
- *
- * @param[in] port Port structure to use.
- * @param[in] value Port register value to print.
- * @return Error code. (Always EOK)
- */
-void uhci_port_print_status(uhci_port_t *port, const port_status_t value)
-{
-	assert(port);
-	usb_log_debug2("%s Port status(%#x):%s%s%s%s%s%s%s%s%s%s%s.\n",
-	    port->id_string, value,
-	    (value & STATUS_SUSPEND) ? " SUSPENDED," : "",
-	    (value & STATUS_RESUME) ? " IN RESUME," : "",
-	    (value & STATUS_IN_RESET) ? " IN RESET," : "",
-	    (value & STATUS_LINE_D_MINUS) ? " VD-," : "",
-	    (value & STATUS_LINE_D_PLUS) ? " VD+," : "",
-	    (value & STATUS_LOW_SPEED) ? " LOWSPEED," : "",
-	    (value & STATUS_ENABLED_CHANGED) ? " ENABLED-CHANGE," : "",
-	    (value & STATUS_ENABLED) ? " ENABLED," : "",
-	    (value & STATUS_CONNECTED_CHANGED) ? " CONNECTED-CHANGE," : "",
-	    (value & STATUS_CONNECTED) ? " CONNECTED," : "",
-	    (value & STATUS_ALWAYS_ONE) ? " ALWAYS ONE" : " ERR: NO ALWAYS ONE"
-	);
-}
-/**
- * @}
- */
Index: pace/drv/bus/usb/uhcirh/port.h
===================================================================
--- uspace/drv/bus/usb/uhcirh/port.h	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ 	(revision )
@@ -1,78 +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 drvusbuhcirh
- * @{
- */
-/** @file
- * @brief UHCI root hub port routines
- */
-#ifndef DRV_UHCI_PORT_H
-#define DRV_UHCI_PORT_H
-
-#include <stdint.h>
-#include <fibril.h>
-#include <ddf/driver.h>
-#include <usb/hc.h> /* usb_hc_connection_t */
-#include <usb/dev/hub.h>
-
-typedef uint16_t port_status_t;
-#define STATUS_CONNECTED         (1 << 0)
-#define STATUS_CONNECTED_CHANGED (1 << 1)
-#define STATUS_ENABLED           (1 << 2)
-#define STATUS_ENABLED_CHANGED   (1 << 3)
-#define STATUS_LINE_D_PLUS       (1 << 4)
-#define STATUS_LINE_D_MINUS      (1 << 5)
-#define STATUS_RESUME            (1 << 6)
-#define STATUS_ALWAYS_ONE        (1 << 7)
-
-#define STATUS_LOW_SPEED (1 <<  8)
-#define STATUS_IN_RESET  (1 <<  9)
-#define STATUS_SUSPEND   (1 << 12)
-
-/** UHCI port structure */
-typedef struct uhci_port {
-	const char *id_string;
-	port_status_t *address;
-	unsigned number;
-	unsigned wait_period_usec;
-	usb_hc_connection_t hc_connection;
-	ddf_dev_t *rh;
-	usb_hub_attached_device_t attached_device;
-	fid_t checker;
-} uhci_port_t;
-
-int uhci_port_init(
-    uhci_port_t *port, port_status_t *address, unsigned number,
-    unsigned usec, ddf_dev_t *rh);
-
-void uhci_port_fini(uhci_port_t *port);
-
-#endif
-/**
- * @}
- */
Index: pace/drv/bus/usb/uhcirh/root_hub.c
===================================================================
--- uspace/drv/bus/usb/uhcirh/root_hub.c	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ 	(revision )
@@ -1,97 +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 drvusbuhcirh
- * @{
- */
-/** @file
- * @brief UHCI root hub driver
- */
-#include <errno.h>
-#include <str_error.h>
-#include <ddi.h>
-#include <usb/debug.h>
-
-#include "root_hub.h"
-
-/** Initialize UHCI root hub instance.
- *
- * @param[in] instance Driver memory structure to use.
- * @param[in] addr Address of I/O registers.
- * @param[in] size Size of available I/O space.
- * @param[in] rh Pointer to DDF instance of the root hub driver.
- * @return Error code.
- */
-int uhci_root_hub_init(
-  uhci_root_hub_t *instance, void *addr, size_t size, ddf_dev_t *rh)
-{
-	assert(instance);
-	assert(rh);
-
-	/* Allow access to root hub port registers */
-	assert(sizeof(port_status_t) * UHCI_ROOT_HUB_PORT_COUNT <= size);
-	port_status_t *regs;
-	int ret = pio_enable(addr, size, (void**)&regs);
-	if (ret < 0) {
-		usb_log_error(
-		    "Failed(%d) to gain access to port registers at %p: %s.\n",
-		    ret, regs, str_error(ret));
-		return ret;
-	}
-
-	/* Initialize root hub ports */
-	unsigned i = 0;
-	for (; i < UHCI_ROOT_HUB_PORT_COUNT; ++i) {
-		ret = uhci_port_init(
-		    &instance->ports[i], &regs[i], i, ROOT_HUB_WAIT_USEC, rh);
-		if (ret != EOK) {
-			unsigned j = 0;
-			for (;j < i; ++j)
-				uhci_port_fini(&instance->ports[j]);
-			return ret;
-		}
-	}
-
-	return EOK;
-}
-
-/** Cleanup UHCI root hub instance.
- *
- * @param[in] instance Root hub structure to use.
- */
-void uhci_root_hub_fini(uhci_root_hub_t* instance)
-{
-	assert(instance);
-	unsigned i = 0;
-	for (; i < UHCI_ROOT_HUB_PORT_COUNT; ++i) {
-		uhci_port_fini(&instance->ports[i]);
-	}
-}
-
-/**
- * @}
- */
Index: pace/drv/bus/usb/uhcirh/root_hub.h
===================================================================
--- uspace/drv/bus/usb/uhcirh/root_hub.h	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ 	(revision )
@@ -1,57 +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 drvusbuhcirh
- * @{
- */
-/** @file
- * @brief UHCI driver
- */
-#ifndef DRV_UHCI_ROOT_HUB_H
-#define DRV_UHCI_ROOT_HUB_H
-
-#include <ddf/driver.h>
-
-#include "port.h"
-
-#define UHCI_ROOT_HUB_PORT_COUNT 2
-#define ROOT_HUB_WAIT_USEC 250000 /* 250 miliseconds */
-
-/** UHCI root hub drvier structure */
-typedef struct root_hub {
-	/** Ports provided by the hub */
-	uhci_port_t ports[UHCI_ROOT_HUB_PORT_COUNT];
-} uhci_root_hub_t;
-
-int uhci_root_hub_init(
-    uhci_root_hub_t *instance, void *addr, size_t size, ddf_dev_t *rh);
-
-void uhci_root_hub_fini(uhci_root_hub_t *instance);
-#endif
-/**
- * @}
- */
Index: pace/drv/bus/usb/uhcirh/uhcirh.ma
===================================================================
--- uspace/drv/bus/usb/uhcirh/uhcirh.ma	(revision 3848feca7c69c1204d692083bc06624cce7aa7f1)
+++ 	(revision )
@@ -1,1 +1,0 @@
-10 usb&uhci&root-hub
