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