blob: 65868386b0d87a98b8b9987eef11bbfaca218354 [file] [log] [blame]
Michal Simek952d5142007-03-11 13:42:58 +01001/*
2 * (C) Copyright 2007 Michal Simek
3 *
4 * Michal SIMEK <monstr@monstr.cz>
5 *
Wolfgang Denkbd8ec7e2013-10-07 13:07:26 +02006 * SPDX-License-Identifier: GPL-2.0+
Michal Simek952d5142007-03-11 13:42:58 +01007 */
8
9typedef volatile struct microblaze_intc_t {
10 int isr; /* interrupt status register */
11 int ipr; /* interrupt pending register */
12 int ier; /* interrupt enable register */
13 int iar; /* interrupt acknowledge register */
14 int sie; /* set interrupt enable bits */
15 int cie; /* clear interrupt enable bits */
16 int ivr; /* interrupt vector register */
17 int mer; /* master enable register */
18} microblaze_intc_t;
19
20struct irq_action {
21 interrupt_handler_t *handler; /* pointer to interrupt rutine */
22 void *arg;
23 int count; /* number of interrupt */
24};
25
Michal Simeke76a06e2012-06-29 14:21:52 +020026/**
27 * Register and unregister interrupt handler rutines
28 *
29 * @param irq IRQ number
30 * @param hdlr Interrupt handler rutine
31 * @param arg Pointer to argument which is passed to int. handler rutine
32 * @return 0 if registration pass, 1 if unregistration pass,
33 * or an error code < 0 otherwise
34 */
35int install_interrupt_handler(int irq, interrupt_handler_t *hdlr,
Michal Simek77a1e242007-05-07 17:22:25 +020036 void *arg);