2 * Data Technology Inc. ESPT-GIGA board suport
4 * Copyright (C) 2008, 2009 Renesas Solutions Corp.
5 * Copyright (C) 2008, 2009 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
11 #include <linux/init.h>
12 #include <linux/platform_device.h>
13 #include <linux/interrupt.h>
14 #include <linux/mtd/physmap.h>
16 #include <asm/machvec.h>
17 #include <asm/sizes.h>
18 #include <asm/sh_eth.h>
21 static struct mtd_partition espt_nor_flash_partitions[] = {
25 .size = (2 * SZ_128K),
26 .mask_flags = MTD_WRITEABLE, /* Read-only */
28 .name = "Linux-Kernel",
29 .offset = MTDPART_OFS_APPEND,
30 .size = (20 * SZ_128K),
32 .name = "Root Filesystem",
33 .offset = MTDPART_OFS_APPEND,
34 .size = MTDPART_SIZ_FULL,
38 static struct physmap_flash_data espt_nor_flash_data = {
40 .parts = espt_nor_flash_partitions,
41 .nr_parts = ARRAY_SIZE(espt_nor_flash_partitions),
44 static struct resource espt_nor_flash_resources[] = {
49 .flags = IORESOURCE_MEM,
53 static struct platform_device espt_nor_flash_device = {
54 .name = "physmap-flash",
55 .resource = espt_nor_flash_resources,
56 .num_resources = ARRAY_SIZE(espt_nor_flash_resources),
58 .platform_data = &espt_nor_flash_data,
63 static struct resource sh_eth_resources[] = {
65 .start = 0xFEE00800, /* use eth1 */
66 .end = 0xFEE00F7C - 1,
67 .flags = IORESOURCE_MEM,
69 .start = 57, /* irq number */
70 .flags = IORESOURCE_IRQ,
74 static struct sh_eth_plat_data sh7763_eth_pdata = {
76 .edmac_endian = EDMAC_LITTLE_ENDIAN,
79 static struct platform_device espt_eth_device = {
81 .resource = sh_eth_resources,
82 .num_resources = ARRAY_SIZE(sh_eth_resources),
84 .platform_data = &sh7763_eth_pdata,
88 static struct platform_device *espt_devices[] __initdata = {
89 &espt_nor_flash_device,
93 static int __init espt_devices_setup(void)
95 return platform_add_devices(espt_devices,
96 ARRAY_SIZE(espt_devices));
98 device_initcall(espt_devices_setup);
100 static struct sh_machine_vector mv_espt __initmv = {
101 .mv_name = "ESPT-GIGA",