aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/boards/se/7343/setup.c
blob: 787322291fb34d4f77e4b66ff23cba8d990cdc37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#include <linux/config.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <asm/machvec.h>
#include <asm/mach/se7343.h>
#include <asm/irq.h>

void heartbeat_7343se(void);
void init_7343se_IRQ(void);

static struct resource smc91x_resources[] = {
	[0] = {
		.start	= 0x10000000,
		.end	= 0x1000000F,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		/*
		 * shared with other devices via externel
		 * interrupt controller in FPGA...
		 */
		.start	= EXT_IRQ2,
		.end	= EXT_IRQ2,
		.flags	= IORESOURCE_IRQ,
	},
};

static struct platform_device smc91x_device = {
	.name		= "smc91x",
	.id		= 0,
	.num_resources	= ARRAY_SIZE(smc91x_resources),
	.resource	= smc91x_resources,
};

static struct platform_device *smc91x_platform_devices[] __initdata = {
	&smc91x_device,
};

static int __init sh7343se_devices_setup(void)
{
	return platform_add_devices(smc91x_platform_devices,
				    ARRAY_SIZE(smc91x_platform_devices));
}

static void __init sh7343se_setup(char **cmdline_p)
{
	device_initcall(sh7343se_devices_setup);
}

/*
 * The Machine Vector
 */
struct sh_machine_vector mv_7343se __initmv = {
	.mv_name = "SolutionEngine 7343",
	.mv_setup = sh7343se_setup,
	.mv_nr_irqs = 108,
	.mv_inb = sh7343se_inb,
	.mv_inw = sh7343se_inw,
	.mv_inl = sh7343se_inl,
	.mv_outb = sh7343se_outb,
	.mv_outw = sh7343se_outw,
	.mv_outl = sh7343se_outl,

	.mv_inb_p = sh7343se_inb_p,
	.mv_inw_p = sh7343se_inw,
	.mv_inl_p = sh7343se_inl,
	.mv_outb_p = sh7343se_outb_p,
	.mv_outw_p = sh7343se_outw,
	.mv_outl_p = sh7343se_outl,

	.mv_insb = sh7343se_insb,
	.mv_insw = sh7343se_insw,
	.mv_insl = sh7343se_insl,
	.mv_outsb = sh7343se_outsb,
	.mv_outsw = sh7343se_outsw,
	.mv_outsl = sh7343se_outsl,

	.mv_init_irq = init_7343se_IRQ,
	.mv_irq_demux = shmse_irq_demux,
#ifdef CONFIG_HEARTBEAT
	.mv_heartbeat = heartbeat_7343se,
#endif
};
ALIAS_MV(7343se)