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