common: Move enable/disable_interrupts out of common.h
authorSimon Glass <sjg@chromium.org>
Thu, 14 Nov 2019 19:57:42 +0000 (12:57 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 2 Dec 2019 23:25:01 +0000 (18:25 -0500)
Move these two functions into the irq_funcs.h header file. Also move
interrupt_handler_t as this is used by the irq_install_handler() function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
61 files changed:
arch/arc/lib/bootm.c
arch/arm/cpu/arm11/cpu.c
arch/arm/cpu/arm920t/cpu.c
arch/arm/cpu/arm926ejs/cpu.c
arch/arm/cpu/arm946es/cpu.c
arch/arm/cpu/armv7/cpu.c
arch/arm/cpu/armv7m/cpu.c
arch/arm/cpu/armv8/cpu.c
arch/arm/cpu/pxa/pxa2xx.c
arch/arm/cpu/sa1100/cpu.c
arch/arm/lib/reset.c
arch/arm/mach-tegra/cmd_enterrcm.c
arch/microblaze/include/asm/microblaze_intc.h
arch/nds32/cpu/n1213/ag101/cpu.c
arch/nios2/cpu/cpu.c
arch/nios2/lib/bootm.c
arch/powerpc/cpu/mpc83xx/cpu.c
arch/powerpc/cpu/mpc83xx/ecc.c
arch/powerpc/cpu/mpc85xx/cpu.c
arch/riscv/cpu/generic/cpu.c
arch/sh/cpu/sh4/cpu.c
arch/sh/lib/zimageboot.c
arch/x86/lib/zimage.c
board/bosch/shc/board.c
board/cobra5272/flash.c
board/freescale/b4860qds/b4860qds.c
board/freescale/common/vid.c
board/freescale/m5253demo/flash.c
board/freescale/t4qds/t4240qds.c
board/synopsys/hsdk/hsdk.c
cmd/booti.c
cmd/bootz.c
cmd/fdc.c
cmd/irq.c
common/board_r.c
common/bootm.c
drivers/firmware/psci.c
drivers/mtd/pic32_flash.c
include/common.h
include/exports.h
include/irq_func.h
lib/efi_loader/efi_boottime.c
post/lib_powerpc/andi.c
post/lib_powerpc/b.c
post/lib_powerpc/cmp.c
post/lib_powerpc/cmpi.c
post/lib_powerpc/complex.c
post/lib_powerpc/cr.c
post/lib_powerpc/load.c
post/lib_powerpc/multi.c
post/lib_powerpc/rlwimi.c
post/lib_powerpc/rlwinm.c
post/lib_powerpc/rlwnm.c
post/lib_powerpc/srawi.c
post/lib_powerpc/store.c
post/lib_powerpc/string.c
post/lib_powerpc/three.c
post/lib_powerpc/threei.c
post/lib_powerpc/threex.c
post/lib_powerpc/two.c
post/lib_powerpc/twox.c

index 254e028..d38c18e 100644 (file)
@@ -3,6 +3,7 @@
  * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
  */
 
+#include <irq_func.h>
 #include <asm/cache.h>
 #include <common.h>
 
index 674ad07..177d1f4 100644 (file)
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <asm/system.h>
 
 static void cache_flush(void);
index 4874b62..305713e 100644 (file)
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <asm/system.h>
 
 static void cache_flush(void);
index ffa2a23..6ab320d 100644 (file)
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <asm/system.h>
 
 static void cache_flush(void);
index 8523a97..fb0ea5e 100644 (file)
@@ -15,6 +15,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <asm/system.h>
 #include <asm/io.h>
 
index 03557e8..68807d2 100644 (file)
@@ -17,6 +17,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <asm/system.h>
 #include <asm/cache.h>
 #include <asm/armv7.h>
index d548dd8..7f827da 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <asm/io.h>
 #include <asm/armv7m.h>
 
index 210301c..2467e0b 100644 (file)
@@ -13,6 +13,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <asm/system.h>
 #include <asm/secure.h>
 #include <linux/compiler.h>
index 7d6abf4..002ff79 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <asm/arch/pxa-regs.h>
 #include <asm/io.h>
 #include <asm/system.h>
index 17c01dd..91e100a 100644 (file)
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <asm/system.h>
 #include <asm/io.h>
 
index f3ea116..3c4512d 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 __weak void reset_misc(void)
 {
index 4a889f0..5247e52 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/pmc.h>
 
index b4e0fc6..1434be8 100644 (file)
@@ -5,6 +5,8 @@
  * Michal  SIMEK <monstr@monstr.cz>
  */
 
+#include <irq_func.h>
+
 typedef volatile struct microblaze_intc_t {
        int isr; /* interrupt status register */
        int ipr; /* interrupt pending register */
index 34443b5..3ae87a2 100644 (file)
@@ -16,6 +16,7 @@
 #include <common.h>
 #include <command.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <watchdog.h>
 #include <asm/cache.h>
 
index 05b26e8..37ffa8f 100644 (file)
@@ -9,6 +9,7 @@
 #include <cpu_func.h>
 #include <dm.h>
 #include <errno.h>
+#include <irq_func.h>
 #include <asm/cache.h>
 
 DECLARE_GLOBAL_DATA_PTR;
index a68b091..e189161 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 
 #define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */
 
index 20ed82f..c3e2597 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
index 10e9b96..a6eb7cb 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 #include <mpc83xx.h>
 #include <command.h>
 
index 6402461..1855662 100644 (file)
@@ -11,6 +11,7 @@
 #include <config.h>
 #include <common.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>
index ad2950c..c0a5288 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <irq_func.h>
 
 /*
  * cleanup_before_linux() is called just before we call linux
index ee36aca..f1b8df9 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <irq_func.h>
 #include <cpu_func.h>
 #include <netdev.h>
 #include <asm/processor.h>
index 93933b7..602776a 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 #include <asm/io.h>
 #include <asm/zimage.h>
 
index d07041f..9b5e767 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <common.h>
 #include <env.h>
+#include <irq_func.h>
 #include <malloc.h>
 #include <asm/acpi_table.h>
 #include <asm/io.h>
index a96fdef..145bc02 100644 (file)
@@ -14,6 +14,7 @@
 #include <common.h>
 #include <env.h>
 #include <errno.h>
+#include <irq_func.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/hardware.h>
index 6f36c26..1d3c5ac 100644 (file)
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <console.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 
 #define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE
 #define FLASH_BANK_SIZE 0x200000
index 33cd4b4..24efe77 100644 (file)
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <irq_func.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
index b37f3bf..2085247 100644 (file)
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <irq_func.h>
 #include <asm/io.h>
 #ifdef CONFIG_FSL_LSCH2
 #include <asm/arch/immap_lsch2.h>
index 0706b62..a5223ec 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 #include <asm/immap.h>
 
index bb18b97..d73ddf5 100644 (file)
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <env.h>
 #include <i2c.h>
+#include <irq_func.h>
 #include <netdev.h>
 #include <linux/compiler.h>
 #include <asm/mmu.h>
index 470d09e..6af45c9 100644 (file)
@@ -8,6 +8,7 @@
 #include <config.h>
 #include <cpu_func.h>
 #include <env.h>
+#include <irq_func.h>
 #include <linux/printk.h>
 #include <linux/kernel.h>
 #include <linux/io.h>
index 841eff1..d0671de 100644 (file)
@@ -8,6 +8,7 @@
 #include <bootm.h>
 #include <command.h>
 #include <image.h>
+#include <irq_func.h>
 #include <lmb.h>
 #include <mapmem.h>
 #include <linux/kernel.h>
index 0e75509..74be62c 100644 (file)
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <bootm.h>
 #include <command.h>
+#include <irq_func.h>
 #include <lmb.h>
 #include <linux/compiler.h>
 
index 7bfaae0..7d4b829 100644 (file)
--- a/cmd/fdc.c
+++ b/cmd/fdc.c
@@ -11,6 +11,7 @@
 #include <config.h>
 #include <command.h>
 #include <image.h>
+#include <irq_func.h>
 
 
 #undef FDC_DEBUG
index bcc718b..52d06b3 100644 (file)
--- a/cmd/irq.c
+++ b/cmd/irq.c
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <config.h>
 #include <command.h>
+#include <irq_func.h>
 
 static int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc,
                         char * const argv[])
index 969ed73..5464172 100644 (file)
@@ -12,6 +12,7 @@
 #include <common.h>
 #include <api.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <u-boot/crc.h>
 /* TODO: can we just include all these headers whether needed or not? */
 #if defined(CONFIG_CMD_BEDBUG)
index 3bbe490..902c138 100644 (file)
@@ -11,6 +11,7 @@
 #include <env.h>
 #include <errno.h>
 #include <fdt_support.h>
+#include <irq_func.h>
 #include <lmb.h>
 #include <malloc.h>
 #include <mapmem.h>
index c8c47ac..394f30f 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <irq_func.h>
 #include <dm/lists.h>
 #include <efi_loader.h>
 #include <linux/libfdt.h>
index 8f09e5b..8fff818 100644 (file)
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <fdt_support.h>
 #include <flash.h>
+#include <irq_func.h>
 #include <mach/pic32.h>
 #include <wait_bit.h>
 
index 81387d5..c22eb63 100644 (file)
@@ -46,8 +46,6 @@ typedef volatile unsigned char        vu_char;
 
 #include <log.h>
 
-typedef void (interrupt_handler_t)(void *);
-
 #include <asm/u-boot.h> /* boot information for Linux kernel */
 #include <asm/global_data.h>   /* global data used for startup functions */
 
@@ -207,10 +205,6 @@ int        get_clocks (void);
 ulong  get_bus_freq  (ulong);
 int get_serial_clock(void);
 
-/* $(CPU)/interrupts.c */
-void   enable_interrupts  (void);
-int    disable_interrupts (void);
-
 /* lib/uuid.c */
 #include <uuid.h>
 
index 8899622..35f4632 100644 (file)
@@ -9,6 +9,8 @@
 #include <phy_interface.h>
 #endif
 
+#include <irq_func.h>
+
 struct spi_slave;
 
 /* These are declarations of exported functions available in C code */
index 11d2bdd..c7c4bab 100644 (file)
@@ -9,11 +9,18 @@
 #ifndef __IRQ_FUNC_H
 #define __IRQ_FUNC_H
 
+struct pt_regs;
+
+typedef void (interrupt_handler_t)(void *arg);
+
 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_install_handler(int vec, interrupt_handler_t *handler, void *arg);
 void irq_free_handler(int vec);
 void reset_timer(void);
 
+void enable_interrupts(void);
+int disable_interrupts(void);
+
 #endif
index 265297e..88a7604 100644 (file)
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <div64.h>
 #include <efi_loader.h>
+#include <irq_func.h>
 #include <malloc.h>
 #include <time.h>
 #include <linux/libfdt_env.h>
index 49c5ee6..d4f60aa 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index 67edee0..0b02e91 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index 79b22eb..e708697 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index b5b47ba..85a9b0a 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index 7ab3c35..bb29e91 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index 93de47a..56ed355 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index 3fbd8ba..5269563 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index 51750bb..7807eb1 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index 16e6422..7b4dc79 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index f88d62a..8a03e9b 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index c12577f..e2beb4e 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index cad3aec..d4a8fab 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index 8bd65c3..8e278fe 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index 3d3f2b1..fc460ce 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index 27a32a2..fc6f1f5 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index 28c17df..f49c85e 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index ea9e465..6bc5a54 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index 2c0efae..fa376c7 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test
index eae4c57..5c36012 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test