summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2012-04-06 10:32:02 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2012-05-12 22:33:05 +0200
commitd8fed1e254ba1ed38fd2977fdac4c2e35ed5dbc1 (patch)
treeede3c2e9f2612647c48959bb6b22f24434bbe077
parentARM: mach-shmobile: armadillo800eva: add support gpio_key (diff)
downloadlinux-d8fed1e254ba1ed38fd2977fdac4c2e35ed5dbc1.tar.xz
linux-d8fed1e254ba1ed38fd2977fdac4c2e35ed5dbc1.zip
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 '')
-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 @@
#include <linux/platform_device.h>
#include <linux/gpio.h>
#include <linux/gpio_keys.h>
+#include <linux/sh_eth.h>
#include <linux/videodev2.h>
#include <mach/common.h>
#include <mach/irqs.h>
@@ -96,6 +97,38 @@
*-----------+---------------+----------------------------
*/
+/* Ether */
+static struct sh_eth_plat_data sh_eth_platdata = {
+ .phy = 0x00, /* LAN8710A */
+ .edmac_endian = EDMAC_LITTLE_ENDIAN,
+ .register_type = SH_ETH_REG_GIGABIT,
+ .phy_interface = PHY_INTERFACE_MODE_MII,
+};
+
+static struct resource sh_eth_resources[] = {
+ {
+ .start = 0xe9a00000,
+ .end = 0xe9a00800 - 1,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = 0xe9a01800,
+ .end = 0xe9a02000 - 1,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = evt2irq(0x0500),
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device sh_eth_device = {
+ .name = "sh-eth",
+ .dev = {
+ .platform_data = &sh_eth_platdata,
+ },
+ .resource = sh_eth_resources,
+ .num_resources = ARRAY_SIZE(sh_eth_resources),
+};
+
/* LCDC */
static struct fb_videomode lcdc0_mode = {
.name = "AMPIER/AM-800480",
@@ -180,6 +213,7 @@ static struct platform_device gpio_keys_device = {
static struct platform_device *eva_devices[] __initdata = {
&lcdc0_device,
&gpio_keys_device,
+ &sh_eth_device,
};
/*
@@ -231,6 +265,30 @@ static void __init eva_init(void)
gpio_request(GPIO_PORT202, NULL); /* LCD0_LED_CONT */
gpio_direction_output(GPIO_PORT202, 0);
+ /* GETHER */
+ gpio_request(GPIO_FN_ET_CRS, NULL);
+ gpio_request(GPIO_FN_ET_MDC, NULL);
+ gpio_request(GPIO_FN_ET_MDIO, NULL);
+ gpio_request(GPIO_FN_ET_TX_ER, NULL);
+ gpio_request(GPIO_FN_ET_RX_ER, NULL);
+ gpio_request(GPIO_FN_ET_ERXD0, NULL);
+ gpio_request(GPIO_FN_ET_ERXD1, NULL);
+ gpio_request(GPIO_FN_ET_ERXD2, NULL);
+ gpio_request(GPIO_FN_ET_ERXD3, NULL);
+ gpio_request(GPIO_FN_ET_TX_CLK, NULL);
+ gpio_request(GPIO_FN_ET_TX_EN, NULL);
+ gpio_request(GPIO_FN_ET_ETXD0, NULL);
+ gpio_request(GPIO_FN_ET_ETXD1, NULL);
+ gpio_request(GPIO_FN_ET_ETXD2, NULL);
+ gpio_request(GPIO_FN_ET_ETXD3, NULL);
+ gpio_request(GPIO_FN_ET_PHY_INT, NULL);
+ gpio_request(GPIO_FN_ET_COL, NULL);
+ gpio_request(GPIO_FN_ET_RX_DV, NULL);
+ gpio_request(GPIO_FN_ET_RX_CLK, NULL);
+
+ gpio_request(GPIO_PORT18, NULL); /* PHY_RST */
+ gpio_direction_output(GPIO_PORT18, 1);
+
/*
* CAUTION
*