Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 355482
b: refs/heads/master
c: f2a9419
h: refs/heads/master
v: v3
  • Loading branch information
Barry Song authored and Barry Song committed Jan 22, 2013
1 parent 56701a1 commit 53c9a44
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 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: 598548facd3c55d1da230a2cc0e6026053b04594
refs/heads/master: f2a94192d953990c5c928f52dd4122a67f93b980
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-prima2/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
.map_io = sirfsoc_map_lluart,
.init_irq = sirfsoc_of_irq_init,
.init_time = sirfsoc_prima2_timer_init,
#ifdef CONFIG_MULTI_IRQ_HANDLER
.handle_irq = sirfsoc_handle_irq,
#endif
.dma_zone_size = SZ_256M,
.init_machine = sirfsoc_mach_init,
.init_late = sirfsoc_init_late,
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-prima2/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@

#include <linux/init.h>
#include <asm/mach/time.h>
#include <asm/exception.h>

extern void sirfsoc_prima2_timer_init(void);

extern void __init sirfsoc_of_irq_init(void);
extern void __init sirfsoc_of_clk_init(void);
extern void sirfsoc_restart(char, const char *);
extern asmlinkage void __exception_irq_entry sirfsoc_handle_irq(struct pt_regs *regs);

#ifndef CONFIG_DEBUG_LL
static inline void sirfsoc_map_lluart(void) {}
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-prima2/include/mach/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#define __ASM_ARCH_IRQS_H

#define SIRFSOC_INTENAL_IRQ_START 0
#define SIRFSOC_INTENAL_IRQ_END 59
#define SIRFSOC_INTENAL_IRQ_END 127
#define SIRFSOC_GPIO_IRQ_START (SIRFSOC_INTENAL_IRQ_END + 1)
#define NR_IRQS 220
#define NR_IRQS 288

#endif
16 changes: 14 additions & 2 deletions trunk/arch/arm/mach-prima2/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <mach/hardware.h>
#include <asm/mach/irq.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/irqdomain.h>
#include <linux/syscore_ops.h>
#include <asm/mach/irq.h>
#include <asm/exception.h>
#include <mach/hardware.h>

#define SIRFSOC_INT_RISC_MASK0 0x0018
#define SIRFSOC_INT_RISC_MASK1 0x001C
#define SIRFSOC_INT_RISC_LEVEL0 0x0020
#define SIRFSOC_INT_RISC_LEVEL1 0x0024
#define SIRFSOC_INIT_IRQ_ID 0x0038

void __iomem *sirfsoc_intc_base;

Expand Down Expand Up @@ -52,6 +54,16 @@ static __init void sirfsoc_irq_init(void)
writel_relaxed(0, sirfsoc_intc_base + SIRFSOC_INT_RISC_MASK1);
}

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

irqstat = readl_relaxed(sirfsoc_intc_base + SIRFSOC_INIT_IRQ_ID);
irqnr = irqstat & 0xff;

handle_IRQ(irqnr, regs);
}

static struct of_device_id intc_ids[] = {
{ .compatible = "sirf,prima2-intc" },
{},
Expand Down

0 comments on commit 53c9a44

Please sign in to comment.