From: Simon Glass Date: Thu, 14 Nov 2019 19:57:42 +0000 (-0700) Subject: common: Move enable/disable_interrupts out of common.h X-Git-Tag: v2020.01-rc4~1^2~8 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=36bf446b642d5759981f5adf547b4a7aeb15eee3;p=oweals%2Fu-boot.git common: Move enable/disable_interrupts out of common.h 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 Reviewed-by: Tom Rini --- diff --git a/arch/arc/lib/bootm.c b/arch/arc/lib/bootm.c index 254e0284b3..d38c18ef8f 100644 --- a/arch/arc/lib/bootm.c +++ b/arch/arc/lib/bootm.c @@ -3,6 +3,7 @@ * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved. */ +#include #include #include diff --git a/arch/arm/cpu/arm11/cpu.c b/arch/arm/cpu/arm11/cpu.c index 674ad0715b..177d1f40b9 100644 --- a/arch/arm/cpu/arm11/cpu.c +++ b/arch/arm/cpu/arm11/cpu.c @@ -17,6 +17,7 @@ #include #include #include +#include #include static void cache_flush(void); diff --git a/arch/arm/cpu/arm920t/cpu.c b/arch/arm/cpu/arm920t/cpu.c index 4874b620e6..305713e786 100644 --- a/arch/arm/cpu/arm920t/cpu.c +++ b/arch/arm/cpu/arm920t/cpu.c @@ -15,6 +15,7 @@ #include #include #include +#include #include static void cache_flush(void); diff --git a/arch/arm/cpu/arm926ejs/cpu.c b/arch/arm/cpu/arm926ejs/cpu.c index ffa2a2302a..6ab320da7d 100644 --- a/arch/arm/cpu/arm926ejs/cpu.c +++ b/arch/arm/cpu/arm926ejs/cpu.c @@ -15,6 +15,7 @@ #include #include #include +#include #include static void cache_flush(void); diff --git a/arch/arm/cpu/arm946es/cpu.c b/arch/arm/cpu/arm946es/cpu.c index 8523a9759e..fb0ea5e817 100644 --- a/arch/arm/cpu/arm946es/cpu.c +++ b/arch/arm/cpu/arm946es/cpu.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c index 03557e8a2a..68807d2099 100644 --- a/arch/arm/cpu/armv7/cpu.c +++ b/arch/arm/cpu/armv7/cpu.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/cpu/armv7m/cpu.c b/arch/arm/cpu/armv7m/cpu.c index d548dd833c..7f827da033 100644 --- a/arch/arm/cpu/armv7m/cpu.c +++ b/arch/arm/cpu/armv7m/cpu.c @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/arch/arm/cpu/armv8/cpu.c b/arch/arm/cpu/armv8/cpu.c index 210301c1fe..2467e0b87b 100644 --- a/arch/arm/cpu/armv8/cpu.c +++ b/arch/arm/cpu/armv8/cpu.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c index 7d6abf4dbc..002ff7988b 100644 --- a/arch/arm/cpu/pxa/pxa2xx.c +++ b/arch/arm/cpu/pxa/pxa2xx.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/cpu/sa1100/cpu.c b/arch/arm/cpu/sa1100/cpu.c index 17c01dd81f..91e100af1b 100644 --- a/arch/arm/cpu/sa1100/cpu.c +++ b/arch/arm/cpu/sa1100/cpu.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/lib/reset.c b/arch/arm/lib/reset.c index f3ea116e87..3c4512d495 100644 --- a/arch/arm/lib/reset.c +++ b/arch/arm/lib/reset.c @@ -21,6 +21,7 @@ */ #include +#include __weak void reset_misc(void) { diff --git a/arch/arm/mach-tegra/cmd_enterrcm.c b/arch/arm/mach-tegra/cmd_enterrcm.c index 4a889f0e34..5247e52a5a 100644 --- a/arch/arm/mach-tegra/cmd_enterrcm.c +++ b/arch/arm/mach-tegra/cmd_enterrcm.c @@ -25,6 +25,7 @@ */ #include +#include #include #include diff --git a/arch/microblaze/include/asm/microblaze_intc.h b/arch/microblaze/include/asm/microblaze_intc.h index b4e0fc6930..1434be8756 100644 --- a/arch/microblaze/include/asm/microblaze_intc.h +++ b/arch/microblaze/include/asm/microblaze_intc.h @@ -5,6 +5,8 @@ * Michal SIMEK */ +#include + typedef volatile struct microblaze_intc_t { int isr; /* interrupt status register */ int ipr; /* interrupt pending register */ diff --git a/arch/nds32/cpu/n1213/ag101/cpu.c b/arch/nds32/cpu/n1213/ag101/cpu.c index 34443b58c8..3ae87a21bb 100644 --- a/arch/nds32/cpu/n1213/ag101/cpu.c +++ b/arch/nds32/cpu/n1213/ag101/cpu.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c index 05b26e8d20..37ffa8f4a4 100644 --- a/arch/nios2/cpu/cpu.c +++ b/arch/nios2/cpu/cpu.c @@ -9,6 +9,7 @@ #include #include #include +#include #include DECLARE_GLOBAL_DATA_PTR; diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c index a68b091f87..e1891617c7 100644 --- a/arch/nios2/lib/bootm.c +++ b/arch/nios2/lib/bootm.c @@ -6,6 +6,7 @@ #include #include +#include #define NIOS_MAGIC 0x534f494e /* enable command line and initrd passing */ diff --git a/arch/powerpc/cpu/mpc83xx/cpu.c b/arch/powerpc/cpu/mpc83xx/cpu.c index 20ed82fbcd..c3e25978a8 100644 --- a/arch/powerpc/cpu/mpc83xx/cpu.c +++ b/arch/powerpc/cpu/mpc83xx/cpu.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/arch/powerpc/cpu/mpc83xx/ecc.c b/arch/powerpc/cpu/mpc83xx/ecc.c index 10e9b96add..a6eb7cb97c 100644 --- a/arch/powerpc/cpu/mpc83xx/ecc.c +++ b/arch/powerpc/cpu/mpc83xx/ecc.c @@ -7,6 +7,7 @@ */ #include +#include #include #include diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index 64024612cd..18556629c3 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/riscv/cpu/generic/cpu.c b/arch/riscv/cpu/generic/cpu.c index ad2950ce40..c0a5288bdb 100644 --- a/arch/riscv/cpu/generic/cpu.c +++ b/arch/riscv/cpu/generic/cpu.c @@ -5,6 +5,7 @@ #include #include +#include /* * cleanup_before_linux() is called just before we call linux diff --git a/arch/sh/cpu/sh4/cpu.c b/arch/sh/cpu/sh4/cpu.c index ee36aca407..f1b8df9b0b 100644 --- a/arch/sh/cpu/sh4/cpu.c +++ b/arch/sh/cpu/sh4/cpu.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/arch/sh/lib/zimageboot.c b/arch/sh/lib/zimageboot.c index 93933b7931..602776a474 100644 --- a/arch/sh/lib/zimageboot.c +++ b/arch/sh/lib/zimageboot.c @@ -10,6 +10,7 @@ */ #include +#include #include #include diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index d07041fd4c..9b5e767ccc 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c index a96fdef992..145bc0233a 100644 --- a/board/bosch/shc/board.c +++ b/board/bosch/shc/board.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c index 6f36c269d4..1d3c5acddf 100644 --- a/board/cobra5272/flash.c +++ b/board/cobra5272/flash.c @@ -7,6 +7,7 @@ #include #include #include +#include #define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE #define FLASH_BANK_SIZE 0x200000 diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c index 33cd4b4964..24efe77b57 100644 --- a/board/freescale/b4860qds/b4860qds.c +++ b/board/freescale/b4860qds/b4860qds.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/freescale/common/vid.c b/board/freescale/common/vid.c index b37f3bf4f8..20852476dd 100644 --- a/board/freescale/common/vid.c +++ b/board/freescale/common/vid.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #ifdef CONFIG_FSL_LSCH2 #include diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c index 0706b62396..a5223ecee6 100644 --- a/board/freescale/m5253demo/flash.c +++ b/board/freescale/m5253demo/flash.c @@ -8,6 +8,7 @@ */ #include +#include #include diff --git a/board/freescale/t4qds/t4240qds.c b/board/freescale/t4qds/t4240qds.c index bb18b97e6a..d73ddf5921 100644 --- a/board/freescale/t4qds/t4240qds.c +++ b/board/freescale/t4qds/t4240qds.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c index 470d09e528..6af45c99e1 100644 --- a/board/synopsys/hsdk/hsdk.c +++ b/board/synopsys/hsdk/hsdk.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/booti.c b/cmd/booti.c index 841eff10d1..d0671deb75 100644 --- a/cmd/booti.c +++ b/cmd/booti.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/bootz.c b/cmd/bootz.c index 0e75509ee9..74be62c2c5 100644 --- a/cmd/bootz.c +++ b/cmd/bootz.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/cmd/fdc.c b/cmd/fdc.c index 7bfaae0e38..7d4b829637 100644 --- a/cmd/fdc.c +++ b/cmd/fdc.c @@ -11,6 +11,7 @@ #include #include #include +#include #undef FDC_DEBUG diff --git a/cmd/irq.c b/cmd/irq.c index bcc718b4bc..52d06b3eed 100644 --- a/cmd/irq.c +++ b/cmd/irq.c @@ -6,6 +6,7 @@ #include #include #include +#include static int do_interrupts(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) diff --git a/common/board_r.c b/common/board_r.c index 969ed73566..5464172259 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -12,6 +12,7 @@ #include #include #include +#include #include /* TODO: can we just include all these headers whether needed or not? */ #if defined(CONFIG_CMD_BEDBUG) diff --git a/common/bootm.c b/common/bootm.c index 3bbe490ab9..902c13880d 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c index c8c47acfd3..394f30fa88 100644 --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/drivers/mtd/pic32_flash.c b/drivers/mtd/pic32_flash.c index 8f09e5b250..8fff818e42 100644 --- a/drivers/mtd/pic32_flash.c +++ b/drivers/mtd/pic32_flash.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/include/common.h b/include/common.h index 81387d561e..c22eb63501 100644 --- a/include/common.h +++ b/include/common.h @@ -46,8 +46,6 @@ typedef volatile unsigned char vu_char; #include -typedef void (interrupt_handler_t)(void *); - #include /* boot information for Linux kernel */ #include /* 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 diff --git a/include/exports.h b/include/exports.h index 8899622738..35f463287f 100644 --- a/include/exports.h +++ b/include/exports.h @@ -9,6 +9,8 @@ #include #endif +#include + struct spi_slave; /* These are declarations of exported functions available in C code */ diff --git a/include/irq_func.h b/include/irq_func.h index 11d2bdd912..c7c4babbfc 100644 --- a/include/irq_func.h +++ b/include/irq_func.h @@ -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 diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 265297ed46..88a7604bbf 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/post/lib_powerpc/andi.c b/post/lib_powerpc/andi.c index 49c5ee6349..d4f60aa738 100644 --- a/post/lib_powerpc/andi.c +++ b/post/lib_powerpc/andi.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/b.c b/post/lib_powerpc/b.c index 67edee0107..0b02e9169e 100644 --- a/post/lib_powerpc/b.c +++ b/post/lib_powerpc/b.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/cmp.c b/post/lib_powerpc/cmp.c index 79b22ebab7..e70869774c 100644 --- a/post/lib_powerpc/cmp.c +++ b/post/lib_powerpc/cmp.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/cmpi.c b/post/lib_powerpc/cmpi.c index b5b47bafb2..85a9b0ad36 100644 --- a/post/lib_powerpc/cmpi.c +++ b/post/lib_powerpc/cmpi.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/complex.c b/post/lib_powerpc/complex.c index 7ab3c352ac..bb29e91701 100644 --- a/post/lib_powerpc/complex.c +++ b/post/lib_powerpc/complex.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/cr.c b/post/lib_powerpc/cr.c index 93de47a1cf..56ed355dde 100644 --- a/post/lib_powerpc/cr.c +++ b/post/lib_powerpc/cr.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/load.c b/post/lib_powerpc/load.c index 3fbd8babfa..5269563b1e 100644 --- a/post/lib_powerpc/load.c +++ b/post/lib_powerpc/load.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/multi.c b/post/lib_powerpc/multi.c index 51750bb070..7807eb17ac 100644 --- a/post/lib_powerpc/multi.c +++ b/post/lib_powerpc/multi.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/rlwimi.c b/post/lib_powerpc/rlwimi.c index 16e642238e..7b4dc79fb1 100644 --- a/post/lib_powerpc/rlwimi.c +++ b/post/lib_powerpc/rlwimi.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/rlwinm.c b/post/lib_powerpc/rlwinm.c index f88d62a73b..8a03e9b9bc 100644 --- a/post/lib_powerpc/rlwinm.c +++ b/post/lib_powerpc/rlwinm.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/rlwnm.c b/post/lib_powerpc/rlwnm.c index c12577fd4f..e2beb4e417 100644 --- a/post/lib_powerpc/rlwnm.c +++ b/post/lib_powerpc/rlwnm.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/srawi.c b/post/lib_powerpc/srawi.c index cad3aec82d..d4a8fabc42 100644 --- a/post/lib_powerpc/srawi.c +++ b/post/lib_powerpc/srawi.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/store.c b/post/lib_powerpc/store.c index 8bd65c3581..8e278fee88 100644 --- a/post/lib_powerpc/store.c +++ b/post/lib_powerpc/store.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/string.c b/post/lib_powerpc/string.c index 3d3f2b117c..fc460ceb9f 100644 --- a/post/lib_powerpc/string.c +++ b/post/lib_powerpc/string.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/three.c b/post/lib_powerpc/three.c index 27a32a274a..fc6f1f5674 100644 --- a/post/lib_powerpc/three.c +++ b/post/lib_powerpc/three.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/threei.c b/post/lib_powerpc/threei.c index 28c17df71e..f49c85e6b9 100644 --- a/post/lib_powerpc/threei.c +++ b/post/lib_powerpc/threei.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/threex.c b/post/lib_powerpc/threex.c index ea9e465862..6bc5a54706 100644 --- a/post/lib_powerpc/threex.c +++ b/post/lib_powerpc/threex.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/two.c b/post/lib_powerpc/two.c index 2c0efaec36..fa376c76b1 100644 --- a/post/lib_powerpc/two.c +++ b/post/lib_powerpc/two.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test diff --git a/post/lib_powerpc/twox.c b/post/lib_powerpc/twox.c index eae4c57244..5c36012a9b 100644 --- a/post/lib_powerpc/twox.c +++ b/post/lib_powerpc/twox.c @@ -5,6 +5,7 @@ */ #include +#include /* * CPU test