Index: .bzrignore
===================================================================
--- .bzrignore	(revision 1974f56a0dc7b5508a418fa32f07674e63f0a46b)
+++ .bzrignore	(revision a416d070e73ee834d63f21236a755f5a56114201)
@@ -1,3 +1,2 @@
-*.ag.probe.[cs]
 *.disasm
 *.la
@@ -205,4 +204,6 @@
 uspace/dist/drv/hdaudio/
 uspace/dist/drv/i8042/
+uspace/dist/drv/icp/
+uspace/dist/drv/icp-ic/
 uspace/dist/drv/isa/
 uspace/dist/drv/kfb/
@@ -212,4 +213,5 @@
 uspace/dist/drv/pc/
 uspace/dist/drv/pciintel/
+uspace/dist/drv/pl050/
 uspace/dist/drv/ps2mouse/
 uspace/dist/drv/root/
@@ -274,4 +276,5 @@
 uspace/drv/block/ata_bd/ata_bd
 uspace/drv/block/ddisk/ddisk
+uspace/drv/bus/adb/cuda_adb/cuda_adb
 uspace/drv/bus/isa/isa
 uspace/drv/bus/pci/pciintel/pciintel
@@ -293,4 +296,5 @@
 uspace/drv/fb/amdm37x_dispc/amdm37x_dispc
 uspace/drv/fb/kfb/kfb
+uspace/drv/intctl/icp-ic/icp-ic
 uspace/drv/nic/ar9271/ar9271
 uspace/drv/nic/e1k/e1k
@@ -318,4 +322,8 @@
 uspace/lib/c/arch/amd64/include/libarch/fibril_context.h
 uspace/lib/c/arch/amd64/include/libarch/istate_struct.h
+uspace/lib/c/arch/arm32/_link-dlexe.ld
+uspace/lib/c/arch/arm32/_link-loader.ld
+uspace/lib/c/arch/arm32/_link-shlib.ld
+uspace/lib/c/arch/arm32/_link.ld
 uspace/lib/c/arch/arm32/include/libarch/fibril_context.h
 uspace/lib/c/arch/arm32/include/libarch/istate_struct.h
@@ -376,5 +384,4 @@
 uspace/srv/hw/irc/apic/apic
 uspace/srv/hw/irc/i8259/i8259
-uspace/srv/hw/irc/icp-ic/icp-ic
 uspace/srv/hw/irc/obio/obio
 uspace/srv/klog/klog
Index: boot/arch/arm32/Makefile.inc
===================================================================
--- boot/arch/arm32/Makefile.inc	(revision 1974f56a0dc7b5508a418fa32f07674e63f0a46b)
+++ boot/arch/arm32/Makefile.inc	(revision a416d070e73ee834d63f21236a755f5a56114201)
@@ -76,7 +76,6 @@
 		char/atkbd \
 		char/ps2mouse \
+		intctl/icp-ic \
 		platform/icp
-	RD_SRVS_ESSENTIAL += \
-		$(USPACE_PATH)/srv/hw/irc/icp-ic/icp-ic
 endif
 
Index: uspace/Makefile
===================================================================
--- uspace/Makefile	(revision 1974f56a0dc7b5508a418fa32f07674e63f0a46b)
+++ uspace/Makefile	(revision a416d070e73ee834d63f21236a755f5a56114201)
@@ -137,5 +137,4 @@
 	srv/hw/irc/apic \
 	srv/hw/irc/i8259 \
-	srv/hw/irc/icp-ic \
 	srv/hw/irc/obio \
 	srv/hid/rfb \
@@ -170,4 +169,5 @@
 	drv/fb/amdm37x_dispc \
 	drv/fb/kfb \
+	drv/intctl/icp-ic \
 	drv/nic/ne2k \
 	drv/nic/e1k \
Index: uspace/app/init/init.c
===================================================================
--- uspace/app/init/init.c	(revision 1974f56a0dc7b5508a418fa32f07674e63f0a46b)
+++ uspace/app/init/init.c	(revision a416d070e73ee834d63f21236a755f5a56114201)
@@ -340,5 +340,4 @@
 	srv_start("/srv/apic");
 	srv_start("/srv/i8259");
-	srv_start("/srv/icp-ic");
 	srv_start("/srv/obio");
 	srv_start("/srv/s3c24xx_uart");
Index: uspace/drv/intctl/icp-ic/Makefile
===================================================================
--- uspace/drv/intctl/icp-ic/Makefile	(revision a416d070e73ee834d63f21236a755f5a56114201)
+++ uspace/drv/intctl/icp-ic/Makefile	(revision a416d070e73ee834d63f21236a755f5a56114201)
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2014 Jiri Svoboda
+# 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 = $(LIBDRV_PREFIX)/libdrv.a
+EXTRA_CFLAGS += -I$(LIBDRV_PREFIX)/include
+BINARY = icp-ic
+
+SOURCES = \
+	icp-ic.c \
+	main.c
+
+include $(USPACE_PREFIX)/Makefile.common
Index: uspace/drv/intctl/icp-ic/icp-ic.c
===================================================================
--- uspace/drv/intctl/icp-ic/icp-ic.c	(revision a416d070e73ee834d63f21236a755f5a56114201)
+++ uspace/drv/intctl/icp-ic/icp-ic.c	(revision a416d070e73ee834d63f21236a755f5a56114201)
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2014 Jiri Svoboda
+ * 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 icp-ic
+ * @{
+ */
+
+/**
+ * @file icp-ic.c
+ * @brief IntegratorCP interrupt controller driver
+ */
+
+#include <async.h>
+#include <bitops.h>
+#include <ddi.h>
+#include <ddf/log.h>
+#include <errno.h>
+#include <ipc/irc.h>
+#include <loc.h>
+#include <stdint.h>
+
+#include "icp-ic.h"
+#include "icp-ic_hw.h"
+
+enum {
+	icpic_max_irq = 32
+};
+
+static int icpic_enable_irq(icpic_t *icpic, sysarg_t irq)
+{
+	if (irq > icpic_max_irq)
+		return EINVAL;
+
+	ddf_msg(LVL_NOTE, "Enable IRQ %zu", irq);
+
+	pio_write_32(&icpic->regs->irq_enableset, BIT_V(uint32_t, irq));
+	return EOK;
+}
+
+/** Client connection handler.
+ *
+ * @param iid   Hash of the request that opened the connection.
+ * @param icall Call data of the request that opened the connection.
+ * @param arg	Local argument.
+ */
+static void icpic_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
+{
+	ipc_callid_t callid;
+	ipc_call_t call;
+	icpic_t *icpic;
+
+	/*
+	 * Answer the first IPC_M_CONNECT_ME_TO call.
+	 */
+	async_answer_0(iid, EOK);
+
+	icpic = (icpic_t *)ddf_dev_data_get(ddf_fun_get_dev((ddf_fun_t *)arg));
+
+	while (true) {
+		callid = async_get_call(&call);
+
+		if (!IPC_GET_IMETHOD(call)) {
+			/* The other side has hung up. */
+			async_answer_0(callid, EOK);
+			return;
+		}
+
+		switch (IPC_GET_IMETHOD(call)) {
+		case IRC_ENABLE_INTERRUPT:
+			async_answer_0(callid,
+			    icpic_enable_irq(icpic, IPC_GET_ARG1(call)));
+			break;
+		case IRC_DISABLE_INTERRUPT:
+			/* XXX TODO */
+			async_answer_0(callid, EOK);
+			break;
+		case IRC_CLEAR_INTERRUPT:
+			/* Noop */
+			async_answer_0(callid, EOK);
+			break;
+		default:
+			async_answer_0(callid, EINVAL);
+			break;
+		}
+	}
+}
+
+/** Add icp-ic device. */
+int icpic_add(icpic_t *icpic, icpic_res_t *res)
+{
+	ddf_fun_t *fun_a = NULL;
+	void *regs;
+	int rc;
+
+	rc = pio_enable((void *)res->base, sizeof(icpic_regs_t), &regs);
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Error enabling PIO");
+		goto error;
+	}
+
+	icpic->regs = (icpic_regs_t *)regs;
+
+	fun_a = ddf_fun_create(icpic->dev, fun_exposed, "a");
+	if (fun_a == NULL) {
+		ddf_msg(LVL_ERROR, "Failed creating function 'a'.");
+		rc = ENOMEM;
+		goto error;
+	}
+
+	ddf_fun_set_conn_handler(fun_a, icpic_connection);
+
+	rc = ddf_fun_bind(fun_a);
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed binding function 'a'. (%d)", rc);
+		goto error;
+	}
+
+	rc = ddf_fun_add_to_category(fun_a, "irc");
+	if (rc != EOK)
+		goto error;
+
+	return EOK;
+error:
+	if (fun_a != NULL)
+		ddf_fun_destroy(fun_a);
+	return rc;
+}
+
+/** Remove icp-ic device */
+int icpic_remove(icpic_t *icpic)
+{
+	return ENOTSUP;
+}
+
+/** icp-ic device gone */
+int icpic_gone(icpic_t *icpic)
+{
+	return ENOTSUP;
+}
+
+/**
+ * @}
+ */
Index: uspace/drv/intctl/icp-ic/icp-ic.h
===================================================================
--- uspace/drv/intctl/icp-ic/icp-ic.h	(revision a416d070e73ee834d63f21236a755f5a56114201)
+++ uspace/drv/intctl/icp-ic/icp-ic.h	(revision a416d070e73ee834d63f21236a755f5a56114201)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2017 Jiri Svoboda
+ * 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 genarch
+ * @{
+ */
+/** @file
+ */
+
+#ifndef ICP_IC_H_
+#define ICP_IC_H
+
+#include <ddf/driver.h>
+#include <loc.h>
+#include <stdint.h>
+
+#include "icp-ic_hw.h"
+
+typedef struct {
+	uintptr_t base;
+} icpic_res_t;
+
+/** IntegratorCP Interrupt Controller */
+typedef struct {
+	icpic_regs_t *regs;
+	uintptr_t phys_base;
+	ddf_dev_t *dev;
+} icpic_t;
+
+extern int icpic_add(icpic_t *, icpic_res_t *);
+extern int icpic_remove(icpic_t *);
+extern int icpic_gone(icpic_t *);
+
+#endif
+
+/** @}
+ */
Index: uspace/drv/intctl/icp-ic/icp-ic.ma
===================================================================
--- uspace/drv/intctl/icp-ic/icp-ic.ma	(revision a416d070e73ee834d63f21236a755f5a56114201)
+++ uspace/drv/intctl/icp-ic/icp-ic.ma	(revision a416d070e73ee834d63f21236a755f5a56114201)
@@ -0,0 +1,1 @@
+10 integratorcp/intctl
Index: uspace/drv/intctl/icp-ic/icp-ic_hw.h
===================================================================
--- uspace/drv/intctl/icp-ic/icp-ic_hw.h	(revision a416d070e73ee834d63f21236a755f5a56114201)
+++ uspace/drv/intctl/icp-ic/icp-ic_hw.h	(revision a416d070e73ee834d63f21236a755f5a56114201)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2014 Jiri Svoboda
+ * 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 pl050
+ * @{
+ */
+/** @file ARM PrimeCell PS2 Keyboard/Mouse Interface (PL050) registers
+ */
+
+#ifndef ICP_IC_HW_H
+#define ICP_IC_HW_H
+
+#include <ddi.h>
+
+typedef struct {
+	ioport32_t irq_status;
+	ioport32_t irq_rawstat;
+	ioport32_t irq_enableset;
+	ioport32_t irq_enableclr;
+	ioport32_t int_softset;
+	ioport32_t int_softclr;
+	ioport32_t fiq_status;
+	ioport32_t fiq_rawstat;
+	ioport32_t fiq_enableset;
+	ioport32_t fiq_enableclr;
+} icpic_regs_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/drv/intctl/icp-ic/main.c
===================================================================
--- uspace/drv/intctl/icp-ic/main.c	(revision a416d070e73ee834d63f21236a755f5a56114201)
+++ uspace/drv/intctl/icp-ic/main.c	(revision a416d070e73ee834d63f21236a755f5a56114201)
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2017 Jiri Svoboda
+ * 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 genarch
+ * @{
+ */
+/** @file IntegratorCP Interrupt Controller driver
+ */
+
+#include <ddf/driver.h>
+#include <ddf/log.h>
+#include <device/hw_res_parsed.h>
+#include <errno.h>
+#include <stdio.h>
+
+#include "icp-ic.h"
+
+#define NAME  "icp-ic"
+
+static int icpic_dev_add(ddf_dev_t *dev);
+static int icpic_dev_remove(ddf_dev_t *dev);
+static int icpic_dev_gone(ddf_dev_t *dev);
+static int icpic_fun_online(ddf_fun_t *fun);
+static int icpic_fun_offline(ddf_fun_t *fun);
+
+static driver_ops_t driver_ops = {
+	.dev_add = icpic_dev_add,
+	.dev_remove = icpic_dev_remove,
+	.dev_gone = icpic_dev_gone,
+	.fun_online = icpic_fun_online,
+	.fun_offline = icpic_fun_offline
+};
+
+static driver_t icpic_driver = {
+	.name = NAME,
+	.driver_ops = &driver_ops
+};
+
+static int icpic_get_res(ddf_dev_t *dev, icpic_res_t *res)
+{
+	async_sess_t *parent_sess;
+	hw_res_list_parsed_t hw_res;
+	int rc;
+
+	parent_sess = ddf_dev_parent_sess_get(dev);
+	if (parent_sess == NULL)
+		return ENOMEM;
+
+	hw_res_list_parsed_init(&hw_res);
+	rc = hw_res_get_list_parsed(parent_sess, &hw_res, 0);
+	if (rc != EOK)
+		return rc;
+
+	if (hw_res.mem_ranges.count != 1) {
+		rc = EINVAL;
+		goto error;
+	}
+
+	res->base = RNGABS(hw_res.mem_ranges.ranges[0]);
+
+	return EOK;
+error:
+	hw_res_list_parsed_clean(&hw_res);
+	return rc;
+}
+
+static int icpic_dev_add(ddf_dev_t *dev)
+{
+	icpic_t *icpic;
+	icpic_res_t icpic_res;
+	int rc;
+
+        ddf_msg(LVL_DEBUG, "icpic_dev_add(%p)", dev);
+	icpic = ddf_dev_data_alloc(dev, sizeof(icpic_t));
+	if (icpic == NULL) {
+		ddf_msg(LVL_ERROR, "Failed allocating soft state.");
+		return ENOMEM;
+	}
+
+	icpic->dev = dev;
+
+	rc = icpic_get_res(dev, &icpic_res);
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed getting hardware resource list.\n");
+		return EIO;
+	}
+
+	return icpic_add(icpic, &icpic_res);
+}
+
+static int icpic_dev_remove(ddf_dev_t *dev)
+{
+        icpic_t *icpic = (icpic_t *)ddf_dev_data_get(dev);
+
+        ddf_msg(LVL_DEBUG, "icpic_dev_remove(%p)", dev);
+
+        return icpic_remove(icpic);
+}
+
+static int icpic_dev_gone(ddf_dev_t *dev)
+{
+        icpic_t *icpic = (icpic_t *)ddf_dev_data_get(dev);
+
+        ddf_msg(LVL_DEBUG, "icpic_dev_gone(%p)", dev);
+
+        return icpic_gone(icpic);
+}
+
+static int icpic_fun_online(ddf_fun_t *fun)
+{
+        ddf_msg(LVL_DEBUG, "icpic_fun_online()");
+        return ddf_fun_online(fun);
+}
+
+static int icpic_fun_offline(ddf_fun_t *fun)
+{
+        ddf_msg(LVL_DEBUG, "icpic_fun_offline()");
+        return ddf_fun_offline(fun);
+}
+
+int main(int argc, char *argv[])
+{
+	printf(NAME ": IntegratorCP Interrupt Controller driver\n");
+	ddf_log_init(NAME);
+	return ddf_driver_main(&icpic_driver);
+}
+
+/** @}
+ */
Index: uspace/drv/platform/icp/icp.c
===================================================================
--- uspace/drv/platform/icp/icp.c	(revision 1974f56a0dc7b5508a418fa32f07674e63f0a46b)
+++ uspace/drv/platform/icp/icp.c	(revision a416d070e73ee834d63f21236a755f5a56114201)
@@ -54,5 +54,6 @@
 	icp_kbd_irq = 3,
 	icp_mouse_base = 0x19000000,
-	icp_mouse_irq = 4
+	icp_mouse_irq = 4,
+	icp_ic_base = 0x14000000
 };
 
@@ -108,4 +109,16 @@
 };
 
+static hw_resource_t icp_ic_res[] = {
+	{
+		.type = MEM_RANGE,
+		.res.mem_range = {
+			.address = icp_ic_base,
+			.size = 40,
+			.relative = false,
+			.endianness = LITTLE_ENDIAN
+		}
+	}
+};
+
 static pio_window_t icp_pio_window = {
 	.mem = {
@@ -126,4 +139,11 @@
 		sizeof(icp_mouse_res) / sizeof(icp_mouse_res[0]),
 		icp_mouse_res
+	},
+};
+
+static icp_fun_t icp_ic_fun_proto = {
+	.hw_resources = {
+		sizeof(icp_ic_res) / sizeof(icp_ic_res[0]),
+		icp_ic_res
 	},
 };
@@ -267,4 +287,9 @@
 		return rc;
 
+	rc = icp_add_fun(dev, "intctl", "integratorcp/intctl",
+	    &icp_ic_fun_proto);
+	if (rc != EOK)
+		return rc;
+
 	return EOK;
 }
Index: pace/srv/hw/irc/icp-ic/Makefile
===================================================================
--- uspace/srv/hw/irc/icp-ic/Makefile	(revision 1974f56a0dc7b5508a418fa32f07674e63f0a46b)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#
-# Copyright (c) 2014 Jiri Svoboda
-# 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 = ../../../..
-BINARY = icp-ic
-
-SOURCES = \
-	icp-ic.c
-
-include $(USPACE_PREFIX)/Makefile.common
Index: pace/srv/hw/irc/icp-ic/icp-ic.c
===================================================================
--- uspace/srv/hw/irc/icp-ic/icp-ic.c	(revision 1974f56a0dc7b5508a418fa32f07674e63f0a46b)
+++ 	(revision )
@@ -1,219 +1,0 @@
-/*
- * Copyright (c) 2014 Jiri Svoboda
- * 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 icp-ic
- * @{
- */
-
-/**
- * @file icp-ic.c
- * @brief IntegratorCP interrupt controller driver.
- */
-
-#include <async.h>
-#include <bitops.h>
-#include <ddi.h>
-#include <errno.h>
-#include <io/log.h>
-#include <ipc/irc.h>
-#include <loc.h>
-#include <sysinfo.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <str.h>
-
-#include "icp-ic_hw.h"
-
-#define NAME  "icp-ic"
-
-enum {
-	icp_pic_base = 0x14000000,
-	icpic_max_irq = 32
-};
-
-static icpic_regs_t *icpic_regs;
-
-static int icpic_enable_irq(sysarg_t irq)
-{
-	if (irq > icpic_max_irq)
-		return EINVAL;
-
-	log_msg(LOG_DEFAULT, LVL_NOTE, "Enable IRQ %zu", irq);
-
-	pio_write_32(&icpic_regs->irq_enableset, BIT_V(uint32_t, irq));
-	return EOK;
-}
-
-/** Handle one connection to i8259.
- *
- * @param iid   Hash of the request that opened the connection.
- * @param icall Call data of the request that opened the connection.
- * @param arg	Local argument.
- */
-static void icpic_connection(ipc_callid_t iid, ipc_call_t *icall, void *arg)
-{
-	ipc_callid_t callid;
-	ipc_call_t call;
-
-	/*
-	 * Answer the first IPC_M_CONNECT_ME_TO call.
-	 */
-	async_answer_0(iid, EOK);
-
-	while (true) {
-		callid = async_get_call(&call);
-
-		if (!IPC_GET_IMETHOD(call)) {
-			/* The other side has hung up. */
-			async_answer_0(callid, EOK);
-			return;
-		}
-
-		switch (IPC_GET_IMETHOD(call)) {
-		case IRC_ENABLE_INTERRUPT:
-			async_answer_0(callid,
-			    icpic_enable_irq(IPC_GET_ARG1(call)));
-			break;
-		case IRC_DISABLE_INTERRUPT:
-			/* XXX TODO */
-			async_answer_0(callid, EOK);
-			break;
-		case IRC_CLEAR_INTERRUPT:
-			/* Noop */
-			async_answer_0(callid, EOK);
-			break;
-		default:
-			async_answer_0(callid, EINVAL);
-			break;
-		}
-	}
-}
-
-static int icpic_init(void)
-{
-	char *platform = NULL;
-	char *pstr = NULL;
-	size_t platform_size;
-	category_id_t irc_cat;
-	service_id_t svc_id;
-	void *regs;
-	int rc;
-
-	platform = sysinfo_get_data("platform", &platform_size);
-	if (platform == NULL) {
-		log_msg(LOG_DEFAULT, LVL_ERROR, "Error getting platform type.");
-		rc = ENOENT;
-		goto error;
-	}
-
-	pstr = str_ndup(platform, platform_size);
-	if (pstr == NULL) {
-		log_msg(LOG_DEFAULT, LVL_ERROR, "Out of memory.");
-		rc = ENOMEM;
-		goto error;
-	}
-
-	if (str_cmp(pstr, "integratorcp") != 0) {
-		log_msg(LOG_DEFAULT, LVL_ERROR, "Platform '%s' is not 'integratorcp'.",
-
-		    pstr);
-		rc = ENOENT;
-		goto error;
-	}
-
-	rc = pio_enable((void *)icp_pic_base, sizeof(icpic_regs_t), &regs);
-	if (rc != EOK) {
-		log_msg(LOG_DEFAULT, LVL_ERROR, "Error enabling PIO");
-		goto error;
-	}
-
-	icpic_regs = (icpic_regs_t *)regs;
-
-	async_set_fallback_port_handler(icpic_connection, NULL);
-
-	rc = loc_server_register(NAME);
-	if (rc != EOK) {
-		printf("%s: Failed registering server. (%d)\n", NAME, rc);
-		return rc;
-	}
-
-	rc = loc_service_register("irc/" NAME, &svc_id);
-	if (rc != EOK) {
-		printf("%s: Failed registering service. (%d)\n", NAME, rc);
-		return rc;
-	}
-
-	rc = loc_category_get_id("irc", &irc_cat, IPC_FLAG_BLOCKING);
-	if (rc != EOK) {
-		printf("%s: Failed resolving category 'iplink' (%d).\n", NAME,
-		    rc);
-		goto error;
-	}
-
-	rc = loc_service_add_to_cat(svc_id, irc_cat);
-	if (rc != EOK) {
-		printf("%s: Failed adding service to category (%d).\n", NAME,
-		    rc);
-		goto error;
-	}
-
-	free(platform);
-	free(pstr);
-	return EOK;
-error:
-	free(platform);
-	free(pstr);
-	return rc;
-}
-
-int main(int argc, char **argv)
-{
-	int rc;
-
-	printf("%s: HelenOS IntegratorCP interrupt controller driver\n", NAME);
-
-	rc = log_init(NAME);
-	if (rc != EOK) {
-		printf(NAME ": Error connecting logging service.");
-		return 1;
-	}
-
-	if (icpic_init() != EOK)
-		return -1;
-
-	log_msg(LOG_DEFAULT, LVL_NOTE, "%s: Accepting connections\n", NAME);
-	task_retval(0);
-	async_manager();
-
-	/* Not reached */
-	return 0;
-}
-
-/**
- * @}
- */
Index: pace/srv/hw/irc/icp-ic/icp-ic_hw.h
===================================================================
--- uspace/srv/hw/irc/icp-ic/icp-ic_hw.h	(revision 1974f56a0dc7b5508a418fa32f07674e63f0a46b)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*
- * Copyright (c) 2014 Jiri Svoboda
- * 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 pl050
- * @{
- */
-/** @file ARM PrimeCell PS2 Keyboard/Mouse Interface (PL050) registers
- */
-
-#ifndef ICP_IC_HW_H
-#define ICP_IC_HW_H
-
-#include <ddi.h>
-
-typedef struct {
-	ioport32_t irq_status;
-	ioport32_t irq_rawstat;
-	ioport32_t irq_enableset;
-	ioport32_t irq_enableclr;
-	ioport32_t int_softset;
-	ioport32_t int_softclr;
-	ioport32_t fiq_status;
-	ioport32_t fiq_rawstat;
-	ioport32_t fiq_enableset;
-	ioport32_t fiq_enableclr;
-} icpic_regs_t;
-
-#endif
-
-/** @}
- */
