Simon Glass | 9b61c7c | 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 | 8f3f761 | 2019-11-14 12:57:42 -0700 | [diff] [blame] | 12 | struct pt_regs; |
Andy Shevchenko | bf05e67 | 2024-10-05 22:14:29 +0300 | [diff] [blame] | 13 | struct cmd_tbl; |
Simon Glass | 8f3f761 | 2019-11-14 12:57:42 -0700 | [diff] [blame] | 14 | |
| 15 | typedef void (interrupt_handler_t)(void *arg); |
| 16 | |
Simon Glass | 9b61c7c | 2019-11-14 12:57:41 -0700 | [diff] [blame] | 17 | int interrupt_init(void); |
| 18 | void timer_interrupt(struct pt_regs *regs); |
| 19 | void external_interrupt(struct pt_regs *regs); |
Simon Glass | 8f3f761 | 2019-11-14 12:57:42 -0700 | [diff] [blame] | 20 | void irq_install_handler(int vec, interrupt_handler_t *handler, void *arg); |
Simon Glass | 9b61c7c | 2019-11-14 12:57:41 -0700 | [diff] [blame] | 21 | void irq_free_handler(int vec); |
| 22 | void reset_timer(void); |
| 23 | |
Simon Glass | 8f3f761 | 2019-11-14 12:57:42 -0700 | [diff] [blame] | 24 | void enable_interrupts(void); |
| 25 | int disable_interrupts(void); |
| 26 | |
Andy Shevchenko | bf05e67 | 2024-10-05 22:14:29 +0300 | [diff] [blame] | 27 | /* Implemented in $(CPU)/interrupts.c */ |
| 28 | int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
| 29 | |
Simon Glass | 9b61c7c | 2019-11-14 12:57:41 -0700 | [diff] [blame] | 30 | #endif |