From: Simon Horman <horms@verge.net.au>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: netdev@vger.kernel.org, linux-sh@vger.kernel.org,
Magnus Damm <magnus.damm@gmail.com>
Subject: Re: [RFC PATCH net-next v2 2/3] sh_eth: add support RMIIMODE register
Date: Wed, 15 May 2013 00:51:17 +0000 [thread overview]
Message-ID: <20130515005117.GC12246@verge.net.au> (raw)
In-Reply-To: <519240C7.1060406@cogentembedded.com>
On Tue, May 14, 2013 at 05:48:55PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 14-05-2013 6:37, Simon Horman wrote:
>
> >This change is motivated by the lager board which uses the r8a7790 SoC,
> >an R-Car SoC. For this board setting the RMIIMODE register is necessary.
>
> >This patch assumes this is valid for all R-Car SoCs.
>
> No, RMIIMODE register is not documented on R8A7778/9 SoCs and
> this location is described as reserved. How's it called in R8A7790
> manual, CXR15?
It appears to be undocumented in the R8A7790 I have.
Empirically it seems necessary for the lager/R8A7790.
To be honest I am entirely unsure of its relevance to other SoCs.
I wonder if a better approach would be to add a flag to platform
data rather than struct sh_eth_cpu_data. This would allow the register
to only be accessed on boards where it is known to be useful.
>
> >Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>
> >--
>
> Missed a dash here.
>
> >v2
> >* Split from patch to add r8a7790 support to driver (ifdef nastiness)
> >* As suggested by Sergei Shtylyov
> > - Add a field to struct sh_eth_cpu_data to indicate if the
> > rmiimode register is present. This replaces an extremely ugly ifdef.
> >---
> > drivers/net/ethernet/renesas/sh_eth.c | 5 +++++
> > drivers/net/ethernet/renesas/sh_eth.h | 2 ++
> > 2 files changed, 7 insertions(+)
>
> >diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
> >index 016cf80..ff5613d 100644
> >--- a/drivers/net/ethernet/renesas/sh_eth.c
> >+++ b/drivers/net/ethernet/renesas/sh_eth.c
> >@@ -190,6 +190,7 @@ static const u16 sh_eth_offset_fast_rcar[SH_ETH_MAX_REGISTER_OFFSET] = {
> > [RMCR] = 0x0258,
> > [TFUCR] = 0x0264,
> > [RFOCR] = 0x0268,
> >+ [RMIIMODE] = 0x026c,
> > [FCFTR] = 0x0270,
> > [TRIMD] = 0x027c,
> > };
>
> WBR, Sergei
>
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@verge.net.au>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: netdev@vger.kernel.org, linux-sh@vger.kernel.org,
Magnus Damm <magnus.damm@gmail.com>
Subject: Re: [RFC PATCH net-next v2 2/3] sh_eth: add support RMIIMODE register
Date: Wed, 15 May 2013 09:51:17 +0900 [thread overview]
Message-ID: <20130515005117.GC12246@verge.net.au> (raw)
In-Reply-To: <519240C7.1060406@cogentembedded.com>
On Tue, May 14, 2013 at 05:48:55PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 14-05-2013 6:37, Simon Horman wrote:
>
> >This change is motivated by the lager board which uses the r8a7790 SoC,
> >an R-Car SoC. For this board setting the RMIIMODE register is necessary.
>
> >This patch assumes this is valid for all R-Car SoCs.
>
> No, RMIIMODE register is not documented on R8A7778/9 SoCs and
> this location is described as reserved. How's it called in R8A7790
> manual, CXR15?
It appears to be undocumented in the R8A7790 I have.
Empirically it seems necessary for the lager/R8A7790.
To be honest I am entirely unsure of its relevance to other SoCs.
I wonder if a better approach would be to add a flag to platform
data rather than struct sh_eth_cpu_data. This would allow the register
to only be accessed on boards where it is known to be useful.
>
> >Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>
> >--
>
> Missed a dash here.
>
> >v2
> >* Split from patch to add r8a7790 support to driver (ifdef nastiness)
> >* As suggested by Sergei Shtylyov
> > - Add a field to struct sh_eth_cpu_data to indicate if the
> > rmiimode register is present. This replaces an extremely ugly ifdef.
> >---
> > drivers/net/ethernet/renesas/sh_eth.c | 5 +++++
> > drivers/net/ethernet/renesas/sh_eth.h | 2 ++
> > 2 files changed, 7 insertions(+)
>
> >diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
> >index 016cf80..ff5613d 100644
> >--- a/drivers/net/ethernet/renesas/sh_eth.c
> >+++ b/drivers/net/ethernet/renesas/sh_eth.c
> >@@ -190,6 +190,7 @@ static const u16 sh_eth_offset_fast_rcar[SH_ETH_MAX_REGISTER_OFFSET] = {
> > [RMCR] = 0x0258,
> > [TFUCR] = 0x0264,
> > [RFOCR] = 0x0268,
> >+ [RMIIMODE] = 0x026c,
> > [FCFTR] = 0x0270,
> > [TRIMD] = 0x027c,
> > };
>
> WBR, Sergei
>
next prev parent reply other threads:[~2013-05-15 0:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 2:37 [RFC PATCH net-next v2 0/3] sh_eth: add support for r8a7790 SoC Simon Horman
2013-05-14 2:37 ` Simon Horman
2013-05-14 2:37 ` [RFC PATCH net-next v2 1/3] sh_eth: add support for gpio reset Simon Horman
2013-05-14 2:37 ` Simon Horman
2013-05-14 2:37 ` [RFC PATCH net-next v2 2/3] sh_eth: add support RMIIMODE register Simon Horman
2013-05-14 2:37 ` Simon Horman
2013-05-14 13:48 ` Sergei Shtylyov
2013-05-14 13:48 ` Sergei Shtylyov
2013-05-15 0:51 ` Simon Horman [this message]
2013-05-15 0:51 ` Simon Horman
2013-05-15 14:45 ` Sergei Shtylyov
2013-05-15 14:45 ` Sergei Shtylyov
2013-06-05 20:43 ` Sergei Shtylyov
2013-06-05 20:43 ` Sergei Shtylyov
2013-06-28 1:41 ` Simon Horman
2013-06-28 1:41 ` Simon Horman
2013-06-28 14:31 ` Sergei Shtylyov
2013-06-28 14:31 ` Sergei Shtylyov
2013-05-14 2:37 ` [RFC PATCH net-next v2 3/3] sh_eth: add support for r8a7790 SoC Simon Horman
2013-05-14 2:37 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130515005117.GC12246@verge.net.au \
--to=horms@verge.net.au \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.