Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272970
b: refs/heads/master
c: 1103643
h: refs/heads/master
v: v3
  • Loading branch information
Shawn Guo authored and Arnd Bergmann committed Oct 31, 2011
1 parent e0c3ac9 commit 2d530b0
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bac89d754ba333453576fd38eb6073d7f89818fe
refs/heads/master: 1103643c266ae45c7098e0f7f3ee0b68e3e7c7cc
2 changes: 1 addition & 1 deletion trunk/arch/arm/plat-mxc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Common support
obj-y := clock.o time.o devices.o cpu.o system.o irq-common.o

# MX51 uses the TZIC interrupt controller, older platforms use AVIC
obj-$(CONFIG_ARM_GIC) += gic.o
obj-$(CONFIG_MXC_TZIC) += tzic.o
obj-$(CONFIG_MXC_AVIC) += avic.o

Expand Down
48 changes: 48 additions & 0 deletions trunk/arch/arm/plat-mxc/gic.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright 2011 Freescale Semiconductor, Inc.
* Copyright 2011 Linaro Ltd.
*
* The code contained herein is licensed under the GNU General Public
* License. You may obtain a copy of the GNU General Public License
* Version 2 or later at the following locations:
*
* http://www.opensource.org/licenses/gpl-license.html
* http://www.gnu.org/copyleft/gpl.html
*/

#include <linux/io.h>
#include <asm/exception.h>
#include <asm/localtimer.h>
#include <asm/hardware/gic.h>
#ifdef CONFIG_SMP
#include <asm/smp.h>
#endif

asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
{
u32 irqstat, irqnr;

do {
irqstat = readl_relaxed(gic_cpu_base_addr + GIC_CPU_INTACK);
irqnr = irqstat & 0x3ff;
if (irqnr == 1023)
break;

if (irqnr > 29 && irqnr < 1021)
handle_IRQ(irqnr, regs);
#ifdef CONFIG_SMP
else if (irqnr < 16) {
writel_relaxed(irqstat, gic_cpu_base_addr +
GIC_CPU_EOI);
handle_IPI(irqnr, regs);
}
#endif
#ifdef CONFIG_LOCAL_TIMERS
else if (irqnr == 29) {
writel_relaxed(irqstat, gic_cpu_base_addr +
GIC_CPU_EOI);
handle_local_timer(regs);
}
#endif
} while (1);
}
2 changes: 2 additions & 0 deletions trunk/arch/arm/plat-mxc/include/mach/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ extern void imx_print_silicon_rev(const char *cpu, int srev);

void avic_handle_irq(struct pt_regs *);
void tzic_handle_irq(struct pt_regs *);
void gic_handle_irq(struct pt_regs *);

#define imx1_handle_irq avic_handle_irq
#define imx21_handle_irq avic_handle_irq
Expand All @@ -96,5 +97,6 @@ void tzic_handle_irq(struct pt_regs *);
#define imx50_handle_irq tzic_handle_irq
#define imx51_handle_irq tzic_handle_irq
#define imx53_handle_irq tzic_handle_irq
#define imx6q_handle_irq gic_handle_irq

#endif
6 changes: 6 additions & 0 deletions trunk/arch/arm/plat-mxc/include/mach/entry-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@

.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
.endm

.macro test_for_ipi, irqnr, irqstat, base, tmp
.endm

.macro test_for_ltirq, irqnr, irqstat, base, tmp
.endm

0 comments on commit 2d530b0

Please sign in to comment.