Browse Source

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 <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass 4 years ago
parent
commit
36bf446b64
61 changed files with 69 additions and 7 deletions
  1. 1 0
      arch/arc/lib/bootm.c
  2. 1 0
      arch/arm/cpu/arm11/cpu.c
  3. 1 0
      arch/arm/cpu/arm920t/cpu.c
  4. 1 0
      arch/arm/cpu/arm926ejs/cpu.c
  5. 1 0
      arch/arm/cpu/arm946es/cpu.c
  6. 1 0
      arch/arm/cpu/armv7/cpu.c
  7. 1 0
      arch/arm/cpu/armv7m/cpu.c
  8. 1 0
      arch/arm/cpu/armv8/cpu.c
  9. 1 0
      arch/arm/cpu/pxa/pxa2xx.c
  10. 1 0
      arch/arm/cpu/sa1100/cpu.c
  11. 1 0
      arch/arm/lib/reset.c
  12. 1 0
      arch/arm/mach-tegra/cmd_enterrcm.c
  13. 2 0
      arch/microblaze/include/asm/microblaze_intc.h
  14. 1 0
      arch/nds32/cpu/n1213/ag101/cpu.c
  15. 1 0
      arch/nios2/cpu/cpu.c
  16. 1 0
      arch/nios2/lib/bootm.c
  17. 1 0
      arch/powerpc/cpu/mpc83xx/cpu.c
  18. 1 0
      arch/powerpc/cpu/mpc83xx/ecc.c
  19. 1 0
      arch/powerpc/cpu/mpc85xx/cpu.c
  20. 1 0
      arch/riscv/cpu/generic/cpu.c
  21. 1 0
      arch/sh/cpu/sh4/cpu.c
  22. 1 0
      arch/sh/lib/zimageboot.c
  23. 1 0
      arch/x86/lib/zimage.c
  24. 1 0
      board/bosch/shc/board.c
  25. 1 0
      board/cobra5272/flash.c
  26. 1 0
      board/freescale/b4860qds/b4860qds.c
  27. 1 0
      board/freescale/common/vid.c
  28. 1 0
      board/freescale/m5253demo/flash.c
  29. 1 0
      board/freescale/t4qds/t4240qds.c
  30. 1 0
      board/synopsys/hsdk/hsdk.c
  31. 1 0
      cmd/booti.c
  32. 1 0
      cmd/bootz.c
  33. 1 0
      cmd/fdc.c
  34. 1 0
      cmd/irq.c
  35. 1 0
      common/board_r.c
  36. 1 0
      common/bootm.c
  37. 1 0
      drivers/firmware/psci.c
  38. 1 0
      drivers/mtd/pic32_flash.c
  39. 0 6
      include/common.h
  40. 2 0
      include/exports.h
  41. 8 1
      include/irq_func.h
  42. 1 0
      lib/efi_loader/efi_boottime.c
  43. 1 0
      post/lib_powerpc/andi.c
  44. 1 0
      post/lib_powerpc/b.c
  45. 1 0
      post/lib_powerpc/cmp.c
  46. 1 0
      post/lib_powerpc/cmpi.c
  47. 1 0
      post/lib_powerpc/complex.c
  48. 1 0
      post/lib_powerpc/cr.c
  49. 1 0
      post/lib_powerpc/load.c
  50. 1 0
      post/lib_powerpc/multi.c
  51. 1 0
      post/lib_powerpc/rlwimi.c
  52. 1 0
      post/lib_powerpc/rlwinm.c
  53. 1 0
      post/lib_powerpc/rlwnm.c
  54. 1 0
      post/lib_powerpc/srawi.c
  55. 1 0
      post/lib_powerpc/store.c
  56. 1 0
      post/lib_powerpc/string.c
  57. 1 0
      post/lib_powerpc/three.c
  58. 1 0
      post/lib_powerpc/threei.c
  59. 1 0
      post/lib_powerpc/threex.c
  60. 1 0
      post/lib_powerpc/two.c
  61. 1 0
      post/lib_powerpc/twox.c

+ 1 - 0
arch/arc/lib/bootm.c

@@ -3,6 +3,7 @@
  * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
  */
 
+#include <irq_func.h>
 #include <asm/cache.h>
 #include <common.h>
 

+ 1 - 0
arch/arm/cpu/arm11/cpu.c

@@ -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);

+ 1 - 0
arch/arm/cpu/arm920t/cpu.c

@@ -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);

+ 1 - 0
arch/arm/cpu/arm926ejs/cpu.c

@@ -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);

+ 1 - 0
arch/arm/cpu/arm946es/cpu.c

@@ -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>
 

+ 1 - 0
arch/arm/cpu/armv7/cpu.c

@@ -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>

+ 1 - 0
arch/arm/cpu/armv7m/cpu.c

@@ -9,6 +9,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <asm/io.h>
 #include <asm/armv7m.h>
 

+ 1 - 0
arch/arm/cpu/armv8/cpu.c

@@ -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>

+ 1 - 0
arch/arm/cpu/pxa/pxa2xx.c

@@ -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>

+ 1 - 0
arch/arm/cpu/sa1100/cpu.c

@@ -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>
 

+ 1 - 0
arch/arm/lib/reset.c

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

+ 1 - 0
arch/arm/mach-tegra/cmd_enterrcm.c

@@ -25,6 +25,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 #include <asm/arch/tegra.h>
 #include <asm/arch-tegra/pmc.h>
 

+ 2 - 0
arch/microblaze/include/asm/microblaze_intc.h

@@ -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 */

+ 1 - 0
arch/nds32/cpu/n1213/ag101/cpu.c

@@ -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>
 

+ 1 - 0
arch/nios2/cpu/cpu.c

@@ -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;

+ 1 - 0
arch/nios2/lib/bootm.c

@@ -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 */
 

+ 1 - 0
arch/powerpc/cpu/mpc83xx/cpu.c

@@ -11,6 +11,7 @@
 
 #include <common.h>
 #include <cpu_func.h>
+#include <irq_func.h>
 #include <vsprintf.h>
 #include <watchdog.h>
 #include <command.h>

+ 1 - 0
arch/powerpc/cpu/mpc83xx/ecc.c

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

+ 1 - 0
arch/powerpc/cpu/mpc85xx/cpu.c

@@ -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>

+ 1 - 0
arch/riscv/cpu/generic/cpu.c

@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <irq_func.h>
 
 /*
  * cleanup_before_linux() is called just before we call linux

+ 1 - 0
arch/sh/cpu/sh4/cpu.c

@@ -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>

+ 1 - 0
arch/sh/lib/zimageboot.c

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

+ 1 - 0
arch/x86/lib/zimage.c

@@ -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>

+ 1 - 0
board/bosch/shc/board.c

@@ -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>

+ 1 - 0
board/cobra5272/flash.c

@@ -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

+ 1 - 0
board/freescale/b4860qds/b4860qds.c

@@ -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>

+ 1 - 0
board/freescale/common/vid.c

@@ -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>

+ 1 - 0
board/freescale/m5253demo/flash.c

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

+ 1 - 0
board/freescale/t4qds/t4240qds.c

@@ -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>

+ 1 - 0
board/synopsys/hsdk/hsdk.c

@@ -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>

+ 1 - 0
cmd/booti.c

@@ -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>

+ 1 - 0
cmd/bootz.c

@@ -7,6 +7,7 @@
 #include <common.h>
 #include <bootm.h>
 #include <command.h>
+#include <irq_func.h>
 #include <lmb.h>
 #include <linux/compiler.h>
 

+ 1 - 0
cmd/fdc.c

@@ -11,6 +11,7 @@
 #include <config.h>
 #include <command.h>
 #include <image.h>
+#include <irq_func.h>
 
 
 #undef	FDC_DEBUG

+ 1 - 0
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[])

+ 1 - 0
common/board_r.c

@@ -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)

+ 1 - 0
common/bootm.c

@@ -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>

+ 1 - 0
drivers/firmware/psci.c

@@ -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>

+ 1 - 0
drivers/mtd/pic32_flash.c

@@ -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>
 

+ 0 - 6
include/common.h

@@ -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>
 

+ 2 - 0
include/exports.h

@@ -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 */

+ 8 - 1
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

+ 1 - 0
lib/efi_loader/efi_boottime.c

@@ -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>

+ 1 - 0
post/lib_powerpc/andi.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/b.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/cmp.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/cmpi.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/complex.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/cr.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/load.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/multi.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/rlwimi.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/rlwinm.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/rlwnm.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/srawi.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/store.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/string.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/three.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/threei.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/threex.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/two.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test

+ 1 - 0
post/lib_powerpc/twox.c

@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <irq_func.h>
 
 /*
  * CPU test