18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * linux/arch/sh/boards/se/7751/setup.c
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2000  Kazumoto Kojima
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Hitachi SolutionEngine Support.
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * Modified for 7751 Solution Engine by
108c2ecf20Sopenharmony_ci * Ian da Silva and Jeremy Siegel, 2001.
118c2ecf20Sopenharmony_ci */
128c2ecf20Sopenharmony_ci#include <linux/init.h>
138c2ecf20Sopenharmony_ci#include <linux/platform_device.h>
148c2ecf20Sopenharmony_ci#include <asm/machvec.h>
158c2ecf20Sopenharmony_ci#include <mach-se/mach/se7751.h>
168c2ecf20Sopenharmony_ci#include <asm/io.h>
178c2ecf20Sopenharmony_ci#include <asm/heartbeat.h>
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_cistatic unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_cistatic struct heartbeat_data heartbeat_data = {
228c2ecf20Sopenharmony_ci	.bit_pos	= heartbeat_bit_pos,
238c2ecf20Sopenharmony_ci	.nr_bits	= ARRAY_SIZE(heartbeat_bit_pos),
248c2ecf20Sopenharmony_ci};
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_cistatic struct resource heartbeat_resources[] = {
278c2ecf20Sopenharmony_ci	[0] = {
288c2ecf20Sopenharmony_ci		.start	= PA_LED,
298c2ecf20Sopenharmony_ci		.end	= PA_LED,
308c2ecf20Sopenharmony_ci		.flags	= IORESOURCE_MEM,
318c2ecf20Sopenharmony_ci	},
328c2ecf20Sopenharmony_ci};
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_cistatic struct platform_device heartbeat_device = {
358c2ecf20Sopenharmony_ci	.name		= "heartbeat",
368c2ecf20Sopenharmony_ci	.id		= -1,
378c2ecf20Sopenharmony_ci	.dev	= {
388c2ecf20Sopenharmony_ci		.platform_data	= &heartbeat_data,
398c2ecf20Sopenharmony_ci	},
408c2ecf20Sopenharmony_ci	.num_resources	= ARRAY_SIZE(heartbeat_resources),
418c2ecf20Sopenharmony_ci	.resource	= heartbeat_resources,
428c2ecf20Sopenharmony_ci};
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_cistatic struct platform_device *se7751_devices[] __initdata = {
458c2ecf20Sopenharmony_ci	&heartbeat_device,
468c2ecf20Sopenharmony_ci};
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_cistatic int __init se7751_devices_setup(void)
498c2ecf20Sopenharmony_ci{
508c2ecf20Sopenharmony_ci	return platform_add_devices(se7751_devices, ARRAY_SIZE(se7751_devices));
518c2ecf20Sopenharmony_ci}
528c2ecf20Sopenharmony_cidevice_initcall(se7751_devices_setup);
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ci/*
558c2ecf20Sopenharmony_ci * The Machine Vector
568c2ecf20Sopenharmony_ci */
578c2ecf20Sopenharmony_cistatic struct sh_machine_vector mv_7751se __initmv = {
588c2ecf20Sopenharmony_ci	.mv_name		= "7751 SolutionEngine",
598c2ecf20Sopenharmony_ci	.mv_init_irq		= init_7751se_IRQ,
608c2ecf20Sopenharmony_ci};
61