summaryrefslogtreecommitdiff
path: root/arch/arm/lib
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-04-07 00:42:18 (GMT)
committerTom Rini <trini@konsulko.com>2017-04-07 00:42:18 (GMT)
commit01abae4d04868dede60947867699bf096a1831ff (patch)
tree36cf207784fb6d9b61b533bf6df7d1281a34745e /arch/arm/lib
parentd53ecad92f06d2e38a5cbc13af7473867c7fa277 (diff)
downloadu-boot-fsl-qoriq-01abae4d04868dede60947867699bf096a1831ff.tar.xz
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/lib')
-rw-r--r--arch/arm/lib/interrupts.c73
-rw-r--r--arch/arm/lib/stack.c8
-rw-r--r--arch/arm/lib/vectors.S33
3 files changed, 0 insertions, 114 deletions
diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c
index ed83043..066c172 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 4614d26..737622d 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 9fe7415..f53b1e9 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 */