netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: sh_eth: Add eth support for R8A7779 device
@ 2012-08-15  6:33 Phil Edworthy
  2012-08-20  9:17 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Edworthy @ 2012-08-15  6:33 UTC (permalink / raw)
  To: netdev; +Cc: linux-sh, Kuninori Morimoto, Yoshihiro Shimoda, Phil Edworthy


Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
---
 drivers/net/ethernet/renesas/Kconfig  |    4 ++--
 drivers/net/ethernet/renesas/sh_eth.c |   11 ++++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/renesas/Kconfig b/drivers/net/ethernet/renesas/Kconfig
index 46df3a0..24c2305 100644
--- a/drivers/net/ethernet/renesas/Kconfig
+++ b/drivers/net/ethernet/renesas/Kconfig
@@ -8,7 +8,7 @@ config SH_ETH
 		(CPU_SUBTYPE_SH7710 || CPU_SUBTYPE_SH7712 || \
 		 CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7619 || \
 		 CPU_SUBTYPE_SH7724 || CPU_SUBTYPE_SH7734 || \
-		 CPU_SUBTYPE_SH7757 || ARCH_R8A7740)
+		 CPU_SUBTYPE_SH7757 || ARCH_R8A7740 || ARCH_R8A7779)
 	select CRC32
 	select NET_CORE
 	select MII
@@ -18,4 +18,4 @@ config SH_ETH
 	  Renesas SuperH Ethernet device driver.
 	  This driver supporting CPUs are:
 		- SH7619, SH7710, SH7712, SH7724, SH7734, SH7763, SH7757,
-		  and R8A7740.
+		  R8A7740 and R8A7779.
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index af0b867..bad8f2e 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -78,7 +78,7 @@ static void sh_eth_select_mii(struct net_device *ndev)
 #endif
 
 /* There is CPU dependent code */
-#if defined(CONFIG_CPU_SUBTYPE_SH7724)
+#if defined(CONFIG_CPU_SUBTYPE_SH7724) || defined(CONFIG_ARCH_R8A7779)
 #define SH_ETH_RESET_DEFAULT	1
 static void sh_eth_set_duplex(struct net_device *ndev)
 {
@@ -93,13 +93,18 @@ static void sh_eth_set_duplex(struct net_device *ndev)
 static void sh_eth_set_rate(struct net_device *ndev)
 {
 	struct sh_eth_private *mdp = netdev_priv(ndev);
+	unsigned int bits = ECMR_RTM;
+
+#if defined(CONFIG_ARCH_R8A7779)
+	bits |= ECMR_ELB;
+#endif
 
 	switch (mdp->speed) {
 	case 10: /* 10BASE */
-		sh_eth_write(ndev, sh_eth_read(ndev, ECMR) & ~ECMR_RTM, ECMR);
+		sh_eth_write(ndev, sh_eth_read(ndev, ECMR) & ~bits, ECMR);
 		break;
 	case 100:/* 100BASE */
-		sh_eth_write(ndev, sh_eth_read(ndev, ECMR) | ECMR_RTM, ECMR);
+		sh_eth_write(ndev, sh_eth_read(ndev, ECMR) | bits, ECMR);
 		break;
 	default:
 		break;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: sh_eth: Add eth support for R8A7779 device
  2012-08-15  6:33 [PATCH] net: sh_eth: Add eth support for R8A7779 device Phil Edworthy
@ 2012-08-20  9:17 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-08-20  9:17 UTC (permalink / raw)
  To: phil.edworthy
  Cc: netdev, linux-sh, kuninori.morimoto.gx, yoshihiro.shimoda.uh

From: Phil Edworthy <phil.edworthy@renesas.com>
Date: Wed, 15 Aug 2012 07:33:29 +0100

> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-20  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-15  6:33 [PATCH] net: sh_eth: Add eth support for R8A7779 device Phil Edworthy
2012-08-20  9:17 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).