common: Move interrupt functions into a new header

These functions do not use driver model but are fairly widely used in
U-Boot. But it is not clear that they will use driver model anytime soon,
so we don't want to label them as 'legacy'.

Move them to a new irq_func.h header file. Avoid the name 'irq.h' since it
is widely used in U-Boot already.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Simon Glass 2019-11-14 12:57:41 -07:00 committed by Tom Rini
parent 9d3915b2df
commit c30b7adbca
42 changed files with 60 additions and 7 deletions

View File

@ -4,6 +4,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <asm/arcregs.h>
#include <asm/ptrace.h>

View File

@ -20,6 +20,7 @@
#include <common.h>
#include <efi_loader.h>
#include <irq_func.h>
#include <asm/proc-armv/ptrace.h>
#include <asm/u-boot-arm.h>

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <linux/compiler.h>
#include <efi_loader.h>

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <irq_func.h>
/*
* Upon exception entry ARMv7-M processors automatically save stack

View File

@ -10,6 +10,7 @@
/* CPU specific interrupt routine */
#include <common.h>
#include <irq_func.h>
#include <asm/immap.h>
#include <asm/io.h>

View File

@ -7,6 +7,7 @@
/* CPU specific interrupt routine */
#include <common.h>
#include <irq_func.h>
#include <asm/immap.h>
#include <asm/io.h>

View File

@ -8,6 +8,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <watchdog.h>
#include <asm/processor.h>
#include <asm/immap.h>

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <asm/immap.h>
#include <asm/io.h>

View File

@ -7,6 +7,7 @@
/* CPU specific interrupt routine */
#include <common.h>
#include <irq_func.h>
#include <asm/immap.h>
#include <asm/io.h>

View File

@ -10,6 +10,7 @@
/* CPU specific interrupt routine */
#include <common.h>
#include <irq_func.h>
#include <asm/immap.h>
#include <asm/io.h>

View File

@ -7,6 +7,7 @@
/* CPU specific interrupt routine */
#include <common.h>
#include <irq_func.h>
#include <asm/immap.h>
#include <asm/io.h>

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <asm/timer.h>
#include <asm/immap.h>

View File

@ -8,6 +8,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <watchdog.h>
#include <asm/processor.h>
#include <asm/immap.h>

View File

@ -7,6 +7,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <time.h>
#include <asm/timer.h>

View File

@ -10,6 +10,7 @@
#include <common.h>
#include <command.h>
#include <fdtdec.h>
#include <irq_func.h>
#include <malloc.h>
#include <asm/microblaze_intc.h>
#include <asm/asm.h>

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <irq_func.h>
int interrupt_init(void)
{

View File

@ -9,6 +9,7 @@
#include <config.h>
#include <common.h>
#include <div64.h>
#include <irq_func.h>
#include <time.h>
#include <asm/io.h>
#include <asm/mipsregs.h>

View File

@ -9,6 +9,7 @@
*/
#ifndef CONFIG_TIMER
#include <common.h>
#include <irq_func.h>
#include <time.h>
#include <asm/io.h>
#include <faraday/fttmr010.h>

View File

@ -10,6 +10,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <asm/ptrace.h>
#include <asm/system.h>
#undef INTERRUPT_MODE

View File

@ -9,6 +9,7 @@
#include <common.h>
#include <command.h>
#include <irq_func.h>
#include <asm/nios2.h>
#include <asm/types.h>
#include <asm/io.h>

View File

@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
#include <irq_func.h>
#include <mpc83xx.h>
#include <asm/processor.h>

View File

@ -11,6 +11,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <watchdog.h>
#include <command.h>
#include <asm/processor.h>

View File

@ -21,6 +21,7 @@
#include <common.h>
#include <command.h>
#include <irq_func.h>
#include <kgdb.h>
#include <asm/processor.h>

View File

@ -15,6 +15,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <mpc86xx.h>
#include <command.h>
#include <asm/processor.h>

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <mpc8xx.h>
#include <mpc8xx_irq.h>
#include <asm/cpm_8xx.h>

View File

@ -8,6 +8,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <asm/processor.h>
#include <watchdog.h>
#ifdef CONFIG_LED_STATUS

View File

@ -8,6 +8,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <asm/ptrace.h>
#include <asm/system.h>
#include <asm/encoding.h>

View File

@ -6,6 +6,7 @@
*/
#include <common.h>
#include <irq_func.h>
int interrupt_init(void)
{

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <irq_func.h>
int interrupt_init(void)
{

View File

@ -13,6 +13,7 @@
#include <common.h>
#include <dm.h>
#include <efi_loader.h>
#include <irq_func.h>
#include <asm/control_regs.h>
#include <asm/i8259.h>
#include <asm/interrupt.h>

View File

@ -5,6 +5,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <asm/processor-flags.h>
void enable_interrupts(void)

View File

@ -7,6 +7,7 @@
*/
#include <common.h>
#include <bios_emul.h>
#include <irq_func.h>
#include <vbe.h>
#include <linux/linkage.h>
#include <asm/cache.h>

View File

@ -30,6 +30,7 @@
*/
#include <common.h>
#include <irq_func.h>
#include <asm/interrupt.h>
#if !CONFIG_IS_ENABLED(X86_64)

View File

@ -7,6 +7,7 @@
#include <cpu_func.h>
#include <debug_uart.h>
#include <dm.h>
#include <irq_func.h>
#include <malloc.h>
#include <spl.h>
#include <syscon.h>

View File

@ -12,6 +12,7 @@
#include <common.h>
#include <command.h>
#include <irq_func.h>
#include <asm/string.h>
#include <asm/regs.h>

View File

@ -28,6 +28,7 @@
#if defined(CONFIG_CMD_KGDB)
#include <kgdb.h>
#endif
#include <irq_func.h>
#include <malloc.h>
#include <mapmem.h>
#ifdef CONFIG_BITBANGMII

View File

@ -11,6 +11,7 @@
#include <binman_sym.h>
#include <dm.h>
#include <handoff.h>
#include <irq_func.h>
#include <serial.h>
#include <spl.h>
#include <asm/u-boot.h>

View File

@ -22,6 +22,7 @@
#include <env.h>
#include <errno.h>
#include <fdt_support.h>
#include <irq_func.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/byteorder.h>

View File

@ -8,6 +8,7 @@
#include <board.h>
#include <clk.h>
#include <dm.h>
#include <irq_func.h>
#include <status_led.h>
#include <time.h>
#include <timer.h>

View File

@ -208,13 +208,6 @@ ulong get_bus_freq (ulong);
int get_serial_clock(void);
/* $(CPU)/interrupts.c */
int interrupt_init (void);
void timer_interrupt (struct pt_regs *);
void external_interrupt (struct pt_regs *);
void irq_install_handler(int, interrupt_handler_t *, void *);
void irq_free_handler (int);
void reset_timer (void);
void enable_interrupts (void);
int disable_interrupts (void);

View File

@ -1,6 +1,8 @@
#ifndef __EXPORTS_H__
#define __EXPORTS_H__
#include <irq_func.h>
#ifndef __ASSEMBLY__
#ifdef CONFIG_PHY_AQUANTIA
#include <env.h>

19
include/irq_func.h Normal file
View File

@ -0,0 +1,19 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Header file for interrupt functions
*
* (C) Copyright 2000-2009
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*/
#ifndef __IRQ_FUNC_H
#define __IRQ_FUNC_H
int interrupt_init(void);
void timer_interrupt(struct pt_regs *regs);
void external_interrupt(struct pt_regs *regs);
void irq_install_handler (int vec, interrupt_handler_t *handler, void *arg);
void irq_free_handler(int vec);
void reset_timer(void);
#endif