1 // SPDX-License-Identifier: GPL-2.0
4 * linux/arch/sh/boards/se/7206/setup.c
6 * Copyright (C) 2006 Yoshinori Sato
7 * Copyright (C) 2007 - 2008 Paul Mundt
9 * Hitachi 7206 SolutionEngine Support.
11 #include <linux/init.h>
12 #include <linux/platform_device.h>
13 #include <linux/smc91x.h>
14 #include <mach-se/mach/se7206.h>
16 #include <asm/machvec.h>
17 #include <asm/heartbeat.h>
19 static struct resource smc91x_resources
[] = {
21 .name
= "smc91x-regs",
22 .start
= PA_SMSC
+ 0x300,
23 .end
= PA_SMSC
+ 0x300 + 0x020 - 1,
24 .flags
= IORESOURCE_MEM
,
29 .flags
= IORESOURCE_IRQ
,
33 static struct smc91x_platdata smc91x_info
= {
34 .flags
= SMC91X_USE_16BIT
,
37 static struct platform_device smc91x_device
= {
42 .coherent_dma_mask
= 0xffffffff,
43 .platform_data
= &smc91x_info
,
45 .num_resources
= ARRAY_SIZE(smc91x_resources
),
46 .resource
= smc91x_resources
,
49 static unsigned char heartbeat_bit_pos
[] = { 8, 9, 10, 11, 12, 13, 14, 15 };
51 static struct heartbeat_data heartbeat_data
= {
52 .bit_pos
= heartbeat_bit_pos
,
53 .nr_bits
= ARRAY_SIZE(heartbeat_bit_pos
),
56 static struct resource heartbeat_resource
= {
59 .flags
= IORESOURCE_MEM
| IORESOURCE_MEM_32BIT
,
62 static struct platform_device heartbeat_device
= {
66 .platform_data
= &heartbeat_data
,
69 .resource
= &heartbeat_resource
,
72 static struct platform_device
*se7206_devices
[] __initdata
= {
77 static int __init
se7206_devices_setup(void)
79 return platform_add_devices(se7206_devices
, ARRAY_SIZE(se7206_devices
));
81 device_initcall(se7206_devices_setup
);
83 static int se7206_mode_pins(void)
85 return MODE_PIN1
| MODE_PIN2
;
92 static struct sh_machine_vector mv_se __initmv
= {
93 .mv_name
= "SolutionEngine",
94 .mv_init_irq
= init_se7206_IRQ
,
95 .mv_mode_pins
= se7206_mode_pins
,