aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorLuca Santini <luca.santini@spesonline.com>2008-09-07 23:01:15 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-09-07 23:01:15 -0400
commit3db9170880241d63aae7ab86a03aa15418c3e5c6 (patch)
treec5e5f1bb4b0b256a39a465e742cf547b195d390a /arch/sh/boards
parent53abf911fa6753dfbd6775ae541fb2f8b9f5b825 (diff)
sh: Add Renesas EDOSK7760 board support.
This adds support for the Renesas (RTE) EDOSK7760 board. Currently supported devices are: - ramdisk support - ethernet support - nfs support - ext2/ext3 support - i2c support - fb support (M) Signed-off-by: Luca Santini <luca.santini@spesonline.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/Kconfig7
-rw-r--r--arch/sh/boards/Makefile1
-rw-r--r--arch/sh/boards/board-edosk7760.c144
3 files changed, 152 insertions, 0 deletions
diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig
index ae194869fd60..c6b21e82755e 100644
--- a/arch/sh/boards/Kconfig
+++ b/arch/sh/boards/Kconfig
@@ -184,6 +184,13 @@ config SH_EDOSK7705
184 bool "EDOSK7705" 184 bool "EDOSK7705"
185 depends on CPU_SUBTYPE_SH7705 185 depends on CPU_SUBTYPE_SH7705
186 186
187config SH_EDOSK7760
188 bool "EDOSK7760"
189 depends on CPU_SUBTYPE_SH7760
190 help
191 Select if configuring for a Renesas EDOSK7760
192 evaluation board.
193
187config SH_SH4202_MICRODEV 194config SH_SH4202_MICRODEV
188 bool "SH4-202 MicroDev" 195 bool "SH4-202 MicroDev"
189 depends on CPU_SUBTYPE_SH4_202 196 depends on CPU_SUBTYPE_SH4_202
diff --git a/arch/sh/boards/Makefile b/arch/sh/boards/Makefile
index 463022c7df3c..d9efa3923721 100644
--- a/arch/sh/boards/Makefile
+++ b/arch/sh/boards/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_SH_MAGIC_PANEL_R2) += board-magicpanelr2.o
6obj-$(CONFIG_SH_RSK7203) += board-rsk7203.o 6obj-$(CONFIG_SH_RSK7203) += board-rsk7203.o
7obj-$(CONFIG_SH_SH7785LCR) += board-sh7785lcr.o 7obj-$(CONFIG_SH_SH7785LCR) += board-sh7785lcr.o
8obj-$(CONFIG_SH_SHMIN) += board-shmin.o 8obj-$(CONFIG_SH_SHMIN) += board-shmin.o
9obj-$(CONFIG_SH_EDOSK7760) += board-edosk7760.o
diff --git a/arch/sh/boards/board-edosk7760.c b/arch/sh/boards/board-edosk7760.c
new file mode 100644
index 000000000000..7cc5e1143522
--- /dev/null
+++ b/arch/sh/boards/board-edosk7760.c
@@ -0,0 +1,144 @@
1/*
2 * Renesas Europe EDOSK7760 Board Support
3 *
4 * Copyright (C) 2008 SPES Societa' Progettazione Elettronica e Software Ltd.
5 * Author: Luca Santini <luca.santini@spesonline.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21#include <linux/init.h>
22#include <linux/types.h>
23#include <linux/platform_device.h>
24#include <linux/smc91x.h>
25#include <linux/interrupt.h>
26#include <linux/i2c.h>
27#include <asm/machvec.h>
28#include <asm/io.h>
29#include <asm/addrspace.h>
30#include <asm/delay.h>
31#include <asm/i2c-sh7760.h>
32
33/* Bus state controller registers for CS4 area */
34#define BSC_CS4BCR 0xA4FD0010
35#define BSC_CS4WCR 0xA4FD0030
36
37#define SMC_IOBASE 0xA2000000
38#define SMC_IO_OFFSET 0x300
39#define SMC_IOADDR (SMC_IOBASE + SMC_IO_OFFSET)
40
41#define ETHERNET_IRQ 5
42
43/* i2c initialization functions */
44static struct sh7760_i2c_platdata i2c_pd = {
45 .speed_khz = 400,
46};
47
48static struct resource sh7760_i2c1_res[] = {
49 {
50 .start = SH7760_I2C1_MMIO,
51 .end = SH7760_I2C1_MMIOEND,
52 .flags = IORESOURCE_MEM,
53 },{
54 .start = SH7760_I2C1_IRQ,
55 .end = SH7760_I2C1_IRQ,
56 .flags = IORESOURCE_IRQ,
57 },
58};
59
60static struct platform_device sh7760_i2c1_dev = {
61 .dev = {
62 .platform_data = &i2c_pd,
63 },
64
65 .name = SH7760_I2C_DEVNAME,
66 .id = 1,
67 .resource = sh7760_i2c1_res,
68 .num_resources = ARRAY_SIZE(sh7760_i2c1_res),
69};
70
71static struct resource sh7760_i2c0_res[] = {
72 {
73 .start = SH7760_I2C0_MMIO,
74 .end = SH7760_I2C0_MMIOEND,
75 .flags = IORESOURCE_MEM,
76 }, {
77 .start = SH7760_I2C0_IRQ,
78 .end = SH7760_I2C0_IRQ,
79 .flags = IORESOURCE_IRQ,
80 },
81};
82
83static struct platform_device sh7760_i2c0_dev = {
84 .dev = {
85 .platform_data = &i2c_pd,
86 },
87 .name = SH7760_I2C_DEVNAME,
88 .id = 0,
89 .resource = sh7760_i2c0_res,
90 .num_resources = ARRAY_SIZE(sh7760_i2c0_res),
91};
92
93/* eth initialization functions */
94static struct smc91x_platdata smc91x_info = {
95 .flags = SMC91X_USE_16BIT | SMC91X_IO_SHIFT_1 | IORESOURCE_IRQ_LOWLEVEL,
96};
97
98static struct resource smc91x_res[] = {
99 [0] = {
100 .start = SMC_IOADDR,
101 .end = SMC_IOADDR + 0x1f,
102 .flags = IORESOURCE_MEM,
103 },
104 [1] = {
105 .start = ETHERNET_IRQ,
106 .end = ETHERNET_IRQ,
107 .flags = IORESOURCE_IRQ ,
108 }
109};
110
111static struct platform_device smc91x_dev = {
112 .name = "smc91x",
113 .id = -1,
114 .num_resources = ARRAY_SIZE(smc91x_res),
115 .resource = smc91x_res,
116
117 .dev = {
118 .platform_data = &smc91x_info,
119 },
120};
121
122/* platform init code */
123static struct platform_device *edosk7760_devices[] __initdata = {
124 &sh7760_i2c0_dev,
125 &sh7760_i2c1_dev,
126 &smc91x_dev,
127};
128
129static int __init init_edosk7760_devices(void)
130{
131 plat_irq_setup_pins(IRQ_MODE_IRQ);
132
133 return platform_add_devices(edosk7760_devices,
134 ARRAY_SIZE(edosk7760_devices));
135}
136__initcall(init_edosk7760_devices);
137
138/*
139 * The Machine Vector
140 */
141struct sh_machine_vector mv_edosk7760 __initmv = {
142 .mv_name = "EDOSK7760",
143 .mv_nr_irqs = 128,
144};