Index: uspace/drv/platform/mac/mac.c
===================================================================
--- uspace/drv/platform/mac/mac.c	(revision e27e36e1fb9699de71e9900d126082ea33f88bc2)
+++ uspace/drv/platform/mac/mac.c	(revision 81b9d3ed6af6996e5039aa44755f6f7a9b396e2f)
@@ -1,4 +1,5 @@
 /*
  * Copyright (c) 2011 Martin Decky
+ * Copyright (c) 2017 Jiri Svoboda
  * All rights reserved.
  *
@@ -40,4 +41,5 @@
 #include <errno.h>
 #include <ops/hw_res.h>
+#include <ops/pio_window.h>
 #include <stdio.h>
 #include <sysinfo.h>
@@ -47,7 +49,8 @@
 typedef struct {
 	hw_resource_list_t hw_resources;
+	pio_window_t pio_window;
 } mac_fun_t;
 
-static hw_resource_t adb_regs[] = {
+static hw_resource_t adb_res[] = {
 	{
 		.type = IO_RANGE,
@@ -55,6 +58,12 @@
 			.address = 0,
 			.size = 0x2000,
-			.relative = false,
+			.relative = true,
 			.endianness = BIG_ENDIAN
+		}
+	},
+	{
+		.type = INTERRUPT,
+		.res.interrupt = {
+			.irq = 0 /* patched at run time */
 		}
 	},
@@ -63,6 +72,12 @@
 static mac_fun_t adb_data = {
 	.hw_resources = {
-		1,
-		adb_regs
+		sizeof(adb_res) / sizeof(adb_res[0]),
+		adb_res
+	},
+	.pio_window = {
+		.io = {
+			.base = 0, /* patched at run time */
+			.size = 0x2000
+		}
 	}
 };
@@ -99,7 +114,13 @@
 
 /** Obtain function soft-state from DDF function node */
-static mac_fun_t *mac_fun(ddf_fun_t *fnode)
-{
-	return ddf_fun_data_get(fnode);
+static mac_fun_t *mac_fun(ddf_fun_t *ddf_fun)
+{
+	return ddf_fun_data_get(ddf_fun);
+}
+
+static pio_window_t *mac_get_pio_window(ddf_fun_t *ddf_fun)
+{
+	mac_fun_t *fun = mac_fun(ddf_fun);
+	return &fun->pio_window;
 }
 
@@ -159,4 +180,5 @@
 	int rc;
 	uintptr_t cuda_physical;
+	sysarg_t cuda_inr;
 #if 0
 	/* Register functions */
@@ -171,6 +193,10 @@
 	if (rc != EOK)
 		return EIO;
-
-	adb_regs[0].res.io_range.address = cuda_physical;
+	rc = sysinfo_get_value("cuda.inr", &cuda_inr);
+	if (rc != EOK)
+		return EIO;
+
+	adb_data.pio_window.io.base = cuda_physical;
+	adb_res[1].res.interrupt.irq = cuda_inr;
 
 	if (!mac_add_fun(dev, "adb", "cuda_adb", &adb_data)) {
@@ -208,4 +234,8 @@
 }
 
+static pio_window_ops_t fun_pio_window_ops = {
+        .get_pio_window = &mac_get_pio_window
+};
+
 static hw_res_ops_t fun_hw_res_ops = {
    	.get_resource_list = &mac_get_resources,
@@ -218,4 +248,5 @@
 	ddf_log_init(NAME);
 	mac_fun_ops.interfaces[HW_RES_DEV_IFACE] = &fun_hw_res_ops;
+	mac_fun_ops.interfaces[PIO_WINDOW_DEV_IFACE] = &fun_pio_window_ops;
 	return ddf_driver_main(&mac_driver);
 }
