Index: kernel/generic/include/ddi/ddi.h
===================================================================
--- kernel/generic/include/ddi/ddi.h	(revision df4ed852a2d1b242f9bdce0a873009a2cb77cec7)
+++ kernel/generic/include/ddi/ddi.h	(revision 0b3a78fec9fcd0f2d1ba2ad32efec95c4ad2cfdf)
@@ -38,5 +38,5 @@
 #include <ddi/ddi_arg.h>
 #include <arch/types.h>
-#include <typedefs.h>
+#include <proc/task.h>
 
 /** Structure representing contiguous physical memory area. */
Index: kernel/generic/include/ddi/device.h
===================================================================
--- kernel/generic/include/ddi/device.h	(revision df4ed852a2d1b242f9bdce0a873009a2cb77cec7)
+++ kernel/generic/include/ddi/device.h	(revision 0b3a78fec9fcd0f2d1ba2ad32efec95c4ad2cfdf)
@@ -36,6 +36,4 @@
 #define KERN_DEVICE_H_
 
-#include <typedefs.h>
-
 extern devno_t device_assign_devno(void);
 
Index: kernel/generic/include/ddi/irq.h
===================================================================
--- kernel/generic/include/ddi/irq.h	(revision df4ed852a2d1b242f9bdce0a873009a2cb77cec7)
+++ kernel/generic/include/ddi/irq.h	(revision 0b3a78fec9fcd0f2d1ba2ad32efec95c4ad2cfdf)
@@ -36,9 +36,38 @@
 #define KERN_IRQ_H_
 
+typedef enum {
+	CMD_MEM_READ_1 = 0,
+	CMD_MEM_READ_2,
+	CMD_MEM_READ_4,
+	CMD_MEM_READ_8,
+	CMD_MEM_WRITE_1,
+	CMD_MEM_WRITE_2,
+	CMD_MEM_WRITE_4,
+	CMD_MEM_WRITE_8,
+	CMD_PORT_READ_1,
+	CMD_PORT_WRITE_1,
+	CMD_IA64_GETCHAR,
+	CMD_PPC32_GETCHAR,
+	CMD_LAST
+} irq_cmd_type;
+
+typedef struct {
+	irq_cmd_type cmd;
+	void *addr;
+	unsigned long long value; 
+	int dstarg;
+} irq_cmd_t;
+
+typedef struct {
+	unsigned int cmdcount;
+	irq_cmd_t *cmds;
+} irq_code_t;
+
+#ifdef KERNEL
+
 #include <arch/types.h>
-#include <typedefs.h>
 #include <adt/list.h>
-#include <ipc/irq.h>
 #include <synch/spinlock.h>
+#include <proc/task.h>
 
 typedef enum {
@@ -52,5 +81,24 @@
 } irq_trigger_t;
 
-typedef void (* irq_handler_t)(irq_t *irq, void *arg, ...);
+struct irq;
+typedef void (* irq_handler_t)(struct irq *irq, void *arg, ...);
+
+
+
+/** IPC notification config structure.
+ *
+ * Primarily, this structure is encapsulated in the irq_t structure.
+ * It is protected by irq_t::lock.
+ */
+typedef struct {
+	bool notify;			/**< When false, notifications are not sent. */
+	answerbox_t *answerbox;		/**< Answerbox for notifications. */
+	unative_t method;		/**< Method to be used for the notification. */
+	irq_code_t *code;		/**< Top-half pseudocode. */
+	count_t counter;		/**< Counter. */
+	link_t link;			/**< Link between IRQs that are notifying the
+					     same answerbox. The list is protected by
+					     the answerbox irq_lock. */
+} ipc_notif_cfg_t;
 
 /** Structure representing one device IRQ.
@@ -60,5 +108,5 @@
  * devno.
  */
-struct irq {
+typedef struct irq {
 	/** Hash table link. */
 	link_t link;
@@ -87,5 +135,5 @@
 	/** Notification configuration structure. */
 	ipc_notif_cfg_t notif_cfg; 
-};
+} irq_t;
 
 extern void irq_init(count_t inrs, count_t chains);
@@ -97,4 +145,6 @@
 #endif
 
+#endif
+
 /** @}
  */
