blob: ea39fccbbe5eff7b531b9959f23765bb47c77fa5 [file] [log] [blame]
From da28d65329053e276847c7cbc3ad6f9534bc65d7 Mon Sep 17 00:00:00 2001
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Fri, 7 Jun 2013 13:56:05 +0000
Subject: sh_eth: get SH7619 support out of #ifdef
Get the SH7619 data in the driver out of #ifdef by adding "sh7619-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 c18a79abe31f555ec3b363b5b8c1d003230053b6)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/sh/kernel/cpu/sh2/setup-sh7619.c | 4 ++--
drivers/net/ethernet/renesas/sh_eth.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
index e0b740c8..bb11e192 100644
--- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c
+++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
@@ -124,8 +124,8 @@ static struct resource eth_resources[] = {
};
static struct platform_device eth_device = {
- .name = "sh-eth",
- .id = -1,
+ .name = "sh7619-ether",
+ .id = -1,
.dev = {
.platform_data = (void *)1,
},
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index bb83b116..96ec5783 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -683,9 +683,9 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
.tsu = 1,
.select_mii = 1,
};
+#endif
-#elif defined(CONFIG_CPU_SUBTYPE_SH7619)
-static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
+static struct sh_eth_cpu_data sh7619_data = {
.eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
.apr = 1,
@@ -693,7 +693,6 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
.tpauser = 1,
.hw_swap = 1,
};
-#endif
static struct sh_eth_cpu_data sh771x_data = {
.eesipr_value = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
@@ -2712,6 +2711,7 @@ static const struct dev_pm_ops sh_eth_dev_pm_ops = {
#endif
static struct platform_device_id sh_eth_id_table[] = {
+ { "sh7619-ether", (kernel_ulong_t)&sh7619_data },
{ "sh771x-ether", (kernel_ulong_t)&sh771x_data },
{ CARDNAME },
{ }
--
1.8.4.3.gca3854a