blob: fb2c54064c8ad96e50bc5d87a5311db2d18ac7fb [file] [log] [blame]
Simon Glass9b61c7c2019-11-14 12:57:41 -07001/* 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 Glass8f3f7612019-11-14 12:57:42 -070012struct pt_regs;
Andy Shevchenkobf05e672024-10-05 22:14:29 +030013struct cmd_tbl;
Simon Glass8f3f7612019-11-14 12:57:42 -070014
15typedef void (interrupt_handler_t)(void *arg);
16
Simon Glass9b61c7c2019-11-14 12:57:41 -070017int interrupt_init(void);
18void timer_interrupt(struct pt_regs *regs);
19void external_interrupt(struct pt_regs *regs);
Simon Glass8f3f7612019-11-14 12:57:42 -070020void irq_install_handler(int vec, interrupt_handler_t *handler, void *arg);
Simon Glass9b61c7c2019-11-14 12:57:41 -070021void irq_free_handler(int vec);
22void reset_timer(void);
23
Simon Glass8f3f7612019-11-14 12:57:42 -070024void enable_interrupts(void);
25int disable_interrupts(void);
26
Andy Shevchenkobf05e672024-10-05 22:14:29 +030027/* Implemented in $(CPU)/interrupts.c */
28int do_irqinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
29
Simon Glass9b61c7c2019-11-14 12:57:41 -070030#endif