Index: uspace/drv/time/cmos-rtc/cmos-rtc.c
===================================================================
--- uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision 9d5003e0f816430ba9693082ce5c26efe82871d8)
+++ uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision c47f1b6e25f3099ff848280a7602a84c57ee0670)
@@ -55,4 +55,6 @@
 	/** The fibril mutex for synchronizing the access to the device */
 	fibril_mutex_t mutex;
+	/** The base I/O address of the device registers */
+	uint32_t io_addr;
 } rtc_t;
 
@@ -76,5 +78,5 @@
 static driver_ops_t rtc_ops = {
 	.dev_add = rtc_dev_add,
-	.dev_remove = NULL,
+	.dev_remove = NULL, /* XXX */
 };
 
@@ -97,9 +99,9 @@
 	ddf_log_init(NAME, LVL_ERROR);
 
-	rtc_dev_ops.open = NULL;
-	rtc_dev_ops.close = NULL;
+	rtc_dev_ops.open = NULL; /* XXX */
+	rtc_dev_ops.close = NULL; /* XXX */
 
 	rtc_dev_ops.interfaces[CLOCK_DEV_IFACE] = &rtc_clock_dev_ops;
-	rtc_dev_ops.default_handler = NULL;
+	rtc_dev_ops.default_handler = NULL; /* XXX */
 }
 
@@ -113,5 +115,9 @@
 rtc_dev_initialize(rtc_t *rtc)
 {
+	/* XXX Do cleanup in case of failure */
 	int rc;
+	size_t i;
+	hw_resource_t *res;
+	bool ioport = false;
 
 	ddf_msg(LVL_DEBUG, "rtc_dev_initialize %s", rtc->dev->name);
@@ -138,4 +144,24 @@
 	}
 
+	for (i = 0; i < hw_resources.count; ++i) {
+		res = &hw_resources.resources[i];
+
+		if (res->type == IO_RANGE) {
+			rtc->io_addr = res->res.io_range.address;
+			ioport = true;
+			ddf_msg(LVL_NOTE, "Device %s was assigned I/O address \
+			    0x%x", rtc->dev->name, rtc->io_addr);
+		}
+	}
+
+	if (!ioport) {
+		/* No I/O address assigned to this device */
+		ddf_msg(LVL_ERROR, "Missing HW resource for device %s",
+		    rtc->dev->name);
+		return ENOENT;
+	}
+
+	hw_res_clean_resource_list(&hw_resources);
+
 	return EOK;
 }
