diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-08-08 02:22:04 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-09-20 22:57:48 -0400 |
commit | 94807a33dc4aaf522d3eab62db225361e5a97b2a (patch) | |
tree | fbfe908829b6a6067c200beae7cb1fed26040000 /arch/sh/boards | |
parent | 8d797cd191397b2a92b190228f07c7715c1c832a (diff) |
sh: Initial support for SH-X3 prototype board.
This adds initial support for the SH-X3 prototype board.
Only simple logic for the IRQ controller and the heartbeat driver
for now.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/renesas/x3proto/Makefile | 1 | ||||
-rw-r--r-- | arch/sh/boards/renesas/x3proto/setup.c | 54 |
2 files changed, 55 insertions, 0 deletions
diff --git a/arch/sh/boards/renesas/x3proto/Makefile b/arch/sh/boards/renesas/x3proto/Makefile new file mode 100644 index 000000000000..2b9dba458932 --- /dev/null +++ b/arch/sh/boards/renesas/x3proto/Makefile | |||
@@ -0,0 +1 @@ | |||
obj-y += setup.o | |||
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 | |||
17 | static struct resource heartbeat_resources[] = { | ||
18 | [0] = { | ||
19 | .start = 0xb8140020, | ||
20 | .end = 0xb8140020 + 8 - 1, | ||
21 | .flags = IORESOURCE_MEM, | ||
22 | }, | ||
23 | }; | ||
24 | |||
25 | static struct platform_device heartbeat_device = { | ||
26 | .name = "heartbeat", | ||
27 | .id = -1, | ||
28 | .num_resources = ARRAY_SIZE(heartbeat_resources), | ||
29 | .resource = heartbeat_resources, | ||
30 | }; | ||
31 | |||
32 | static struct platform_device *x3proto_devices[] __initdata = { | ||
33 | &heartbeat_device, | ||
34 | }; | ||
35 | |||
36 | static int __init x3proto_devices_setup(void) | ||
37 | { | ||
38 | return platform_add_devices(x3proto_devices, | ||
39 | ARRAY_SIZE(x3proto_devices)); | ||
40 | } | ||
41 | device_initcall(x3proto_devices_setup); | ||
42 | |||
43 | static 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 | |||
51 | static struct sh_machine_vector mv_x3proto __initmv = { | ||
52 | .mv_name = "x3proto", | ||
53 | .mv_init_irq = x3proto_init_irq, | ||
54 | }; | ||