2 * linux/arch/sh/boards/se/7721/setup.c
4 * Copyright (C) 2008 Renesas Solutions Corp.
6 * Hitachi UL SolutionEngine 7721 Support.
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
13 #include <linux/init.h>
14 #include <linux/platform_device.h>
15 #include <asm/machvec.h>
16 #include <asm/se7721.h>
18 #include <asm/heartbeat.h>
20 static unsigned char heartbeat_bit_pos[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
22 static struct heartbeat_data heartbeat_data = {
23 .bit_pos = heartbeat_bit_pos,
24 .nr_bits = ARRAY_SIZE(heartbeat_bit_pos),
28 static struct resource heartbeat_resources[] = {
32 .flags = IORESOURCE_MEM,
36 static struct platform_device heartbeat_device = {
40 .platform_data = &heartbeat_data,
42 .num_resources = ARRAY_SIZE(heartbeat_resources),
43 .resource = heartbeat_resources,
46 static struct resource cf_ide_resources[] = {
48 .start = PA_MRSHPC_IO + 0x1f0,
49 .end = PA_MRSHPC_IO + 0x1f0 + 8 ,
50 .flags = IORESOURCE_IO,
53 .start = PA_MRSHPC_IO + 0x1f0 + 0x206,
54 .end = PA_MRSHPC_IO + 0x1f0 + 8 + 0x206 + 8,
55 .flags = IORESOURCE_IO,
59 .flags = IORESOURCE_IRQ,
63 static struct platform_device cf_ide_device = {
64 .name = "pata_platform",
66 .num_resources = ARRAY_SIZE(cf_ide_resources),
67 .resource = cf_ide_resources,
70 static struct platform_device *se7721_devices[] __initdata = {
75 static int __init se7721_devices_setup(void)
77 return platform_add_devices(se7721_devices,
78 ARRAY_SIZE(se7721_devices));
80 device_initcall(se7721_devices_setup);
82 static void __init se7721_setup(char **cmdline_p)
85 ctrl_outw(0x0000, 0xA405010C); /* PGCR */
86 ctrl_outw(0x0000, 0xA405010E); /* PHCR */
87 ctrl_outw(0x00AA, 0xA4050118); /* PPCR */
88 ctrl_outw(0x0000, 0xA4050124); /* PSELA */
94 struct sh_machine_vector mv_se7721 __initmv = {
95 .mv_name = "Solution Engine 7721",
96 .mv_setup = se7721_setup,
98 .mv_init_irq = init_se7721_IRQ,