diff options
Diffstat (limited to 'arch/sh/boards/mach-snapgear/setup.c')
-rw-r--r-- | arch/sh/boards/mach-snapgear/setup.c | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/arch/sh/boards/mach-snapgear/setup.c b/arch/sh/boards/mach-snapgear/setup.c index 331745dee379..10eeea96a04b 100644 --- a/arch/sh/boards/mach-snapgear/setup.c +++ b/arch/sh/boards/mach-snapgear/setup.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/sh/boards/snapgear/setup.c | ||
3 | * | ||
4 | * Copyright (C) 2002 David McCullough <davidm@snapgear.com> | 2 | * Copyright (C) 2002 David McCullough <davidm@snapgear.com> |
5 | * Copyright (C) 2003 Paul Mundt <lethal@linux-sh.org> | 3 | * Copyright (C) 2003 Paul Mundt <lethal@linux-sh.org> |
6 | * | 4 | * |
@@ -24,13 +22,14 @@ | |||
24 | #include <asm/io.h> | 22 | #include <asm/io.h> |
25 | #include <cpu/timer.h> | 23 | #include <cpu/timer.h> |
26 | 24 | ||
25 | unsigned short secureedge5410_ioport; | ||
26 | |||
27 | /* | 27 | /* |
28 | * EraseConfig handling functions | 28 | * EraseConfig handling functions |
29 | */ | 29 | */ |
30 | |||
31 | static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id) | 30 | static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id) |
32 | { | 31 | { |
33 | (void)__raw_readb(0xb8000000); /* dummy read */ | 32 | ctrl_delay(); /* dummy read */ |
34 | 33 | ||
35 | printk("SnapGear: erase switch interrupt!\n"); | 34 | printk("SnapGear: erase switch interrupt!\n"); |
36 | 35 | ||
@@ -39,21 +38,22 @@ static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id) | |||
39 | 38 | ||
40 | static int __init eraseconfig_init(void) | 39 | static int __init eraseconfig_init(void) |
41 | { | 40 | { |
41 | unsigned int irq = evt2irq(0x240); | ||
42 | |||
42 | printk("SnapGear: EraseConfig init\n"); | 43 | printk("SnapGear: EraseConfig init\n"); |
44 | |||
43 | /* Setup "EraseConfig" switch on external IRQ 0 */ | 45 | /* Setup "EraseConfig" switch on external IRQ 0 */ |
44 | if (request_irq(IRL0_IRQ, eraseconfig_interrupt, IRQF_DISABLED, | 46 | if (request_irq(irq, eraseconfig_interrupt, IRQF_DISABLED, |
45 | "Erase Config", NULL)) | 47 | "Erase Config", NULL)) |
46 | printk("SnapGear: failed to register IRQ%d for Reset witch\n", | 48 | printk("SnapGear: failed to register IRQ%d for Reset witch\n", |
47 | IRL0_IRQ); | 49 | irq); |
48 | else | 50 | else |
49 | printk("SnapGear: registered EraseConfig switch on IRQ%d\n", | 51 | printk("SnapGear: registered EraseConfig switch on IRQ%d\n", |
50 | IRL0_IRQ); | 52 | irq); |
51 | return(0); | 53 | return 0; |
52 | } | 54 | } |
53 | |||
54 | module_init(eraseconfig_init); | 55 | module_init(eraseconfig_init); |
55 | 56 | ||
56 | /****************************************************************************/ | ||
57 | /* | 57 | /* |
58 | * Initialize IRQ setting | 58 | * Initialize IRQ setting |
59 | * | 59 | * |
@@ -62,7 +62,6 @@ module_init(eraseconfig_init); | |||
62 | * IRL2 = eth1 | 62 | * IRL2 = eth1 |
63 | * IRL3 = crypto | 63 | * IRL3 = crypto |
64 | */ | 64 | */ |
65 | |||
66 | static void __init init_snapgear_IRQ(void) | 65 | static void __init init_snapgear_IRQ(void) |
67 | { | 66 | { |
68 | printk("Setup SnapGear IRQ/IPR ...\n"); | 67 | printk("Setup SnapGear IRQ/IPR ...\n"); |
@@ -76,20 +75,5 @@ static void __init init_snapgear_IRQ(void) | |||
76 | static struct sh_machine_vector mv_snapgear __initmv = { | 75 | static struct sh_machine_vector mv_snapgear __initmv = { |
77 | .mv_name = "SnapGear SecureEdge5410", | 76 | .mv_name = "SnapGear SecureEdge5410", |
78 | .mv_nr_irqs = 72, | 77 | .mv_nr_irqs = 72, |
79 | |||
80 | .mv_inb = snapgear_inb, | ||
81 | .mv_inw = snapgear_inw, | ||
82 | .mv_inl = snapgear_inl, | ||
83 | .mv_outb = snapgear_outb, | ||
84 | .mv_outw = snapgear_outw, | ||
85 | .mv_outl = snapgear_outl, | ||
86 | |||
87 | .mv_inb_p = snapgear_inb_p, | ||
88 | .mv_inw_p = snapgear_inw, | ||
89 | .mv_inl_p = snapgear_inl, | ||
90 | .mv_outb_p = snapgear_outb_p, | ||
91 | .mv_outw_p = snapgear_outw, | ||
92 | .mv_outl_p = snapgear_outl, | ||
93 | |||
94 | .mv_init_irq = init_snapgear_IRQ, | 78 | .mv_init_irq = init_snapgear_IRQ, |
95 | }; | 79 | }; |