aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-04-06 04:32:02 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-05-12 16:33:05 -0400
commitd8fed1e254ba1ed38fd2977fdac4c2e35ed5dbc1 (patch)
treeede3c2e9f2612647c48959bb6b22f24434bbe077 /arch/arm/mach-shmobile
parentf7e7d31a1299e11be780f8e2d235570792849e31 (diff)
ARM: mach-shmobile: armadillo800eva: add support sh_eth
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Simon Horman <horms@verge.net.au> Acked-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 0bce9b88b9c2..d439e7f76187 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -26,6 +26,7 @@
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27#include <linux/gpio.h> 27#include <linux/gpio.h>
28#include <linux/gpio_keys.h> 28#include <linux/gpio_keys.h>
29#include <linux/sh_eth.h>
29#include <linux/videodev2.h> 30#include <linux/videodev2.h>
30#include <mach/common.h> 31#include <mach/common.h>
31#include <mach/irqs.h> 32#include <mach/irqs.h>
@@ -96,6 +97,38 @@
96 *-----------+---------------+---------------------------- 97 *-----------+---------------+----------------------------
97 */ 98 */
98 99
100/* Ether */
101static struct sh_eth_plat_data sh_eth_platdata = {
102 .phy = 0x00, /* LAN8710A */
103 .edmac_endian = EDMAC_LITTLE_ENDIAN,
104 .register_type = SH_ETH_REG_GIGABIT,
105 .phy_interface = PHY_INTERFACE_MODE_MII,
106};
107
108static struct resource sh_eth_resources[] = {
109 {
110 .start = 0xe9a00000,
111 .end = 0xe9a00800 - 1,
112 .flags = IORESOURCE_MEM,
113 }, {
114 .start = 0xe9a01800,
115 .end = 0xe9a02000 - 1,
116 .flags = IORESOURCE_MEM,
117 }, {
118 .start = evt2irq(0x0500),
119 .flags = IORESOURCE_IRQ,
120 },
121};
122
123static struct platform_device sh_eth_device = {
124 .name = "sh-eth",
125 .dev = {
126 .platform_data = &sh_eth_platdata,
127 },
128 .resource = sh_eth_resources,
129 .num_resources = ARRAY_SIZE(sh_eth_resources),
130};
131
99/* LCDC */ 132/* LCDC */
100static struct fb_videomode lcdc0_mode = { 133static struct fb_videomode lcdc0_mode = {
101 .name = "AMPIER/AM-800480", 134 .name = "AMPIER/AM-800480",
@@ -180,6 +213,7 @@ static struct platform_device gpio_keys_device = {
180static struct platform_device *eva_devices[] __initdata = { 213static struct platform_device *eva_devices[] __initdata = {
181 &lcdc0_device, 214 &lcdc0_device,
182 &gpio_keys_device, 215 &gpio_keys_device,
216 &sh_eth_device,
183}; 217};
184 218
185/* 219/*
@@ -231,6 +265,30 @@ static void __init eva_init(void)
231 gpio_request(GPIO_PORT202, NULL); /* LCD0_LED_CONT */ 265 gpio_request(GPIO_PORT202, NULL); /* LCD0_LED_CONT */
232 gpio_direction_output(GPIO_PORT202, 0); 266 gpio_direction_output(GPIO_PORT202, 0);
233 267
268 /* GETHER */
269 gpio_request(GPIO_FN_ET_CRS, NULL);
270 gpio_request(GPIO_FN_ET_MDC, NULL);
271 gpio_request(GPIO_FN_ET_MDIO, NULL);
272 gpio_request(GPIO_FN_ET_TX_ER, NULL);
273 gpio_request(GPIO_FN_ET_RX_ER, NULL);
274 gpio_request(GPIO_FN_ET_ERXD0, NULL);
275 gpio_request(GPIO_FN_ET_ERXD1, NULL);
276 gpio_request(GPIO_FN_ET_ERXD2, NULL);
277 gpio_request(GPIO_FN_ET_ERXD3, NULL);
278 gpio_request(GPIO_FN_ET_TX_CLK, NULL);
279 gpio_request(GPIO_FN_ET_TX_EN, NULL);
280 gpio_request(GPIO_FN_ET_ETXD0, NULL);
281 gpio_request(GPIO_FN_ET_ETXD1, NULL);
282 gpio_request(GPIO_FN_ET_ETXD2, NULL);
283 gpio_request(GPIO_FN_ET_ETXD3, NULL);
284 gpio_request(GPIO_FN_ET_PHY_INT, NULL);
285 gpio_request(GPIO_FN_ET_COL, NULL);
286 gpio_request(GPIO_FN_ET_RX_DV, NULL);
287 gpio_request(GPIO_FN_ET_RX_CLK, NULL);
288
289 gpio_request(GPIO_PORT18, NULL); /* PHY_RST */
290 gpio_direction_output(GPIO_PORT18, 1);
291
234 /* 292 /*
235 * CAUTION 293 * CAUTION
236 * 294 *