[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130515005117.GC12246@verge.net.au>
Date: Wed, 15 May 2013 09:51:17 +0900
From: Simon Horman <horms@...ge.net.au>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc: netdev@...r.kernel.org, linux-sh@...r.kernel.org,
Magnus Damm <magnus.damm@...il.com>
Subject: Re: [RFC PATCH net-next v2 2/3] sh_eth: add support RMIIMODE register
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@...ge.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
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists