* [PATCH 0/2] sh_eth: couple of software reset bit cleanups
@ 2016-04-24 20:42 Sergei Shtylyov
2016-04-24 20:45 ` [PATCH 1/2] sh_eth: use EDMR_SRST_GETHER in sh_eth_check_reset() Sergei Shtylyov
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2016-04-24 20:42 UTC (permalink / raw)
To: netdev; +Cc: linux-renesas-soc
Hello.
Here's a set of 2 patches against DaveM's 'net-next.git' repo. We clean up
the use of the software reset bits...
[1/2] sh_eth: use EDMR_SRST_GETHER in sh_eth_check_reset()
[2/2] sh_eth: rename ARSTR register bit
MBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] sh_eth: use EDMR_SRST_GETHER in sh_eth_check_reset()
2016-04-24 20:42 [PATCH 0/2] sh_eth: couple of software reset bit cleanups Sergei Shtylyov
@ 2016-04-24 20:45 ` Sergei Shtylyov
2016-04-25 0:31 ` Simon Horman
2016-04-24 20:46 ` [PATCH 2/2] sh_eth: rename ARSTR register bit Sergei Shtylyov
2016-04-26 20:07 ` [PATCH 0/2] sh_eth: couple of software reset bit cleanups David Miller
2 siblings, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2016-04-24 20:45 UTC (permalink / raw)
To: netdev; +Cc: linux-renesas-soc
sh_eth_check_reset() uses a bare number where EDMR_SRST_GETHER would fit,
i.e. the receive/trasmit software reset bits that comprise EDMR_SRST_GETHER
read as 1 while the corresponding reset is in progress and thus, when both
are 0, the reset is complete.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
drivers/net/ethernet/renesas/sh_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -899,7 +899,7 @@ static int sh_eth_check_reset(struct net
int cnt = 100;
while (cnt > 0) {
- if (!(sh_eth_read(ndev, EDMR) & 0x3))
+ if (!(sh_eth_read(ndev, EDMR) & EDMR_SRST_GETHER))
break;
mdelay(1);
cnt--;
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] sh_eth: rename ARSTR register bit
2016-04-24 20:42 [PATCH 0/2] sh_eth: couple of software reset bit cleanups Sergei Shtylyov
2016-04-24 20:45 ` [PATCH 1/2] sh_eth: use EDMR_SRST_GETHER in sh_eth_check_reset() Sergei Shtylyov
@ 2016-04-24 20:46 ` Sergei Shtylyov
2016-04-25 0:37 ` Simon Horman
2016-04-26 20:07 ` [PATCH 0/2] sh_eth: couple of software reset bit cleanups David Miller
2 siblings, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2016-04-24 20:46 UTC (permalink / raw)
To: netdev; +Cc: linux-renesas-soc
The Renesas RZ/A1H manual names the software reset bit in the software reset
register (ARSTR) ARST which makes a bit more sense than the ARSTR_ARSTR name
used now by the driver -- rename the latter to ARSTR_ARST.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
drivers/net/ethernet/renesas/sh_eth.c | 6 +++---
drivers/net/ethernet/renesas/sh_eth.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -482,7 +482,7 @@ static void sh_eth_chip_reset(struct net
struct sh_eth_private *mdp = netdev_priv(ndev);
/* reset device */
- sh_eth_tsu_write(mdp, ARSTR_ARSTR, ARSTR);
+ sh_eth_tsu_write(mdp, ARSTR_ARST, ARSTR);
mdelay(1);
}
@@ -540,7 +540,7 @@ static void sh_eth_chip_reset_r8a7740(st
struct sh_eth_private *mdp = netdev_priv(ndev);
/* reset device */
- sh_eth_tsu_write(mdp, ARSTR_ARSTR, ARSTR);
+ sh_eth_tsu_write(mdp, ARSTR_ARST, ARSTR);
mdelay(1);
sh_eth_select_mii(ndev);
@@ -735,7 +735,7 @@ static void sh_eth_chip_reset_giga(struc
}
/* reset device */
- iowrite32(ARSTR_ARSTR, (void *)(SH_GIGA_ETH_BASE + 0x1800));
+ iowrite32(ARSTR_ARST, (void *)(SH_GIGA_ETH_BASE + 0x1800));
mdelay(1);
/* restore MAHR and MALR */
Index: net-next/drivers/net/ethernet/renesas/sh_eth.h
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.h
+++ net-next/drivers/net/ethernet/renesas/sh_eth.h
@@ -394,7 +394,7 @@ enum RPADIR_BIT {
#define DEFAULT_FDR_INIT 0x00000707
/* ARSTR */
-enum ARSTR_BIT { ARSTR_ARSTR = 0x00000001, };
+enum ARSTR_BIT { ARSTR_ARST = 0x00000001, };
/* TSU_FWEN0 */
enum TSU_FWEN0_BIT {
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] sh_eth: use EDMR_SRST_GETHER in sh_eth_check_reset()
2016-04-24 20:45 ` [PATCH 1/2] sh_eth: use EDMR_SRST_GETHER in sh_eth_check_reset() Sergei Shtylyov
@ 2016-04-25 0:31 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2016-04-25 0:31 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: netdev, linux-renesas-soc
On Sun, Apr 24, 2016 at 11:45:23PM +0300, Sergei Shtylyov wrote:
> sh_eth_check_reset() uses a bare number where EDMR_SRST_GETHER would fit,
> i.e. the receive/trasmit software reset bits that comprise EDMR_SRST_GETHER
> read as 1 while the corresponding reset is in progress and thus, when both
> are 0, the reset is complete.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] sh_eth: rename ARSTR register bit
2016-04-24 20:46 ` [PATCH 2/2] sh_eth: rename ARSTR register bit Sergei Shtylyov
@ 2016-04-25 0:37 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2016-04-25 0:37 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: netdev, linux-renesas-soc
On Sun, Apr 24, 2016 at 11:46:15PM +0300, Sergei Shtylyov wrote:
> The Renesas RZ/A1H manual names the software reset bit in the software reset
> register (ARSTR) ARST which makes a bit more sense than the ARSTR_ARSTR name
> used now by the driver -- rename the latter to ARSTR_ARST.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] sh_eth: couple of software reset bit cleanups
2016-04-24 20:42 [PATCH 0/2] sh_eth: couple of software reset bit cleanups Sergei Shtylyov
2016-04-24 20:45 ` [PATCH 1/2] sh_eth: use EDMR_SRST_GETHER in sh_eth_check_reset() Sergei Shtylyov
2016-04-24 20:46 ` [PATCH 2/2] sh_eth: rename ARSTR register bit Sergei Shtylyov
@ 2016-04-26 20:07 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2016-04-26 20:07 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: netdev, linux-renesas-soc
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Sun, 24 Apr 2016 23:42:48 +0300
> Here's a set of 2 patches against DaveM's 'net-next.git' repo. We clean up
> the use of the software reset bits...
>
> [1/2] sh_eth: use EDMR_SRST_GETHER in sh_eth_check_reset()
> [2/2] sh_eth: rename ARSTR register bit
Series applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-26 20:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-24 20:42 [PATCH 0/2] sh_eth: couple of software reset bit cleanups Sergei Shtylyov
2016-04-24 20:45 ` [PATCH 1/2] sh_eth: use EDMR_SRST_GETHER in sh_eth_check_reset() Sergei Shtylyov
2016-04-25 0:31 ` Simon Horman
2016-04-24 20:46 ` [PATCH 2/2] sh_eth: rename ARSTR register bit Sergei Shtylyov
2016-04-25 0:37 ` Simon Horman
2016-04-26 20:07 ` [PATCH 0/2] sh_eth: couple of software reset bit cleanups 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).