| From 6b19db4f2c460792dda88c47d2290c4120ecab05 Mon Sep 17 00:00:00 2001 |
| From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
| Date: Fri, 7 Jun 2013 13:55:08 +0000 |
| Subject: sh_eth: get SH771x support out of #ifdef |
| |
| Get the SH771[02] data in the driver out of #ifdef by adding "sh771x-ether" to |
| the platform driver's ID table. Change the Ether platform device's name in the |
| SH platform code accordingly. |
| |
| Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
| Signed-off-by: David S. Miller <davem@davemloft.net> |
| (cherry picked from commit 7bbe150d8c57c59689c8c50fd7b9915f4a7e10da) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| arch/sh/boards/mach-se/770x/setup.c | 8 ++++---- |
| drivers/net/ethernet/renesas/sh_eth.c | 7 ++++--- |
| 2 files changed, 8 insertions(+), 7 deletions(-) |
| |
| diff --git a/arch/sh/boards/mach-se/770x/setup.c b/arch/sh/boards/mach-se/770x/setup.c |
| index 9759d6ba..658326f4 100644 |
| --- a/arch/sh/boards/mach-se/770x/setup.c |
| +++ b/arch/sh/boards/mach-se/770x/setup.c |
| @@ -128,8 +128,8 @@ static struct resource sh_eth0_resources[] = { |
| }; |
| |
| static struct platform_device sh_eth0_device = { |
| - .name = "sh-eth", |
| - .id = 0, |
| + .name = "sh771x-ether", |
| + .id = 0, |
| .dev = { |
| .platform_data = PHY_ID, |
| }, |
| @@ -151,8 +151,8 @@ static struct resource sh_eth1_resources[] = { |
| }; |
| |
| static struct platform_device sh_eth1_device = { |
| - .name = "sh-eth", |
| - .id = 1, |
| + .name = "sh771x-ether", |
| + .id = 1, |
| .dev = { |
| .platform_data = PHY_ID, |
| }, |
| diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c |
| index ede2db2e..bb83b116 100644 |
| --- a/drivers/net/ethernet/renesas/sh_eth.c |
| +++ b/drivers/net/ethernet/renesas/sh_eth.c |
| @@ -693,12 +693,12 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = { |
| .tpauser = 1, |
| .hw_swap = 1, |
| }; |
| -#elif defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712) |
| -static struct sh_eth_cpu_data sh_eth_my_cpu_data = { |
| +#endif |
| + |
| +static struct sh_eth_cpu_data sh771x_data = { |
| .eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff, |
| .tsu = 1, |
| }; |
| -#endif |
| |
| static void sh_eth_set_default_cpu_data(struct sh_eth_cpu_data *cd) |
| { |
| @@ -2712,6 +2712,7 @@ static const struct dev_pm_ops sh_eth_dev_pm_ops = { |
| #endif |
| |
| static struct platform_device_id sh_eth_id_table[] = { |
| + { "sh771x-ether", (kernel_ulong_t)&sh771x_data }, |
| { CARDNAME }, |
| { } |
| }; |
| -- |
| 1.8.4.3.gca3854a |
| |