aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/renesas/x3proto/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/renesas/x3proto/setup.c')
-rw-r--r--arch/sh/boards/renesas/x3proto/setup.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/arch/sh/boards/renesas/x3proto/setup.c b/arch/sh/boards/renesas/x3proto/setup.c
new file mode 100644
index 000000000000..5dfa0f31cd2d
--- /dev/null
+++ b/arch/sh/boards/renesas/x3proto/setup.c
@@ -0,0 +1,54 @@
1/*
2 * arch/sh/boards/renesas/x3proto/setup.c
3 *
4 * Renesas SH-X3 Prototype Board Support.
5 *
6 * Copyright (C) 2007 Paul Mundt
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12#include <linux/init.h>
13#include <linux/platform_device.h>
14#include <linux/kernel.h>
15#include <linux/io.h>
16
17static struct resource heartbeat_resources[] = {
18 [0] = {
19 .start = 0xb8140020,
20 .end = 0xb8140020 + 8 - 1,
21 .flags = IORESOURCE_MEM,
22 },
23};
24
25static struct platform_device heartbeat_device = {
26 .name = "heartbeat",
27 .id = -1,
28 .num_resources = ARRAY_SIZE(heartbeat_resources),
29 .resource = heartbeat_resources,
30};
31
32static struct platform_device *x3proto_devices[] __initdata = {
33 &heartbeat_device,
34};
35
36static int __init x3proto_devices_setup(void)
37{
38 return platform_add_devices(x3proto_devices,
39 ARRAY_SIZE(x3proto_devices));
40}
41device_initcall(x3proto_devices_setup);
42
43static void __init x3proto_init_irq(void)
44{
45 plat_irq_setup_pins(IRQ_MODE_IRL3210);
46
47 /* Set ICR0.LVLMODE */
48 ctrl_outl(ctrl_inl(0xfe410000) | (1 << 21), 0xfe410000);
49}
50
51static struct sh_machine_vector mv_x3proto __initmv = {
52 .mv_name = "x3proto",
53 .mv_init_irq = x3proto_init_irq,
54};