Simon Glass | c30b7ad | 2019-11-14 12:57:41 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Header file for interrupt functions |
| 4 | * |
| 5 | * (C) Copyright 2000-2009 |
| 6 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 7 | */ |
| 8 | |
| 9 | #ifndef __IRQ_FUNC_H |
| 10 | #define __IRQ_FUNC_H |
| 11 | |
Simon Glass | 36bf446 | 2019-11-14 12:57:42 -0700 | [diff] [blame] | 12 | struct pt_regs; |
| 13 | |
| 14 | typedef void (interrupt_handler_t)(void *arg); |
| 15 | |
Simon Glass | c30b7ad | 2019-11-14 12:57:41 -0700 | [diff] [blame] | 16 | int interrupt_init(void); |
| 17 | void timer_interrupt(struct pt_regs *regs); |
| 18 | void external_interrupt(struct pt_regs *regs); |
Simon Glass | 36bf446 | 2019-11-14 12:57:42 -0700 | [diff] [blame] | 19 | void irq_install_handler(int vec, interrupt_handler_t *handler, void *arg); |
Simon Glass | c30b7ad | 2019-11-14 12:57:41 -0700 | [diff] [blame] | 20 | void irq_free_handler(int vec); |
| 21 | void reset_timer(void); |
| 22 | |
Simon Glass | 36bf446 | 2019-11-14 12:57:42 -0700 | [diff] [blame] | 23 | void enable_interrupts(void); |
| 24 | int disable_interrupts(void); |
| 25 | |
Simon Glass | c30b7ad | 2019-11-14 12:57:41 -0700 | [diff] [blame] | 26 | #endif |