1
2
3
4
5
6
7
8
9
10
11
12#include <linux/init.h>
13#include <linux/irq.h>
14#include <linux/interrupt.h>
15#include <linux/timer.h>
16#include <linux/delay.h>
17#include <linux/module.h>
18#include <linux/sched.h>
19#include <asm/machvec.h>
20#include <mach/secureedge5410.h>
21#include <asm/irq.h>
22#include <asm/io.h>
23#include <cpu/timer.h>
24
25unsigned short secureedge5410_ioport;
26
27
28
29
30static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id)
31{
32 printk("SnapGear: erase switch interrupt!\n");
33
34 return IRQ_HANDLED;
35}
36
37static int __init eraseconfig_init(void)
38{
39 unsigned int irq = evt2irq(0x240);
40
41 printk("SnapGear: EraseConfig init\n");
42
43
44 if (request_irq(irq, eraseconfig_interrupt, 0, "Erase Config", NULL))
45 printk("SnapGear: failed to register IRQ%d for Reset witch\n",
46 irq);
47 else
48 printk("SnapGear: registered EraseConfig switch on IRQ%d\n",
49 irq);
50 return 0;
51}
52module_init(eraseconfig_init);
53
54
55
56
57
58
59
60
61
62static void __init init_snapgear_IRQ(void)
63{
64 printk("Setup SnapGear IRQ/IPR ...\n");
65
66 plat_irq_setup_pins(IRQ_MODE_IRQ);
67}
68
69
70
71
72static struct sh_machine_vector mv_snapgear __initmv = {
73 .mv_name = "SnapGear SecureEdge5410",
74 .mv_init_irq = init_snapgear_IRQ,
75};
76