1 // SPDX-License-Identifier: GPL-2.0
3 * Data Technology Inc. ESPT-GIGA board support
5 * Copyright (C) 2008, 2009 Renesas Solutions Corp.
6 * Copyright (C) 2008, 2009 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
8 #include <linux/init.h>
9 #include <linux/platform_device.h>
10 #include <linux/interrupt.h>
11 #include <linux/mtd/physmap.h>
13 #include <linux/sh_eth.h>
14 #include <linux/sh_intc.h>
15 #include <asm/machvec.h>
16 #include <linux/sizes.h>
19 static struct mtd_partition espt_nor_flash_partitions
[] = {
23 .size
= (2 * SZ_128K
),
24 .mask_flags
= MTD_WRITEABLE
, /* Read-only */
26 .name
= "Linux-Kernel",
27 .offset
= MTDPART_OFS_APPEND
,
28 .size
= (20 * SZ_128K
),
30 .name
= "Root Filesystem",
31 .offset
= MTDPART_OFS_APPEND
,
32 .size
= MTDPART_SIZ_FULL
,
36 static struct physmap_flash_data espt_nor_flash_data
= {
38 .parts
= espt_nor_flash_partitions
,
39 .nr_parts
= ARRAY_SIZE(espt_nor_flash_partitions
),
42 static struct resource espt_nor_flash_resources
[] = {
47 .flags
= IORESOURCE_MEM
,
51 static struct platform_device espt_nor_flash_device
= {
52 .name
= "physmap-flash",
53 .resource
= espt_nor_flash_resources
,
54 .num_resources
= ARRAY_SIZE(espt_nor_flash_resources
),
56 .platform_data
= &espt_nor_flash_data
,
61 static struct resource sh_eth_resources
[] = {
63 .start
= 0xFEE00800, /* use eth1 */
64 .end
= 0xFEE00F7C - 1,
65 .flags
= IORESOURCE_MEM
,
67 .start
= 0xFEE01800, /* TSU */
69 .flags
= IORESOURCE_MEM
,
72 .start
= evt2irq(0x920), /* irq number */
73 .flags
= IORESOURCE_IRQ
,
77 static struct sh_eth_plat_data sh7763_eth_pdata
= {
79 .phy_interface
= PHY_INTERFACE_MODE_MII
,
82 static struct platform_device espt_eth_device
= {
83 .name
= "sh7763-gether",
84 .resource
= sh_eth_resources
,
85 .num_resources
= ARRAY_SIZE(sh_eth_resources
),
87 .platform_data
= &sh7763_eth_pdata
,
91 static struct platform_device
*espt_devices
[] __initdata
= {
92 &espt_nor_flash_device
,
96 static int __init
espt_devices_setup(void)
98 return platform_add_devices(espt_devices
,
99 ARRAY_SIZE(espt_devices
));
101 device_initcall(espt_devices_setup
);
103 static struct sh_machine_vector mv_espt __initmv
= {
104 .mv_name
= "ESPT-GIGA",