thermal/drivers/hisi: Set the thermal zone private data to the sensor pointer
[linux/fpc-iii.git] / arch / sh / boards / board-secureedge5410.c
blob603a82325c65f0c100b9c275a4ff02d547b8a039
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Copyright (C) 2002 David McCullough <davidm@snapgear.com>
4 * Copyright (C) 2003 Paul Mundt <lethal@linux-sh.org>
6 * Based on files with the following comments:
8 * Copyright (C) 2000 Kazumoto Kojima
10 * Modified for 7751 Solution Engine by
11 * Ian da Silva and Jeremy Siegel, 2001.
13 #include <linux/init.h>
14 #include <linux/irq.h>
15 #include <linux/interrupt.h>
16 #include <linux/timer.h>
17 #include <linux/delay.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 printk("SnapGear: erase switch interrupt!\n");
34 return IRQ_HANDLED;
37 static int __init eraseconfig_init(void)
39 unsigned int irq = evt2irq(0x240);
41 printk("SnapGear: EraseConfig init\n");
43 /* Setup "EraseConfig" switch on external IRQ 0 */
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;
52 device_initcall(eraseconfig_init);
55 * Initialize IRQ setting
57 * IRL0 = erase switch
58 * IRL1 = eth0
59 * IRL2 = eth1
60 * IRL3 = crypto
62 static void __init init_snapgear_IRQ(void)
64 printk("Setup SnapGear IRQ/IPR ...\n");
65 /* enable individual interrupt mode for externals */
66 plat_irq_setup_pins(IRQ_MODE_IRQ);
70 * The Machine Vector
72 static struct sh_machine_vector mv_snapgear __initmv = {
73 .mv_name = "SnapGear SecureEdge5410",
74 .mv_init_irq = init_snapgear_IRQ,