1 /* 2 * (C) Copyright 2007 Michal Simek 3 * 4 * Michal SIMEK <monstr@monstr.cz> 5 * 6 * SPDX-License-Identifier: GPL-2.0+ 7 */ 8 9 typedef 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 20 struct irq_action { 21 interrupt_handler_t *handler; /* pointer to interrupt rutine */ 22 void *arg; 23 int count; /* number of interrupt */ 24 }; 25 26 /** 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 */ 35 int install_interrupt_handler(int irq, interrupt_handler_t *hdlr, 36 void *arg); 37