xref: /linux/arch/sh/boards/mach-se/7751/setup.c (revision 95d210ce6b23ec8916f97ec0cc7eb4d5fa80e0b3)
1da2014a2SPaul Mundt /*
2da2014a2SPaul Mundt  * linux/arch/sh/boards/se/7751/setup.c
3da2014a2SPaul Mundt  *
4da2014a2SPaul Mundt  * Copyright (C) 2000  Kazumoto Kojima
5da2014a2SPaul Mundt  *
6da2014a2SPaul Mundt  * Hitachi SolutionEngine Support.
7da2014a2SPaul Mundt  *
8da2014a2SPaul Mundt  * Modified for 7751 Solution Engine by
9da2014a2SPaul Mundt  * Ian da Silva and Jeremy Siegel, 2001.
10da2014a2SPaul Mundt  */
11da2014a2SPaul Mundt #include <linux/init.h>
12da2014a2SPaul Mundt #include <linux/platform_device.h>
13da2014a2SPaul Mundt #include <asm/machvec.h>
14939a24a6SPaul Mundt #include <mach-se/mach/se7751.h>
15da2014a2SPaul Mundt #include <asm/io.h>
16da2014a2SPaul Mundt #include <asm/heartbeat.h>
17da2014a2SPaul Mundt 
18da2014a2SPaul Mundt static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
19da2014a2SPaul Mundt 
20da2014a2SPaul Mundt static struct heartbeat_data heartbeat_data = {
21da2014a2SPaul Mundt 	.bit_pos	= heartbeat_bit_pos,
22da2014a2SPaul Mundt 	.nr_bits	= ARRAY_SIZE(heartbeat_bit_pos),
23da2014a2SPaul Mundt };
24da2014a2SPaul Mundt 
25da2014a2SPaul Mundt static struct resource heartbeat_resources[] = {
26da2014a2SPaul Mundt 	[0] = {
27da2014a2SPaul Mundt 		.start	= PA_LED,
28da2014a2SPaul Mundt 		.end	= PA_LED,
29da2014a2SPaul Mundt 		.flags	= IORESOURCE_MEM,
30da2014a2SPaul Mundt 	},
31da2014a2SPaul Mundt };
32da2014a2SPaul Mundt 
33da2014a2SPaul Mundt static struct platform_device heartbeat_device = {
34da2014a2SPaul Mundt 	.name		= "heartbeat",
35da2014a2SPaul Mundt 	.id		= -1,
36da2014a2SPaul Mundt 	.dev	= {
37da2014a2SPaul Mundt 		.platform_data	= &heartbeat_data,
38da2014a2SPaul Mundt 	},
39da2014a2SPaul Mundt 	.num_resources	= ARRAY_SIZE(heartbeat_resources),
40da2014a2SPaul Mundt 	.resource	= heartbeat_resources,
41da2014a2SPaul Mundt };
42da2014a2SPaul Mundt 
43da2014a2SPaul Mundt static struct platform_device *se7751_devices[] __initdata = {
44da2014a2SPaul Mundt 	&heartbeat_device,
45da2014a2SPaul Mundt };
46da2014a2SPaul Mundt 
47da2014a2SPaul Mundt static int __init se7751_devices_setup(void)
48da2014a2SPaul Mundt {
49da2014a2SPaul Mundt 	return platform_add_devices(se7751_devices, ARRAY_SIZE(se7751_devices));
50da2014a2SPaul Mundt }
51*95d210ceSNobuhiro Iwamatsu device_initcall(se7751_devices_setup);
52da2014a2SPaul Mundt 
53da2014a2SPaul Mundt /*
54da2014a2SPaul Mundt  * The Machine Vector
55da2014a2SPaul Mundt  */
56da2014a2SPaul Mundt static struct sh_machine_vector mv_7751se __initmv = {
57da2014a2SPaul Mundt 	.mv_name		= "7751 SolutionEngine",
58da2014a2SPaul Mundt 	.mv_nr_irqs		= 72,
59da2014a2SPaul Mundt 	.mv_init_irq		= init_7751se_IRQ,
60da2014a2SPaul Mundt };
61