diff options
author | Tom Rini <trini@konsulko.com> | 2017-04-06 20:42:18 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-04-06 20:42:18 -0400 |
commit | 01abae4d04868dede60947867699bf096a1831ff (patch) | |
tree | 36cf207784fb6d9b61b533bf6df7d1281a34745e /arch/arm | |
parent | d53ecad92f06d2e38a5cbc13af7473867c7fa277 (diff) |
Remove various unused interrupt related code
With d53ecad92f06 some unused interrupt related code was removed.
However all of these options are currently unused. Rather than migrate
some of these options to Kconfig we just remove the code in question.
The only related code changes here are that in some cases we use
CONFIG_STACKSIZE in non-IRQ related context. In these cases we rename
and move the value local to the code in question.
Fixes: d53ecad92f06 ("Merge branch 'master' of git://git.denx.de/u-boot-sunxi")
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/cpu/arm720t/interrupts.c | 6 | ||||
-rw-r--r-- | arch/arm/cpu/arm920t/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/cpu/arm920t/s3c24x0/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/cpu/sa1100/cpu.c | 4 | ||||
-rw-r--r-- | arch/arm/lib/interrupts.c | 73 | ||||
-rw-r--r-- | arch/arm/lib/stack.c | 8 | ||||
-rw-r--r-- | arch/arm/lib/vectors.S | 33 | ||||
-rw-r--r-- | arch/arm/mach-davinci/misc.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-keystone/cmd_ddr3.c | 3 |
9 files changed, 2 insertions, 129 deletions
diff --git a/arch/arm/cpu/arm720t/interrupts.c b/arch/arm/cpu/arm720t/interrupts.c index e8ba1ae09e..1edb1a439a 100644 --- a/arch/arm/cpu/arm720t/interrupts.c +++ b/arch/arm/cpu/arm720t/interrupts.c @@ -12,12 +12,6 @@ #include <common.h> -#ifdef CONFIG_USE_IRQ -void do_irq (struct pt_regs *pt_regs) -{ -} -#endif - #if defined(CONFIG_TEGRA) static ulong timestamp; static ulong lastdec; diff --git a/arch/arm/cpu/arm920t/Makefile b/arch/arm/cpu/arm920t/Makefile index 7aa432a6fc..8faf34b87e 100644 --- a/arch/arm/cpu/arm920t/Makefile +++ b/arch/arm/cpu/arm920t/Makefile @@ -8,7 +8,6 @@ extra-y = start.o obj-y += cpu.o -obj-$(CONFIG_USE_IRQ) += interrupts.o obj-$(CONFIG_EP93XX) += ep93xx/ obj-$(CONFIG_IMX) += imx/ diff --git a/arch/arm/cpu/arm920t/s3c24x0/Makefile b/arch/arm/cpu/arm920t/s3c24x0/Makefile index e44c549ba0..e78f8a017c 100644 --- a/arch/arm/cpu/arm920t/s3c24x0/Makefile +++ b/arch/arm/cpu/arm920t/s3c24x0/Makefile @@ -5,7 +5,6 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-$(CONFIG_USE_IRQ) += interrupts.o obj-$(CONFIG_DISPLAY_CPUINFO) += cpu_info.o obj-y += speed.o obj-y += timer.o diff --git a/arch/arm/cpu/sa1100/cpu.c b/arch/arm/cpu/sa1100/cpu.c index 4c9752a1c8..59585af83a 100644 --- a/arch/arm/cpu/sa1100/cpu.c +++ b/arch/arm/cpu/sa1100/cpu.c @@ -19,10 +19,6 @@ #include <asm/system.h> #include <asm/io.h> -#ifdef CONFIG_USE_IRQ -DECLARE_GLOBAL_DATA_PTR; -#endif - static void cache_flush(void); int cleanup_before_linux (void) diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c index ed83043abb..066c172bb3 100644 --- a/arch/arm/lib/interrupts.c +++ b/arch/arm/lib/interrupts.c @@ -26,75 +26,6 @@ DECLARE_GLOBAL_DATA_PTR; -#ifdef CONFIG_USE_IRQ -int interrupt_init (void) -{ - unsigned long cpsr; - - /* - * setup up stacks if necessary - */ - IRQ_STACK_START = gd->irq_sp - 4; - IRQ_STACK_START_IN = gd->irq_sp + 8; - FIQ_STACK_START = IRQ_STACK_START - CONFIG_STACKSIZE_IRQ; - - - __asm__ __volatile__("mrs %0, cpsr\n" - : "=r" (cpsr) - : - : "memory"); - - __asm__ __volatile__("msr cpsr_c, %0\n" - "mov sp, %1\n" - : - : "r" (IRQ_MODE | I_BIT | F_BIT | (cpsr & ~FIQ_MODE)), - "r" (IRQ_STACK_START) - : "memory"); - - __asm__ __volatile__("msr cpsr_c, %0\n" - "mov sp, %1\n" - : - : "r" (FIQ_MODE | I_BIT | F_BIT | (cpsr & ~IRQ_MODE)), - "r" (FIQ_STACK_START) - : "memory"); - - __asm__ __volatile__("msr cpsr_c, %0" - : - : "r" (cpsr) - : "memory"); - - return arch_interrupt_init(); -} - -/* enable IRQ interrupts */ -void enable_interrupts (void) -{ - unsigned long temp; - __asm__ __volatile__("mrs %0, cpsr\n" - "bic %0, %0, #0x80\n" - "msr cpsr_c, %0" - : "=r" (temp) - : - : "memory"); -} - - -/* - * disable IRQ/FIQ interrupts - * returns true if interrupts had been enabled before we disabled them - */ -int disable_interrupts (void) -{ - unsigned long old,temp; - __asm__ __volatile__("mrs %0, cpsr\n" - "orr %1, %0, #0xc0\n" - "msr cpsr_c, %1" - : "=r" (old), "=r" (temp) - : - : "memory"); - return (old & 0x80) == 0; -} -#else int interrupt_init (void) { /* @@ -113,8 +44,6 @@ int disable_interrupts (void) { return 0; } -#endif - void bad_mode (void) { @@ -212,7 +141,6 @@ void do_fiq (struct pt_regs *pt_regs) bad_mode (); } -#ifndef CONFIG_USE_IRQ void do_irq (struct pt_regs *pt_regs) { efi_restore_gd(); @@ -220,4 +148,3 @@ void do_irq (struct pt_regs *pt_regs) show_regs (pt_regs); bad_mode (); } -#endif diff --git a/arch/arm/lib/stack.c b/arch/arm/lib/stack.c index 4614d2657c..737622d26f 100644 --- a/arch/arm/lib/stack.c +++ b/arch/arm/lib/stack.c @@ -25,14 +25,6 @@ int arch_reserve_stacks(void) gd->irq_sp = gd->start_addr_sp; # if !defined(CONFIG_ARM64) -# ifdef CONFIG_USE_IRQ - gd->start_addr_sp -= (CONFIG_STACKSIZE_IRQ + CONFIG_STACKSIZE_FIQ); - debug("Reserving %zu Bytes for IRQ stack at: %08lx\n", - CONFIG_STACKSIZE_IRQ + CONFIG_STACKSIZE_FIQ, gd->start_addr_sp); - - /* 8-byte alignment for ARM ABI compliance */ - gd->start_addr_sp &= ~0x07; -# endif /* leave 3 words for abort-stack, plus 1 for alignment */ gd->start_addr_sp -= 16; # endif diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S index 9fe7415b66..f53b1e9a2b 100644 --- a/arch/arm/lib/vectors.S +++ b/arch/arm/lib/vectors.S @@ -128,19 +128,6 @@ fiq: IRQ_STACK_START_IN: .word 0x0badc0de -#ifdef CONFIG_USE_IRQ -/* IRQ stack memory (calculated at run-time) */ -.globl IRQ_STACK_START -IRQ_STACK_START: - .word 0x0badc0de - -/* IRQ stack memory (calculated at run-time) */ -.globl FIQ_STACK_START -FIQ_STACK_START: - .word 0x0badc0de - -#endif /* CONFIG_USE_IRQ */ - @ @ IRQ stack frame. @ @@ -264,24 +251,6 @@ not_used: bad_save_user_regs bl do_not_used -#ifdef CONFIG_USE_IRQ - - .align 5 -irq: - get_irq_stack - irq_save_user_regs - bl do_irq - irq_restore_user_regs - - .align 5 -fiq: - get_fiq_stack - /* someone ought to write a more effiction fiq_save_user_regs */ - irq_save_user_regs - bl do_fiq - irq_restore_user_regs - -#else .align 5 irq: @@ -295,6 +264,4 @@ fiq: bad_save_user_regs bl do_fiq -#endif /* CONFIG_USE_IRQ */ - #endif /* CONFIG_SPL_BUILD */ diff --git a/arch/arm/mach-davinci/misc.c b/arch/arm/mach-davinci/misc.c index e1064e0a2f..ec331ba6bb 100644 --- a/arch/arm/mach-davinci/misc.c +++ b/arch/arm/mach-davinci/misc.c @@ -107,7 +107,6 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr) #endif /* CONFIG_DRIVER_TI_EMAC */ #if defined(CONFIG_SOC_DA8XX) -#ifndef CONFIG_USE_IRQ void irq_init(void) { /* @@ -122,7 +121,6 @@ void irq_init(void) writel(0xffffffff, &davinci_aintc_regs->ecr2); writel(0xffffffff, &davinci_aintc_regs->ecr3); } -#endif /* * Enable PSC for various peripherals. diff --git a/arch/arm/mach-keystone/cmd_ddr3.c b/arch/arm/mach-keystone/cmd_ddr3.c index ea78ad8fd5..d3eab0711c 100644 --- a/arch/arm/mach-keystone/cmd_ddr3.c +++ b/arch/arm/mach-keystone/cmd_ddr3.c @@ -15,12 +15,13 @@ DECLARE_GLOBAL_DATA_PTR; #define DDR_MIN_ADDR CONFIG_SYS_SDRAM_BASE +#define STACKSIZE (512 << 10) /* 512 KiB */ #define DDR_REMAP_ADDR 0x80000000 #define ECC_START_ADDR1 ((DDR_MIN_ADDR - DDR_REMAP_ADDR) >> 17) #define ECC_END_ADDR1 (((gd->start_addr_sp - DDR_REMAP_ADDR - \ - CONFIG_STACKSIZE) >> 17) - 2) + STACKSIZE) >> 17) - 2) #define DDR_TEST_BURST_SIZE 1024 |