sh: mach-snapgear: Kill off machtype, consolidate board def.
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / sh / boards / board-secureedge5410.c
blob32f875e8493dede169b70e29ce9c19283264f5f9
1 /*
2 * Copyright (C) 2002 David McCullough <davidm@snapgear.com>
3 * Copyright (C) 2003 Paul Mundt <lethal@linux-sh.org>
5 * Based on files with the following comments:
7 * Copyright (C) 2000 Kazumoto Kojima
9 * Modified for 7751 Solution Engine by
10 * Ian da Silva and Jeremy Siegel, 2001.
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>
25 unsigned short secureedge5410_ioport;
28 * EraseConfig handling functions
30 static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id)
32 ctrl_delay(); /* dummy read */
34 printk("SnapGear: erase switch interrupt!\n");
36 return IRQ_HANDLED;
39 static int __init eraseconfig_init(void)
41 unsigned int irq = evt2irq(0x240);
43 printk("SnapGear: EraseConfig init\n");
45 /* Setup "EraseConfig" switch on external IRQ 0 */
46 if (request_irq(irq, eraseconfig_interrupt, IRQF_DISABLED,
47 "Erase Config", NULL))
48 printk("SnapGear: failed to register IRQ%d for Reset witch\n",
49 irq);
50 else
51 printk("SnapGear: registered EraseConfig switch on IRQ%d\n",
52 irq);
53 return 0;
55 module_init(eraseconfig_init);
58 * Initialize IRQ setting
60 * IRL0 = erase switch
61 * IRL1 = eth0
62 * IRL2 = eth1
63 * IRL3 = crypto
65 static void __init init_snapgear_IRQ(void)
67 printk("Setup SnapGear IRQ/IPR ...\n");
68 /* enable individual interrupt mode for externals */
69 plat_irq_setup_pins(IRQ_MODE_IRQ);
73 * The Machine Vector
75 static struct sh_machine_vector mv_snapgear __initmv = {
76 .mv_name = "SnapGear SecureEdge5410",
77 .mv_nr_irqs = 72,
78 .mv_init_irq = init_snapgear_IRQ,