Commit 22dd8e6b authored by David S. Miller's avatar David S. Miller

Merge branch 'Ether-fixes-for-the-SolutionEngine771x-boards'

Sergei Shtylyov says:

====================
Ether fixes for the SolutionEngine771x boards

Here's the series of 2 patches against Linus' repo. This series should
(hoplefully) fix the Ether support on the SolutionEngine771x boards...

[1/2] SolutionEngine771x: fix Ether platform data
[2/2] SolutionEngine771x: add Ether TSU resource
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 2fdd1811 f9a531d6
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/sh_eth.h>
#include <mach-se/mach/se.h> #include <mach-se/mach/se.h>
#include <mach-se/mach/mrshpc.h> #include <mach-se/mach/mrshpc.h>
#include <asm/machvec.h> #include <asm/machvec.h>
...@@ -115,13 +116,23 @@ static struct platform_device heartbeat_device = { ...@@ -115,13 +116,23 @@ static struct platform_device heartbeat_device = {
#if defined(CONFIG_CPU_SUBTYPE_SH7710) ||\ #if defined(CONFIG_CPU_SUBTYPE_SH7710) ||\
defined(CONFIG_CPU_SUBTYPE_SH7712) defined(CONFIG_CPU_SUBTYPE_SH7712)
/* SH771X Ethernet driver */ /* SH771X Ethernet driver */
static struct sh_eth_plat_data sh_eth_plat = {
.phy = PHY_ID,
.phy_interface = PHY_INTERFACE_MODE_MII,
};
static struct resource sh_eth0_resources[] = { static struct resource sh_eth0_resources[] = {
[0] = { [0] = {
.start = SH_ETH0_BASE, .start = SH_ETH0_BASE,
.end = SH_ETH0_BASE + 0x1B8, .end = SH_ETH0_BASE + 0x1B8 - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
[1] = { [1] = {
.start = SH_TSU_BASE,
.end = SH_TSU_BASE + 0x200 - 1,
.flags = IORESOURCE_MEM,
},
[2] = {
.start = SH_ETH0_IRQ, .start = SH_ETH0_IRQ,
.end = SH_ETH0_IRQ, .end = SH_ETH0_IRQ,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
...@@ -132,7 +143,7 @@ static struct platform_device sh_eth0_device = { ...@@ -132,7 +143,7 @@ static struct platform_device sh_eth0_device = {
.name = "sh771x-ether", .name = "sh771x-ether",
.id = 0, .id = 0,
.dev = { .dev = {
.platform_data = PHY_ID, .platform_data = &sh_eth_plat,
}, },
.num_resources = ARRAY_SIZE(sh_eth0_resources), .num_resources = ARRAY_SIZE(sh_eth0_resources),
.resource = sh_eth0_resources, .resource = sh_eth0_resources,
...@@ -141,10 +152,15 @@ static struct platform_device sh_eth0_device = { ...@@ -141,10 +152,15 @@ static struct platform_device sh_eth0_device = {
static struct resource sh_eth1_resources[] = { static struct resource sh_eth1_resources[] = {
[0] = { [0] = {
.start = SH_ETH1_BASE, .start = SH_ETH1_BASE,
.end = SH_ETH1_BASE + 0x1B8, .end = SH_ETH1_BASE + 0x1B8 - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
[1] = { [1] = {
.start = SH_TSU_BASE,
.end = SH_TSU_BASE + 0x200 - 1,
.flags = IORESOURCE_MEM,
},
[2] = {
.start = SH_ETH1_IRQ, .start = SH_ETH1_IRQ,
.end = SH_ETH1_IRQ, .end = SH_ETH1_IRQ,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
...@@ -155,7 +171,7 @@ static struct platform_device sh_eth1_device = { ...@@ -155,7 +171,7 @@ static struct platform_device sh_eth1_device = {
.name = "sh771x-ether", .name = "sh771x-ether",
.id = 1, .id = 1,
.dev = { .dev = {
.platform_data = PHY_ID, .platform_data = &sh_eth_plat,
}, },
.num_resources = ARRAY_SIZE(sh_eth1_resources), .num_resources = ARRAY_SIZE(sh_eth1_resources),
.resource = sh_eth1_resources, .resource = sh_eth1_resources,
......
...@@ -100,6 +100,7 @@ ...@@ -100,6 +100,7 @@
/* Base address */ /* Base address */
#define SH_ETH0_BASE 0xA7000000 #define SH_ETH0_BASE 0xA7000000
#define SH_ETH1_BASE 0xA7000400 #define SH_ETH1_BASE 0xA7000400
#define SH_TSU_BASE 0xA7000800
/* PHY ID */ /* PHY ID */
#if defined(CONFIG_CPU_SUBTYPE_SH7710) #if defined(CONFIG_CPU_SUBTYPE_SH7710)
# define PHY_ID 0x00 # define PHY_ID 0x00
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment