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] sh_eth: add support for r8a7790 SoC
Date: Mon, 13 May 2013 09:36:50 +0900 [thread overview]
Message-ID: <20130513003648.GA22911@verge.net.au> (raw)
In-Reply-To: <518CD330.5030009@cogentembedded.com>
On Fri, May 10, 2013 at 03:00:00PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 10-05-2013 12:01, Simon Horman wrote:
>
> >Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> [...]
>
> >diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
> >index 33dc6f2..1ec26bd 100644
> >--- a/drivers/net/ethernet/renesas/sh_eth.c
> >+++ b/drivers/net/ethernet/renesas/sh_eth.c
> [...]
> >@@ -342,7 +343,8 @@ static void sh_eth_select_mii(struct net_device *ndev)
> > #endif
> >
> > /* There is CPU dependent code */
> >-#if defined(CONFIG_ARCH_R8A7778) || defined(CONFIG_ARCH_R8A7779)
> >+#if defined(CONFIG_ARCH_R8A7778) || defined(CONFIG_ARCH_R8A7779) || \
> >+ defined(CONFIG_ARCH_R8A7790)
> > #define SH_ETH_RESET_DEFAULT 1
> > static void sh_eth_set_duplex(struct net_device *ndev)
> > {
> >@@ -370,7 +372,7 @@ static void sh_eth_set_rate(struct net_device *ndev)
> > }
> > }
> >
> >-/* R8A7778/9 */
> >+/* R8A7778, R8A7779, R8A7790 */
> > static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
> > .set_duplex = sh_eth_set_duplex,
> > .set_rate = sh_eth_set_rate,
> >@@ -1275,6 +1277,10 @@ static int sh_eth_dev_init(struct net_device *ndev, bool start)
> > if (ret)
> > goto out;
> >
> >+#if defined(CONFIG_ARCH_R8A7790)
> >+ sh_eth_write(ndev, 0x1, RMIIMODE);
> >+#endif
> >+
>
> Ugh, this #ifdef will be hard to get rid of. Perhaps you should
> add a field to 'struct sh_eth_cpu_data' indicating the presence of
> this register instead.
Sure, I'll see about making that so.
prev parent reply other threads:[~2013-05-13 0:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-10 8:01 [RFC PATCH net-next] sh_eth: add support for r8a7790 SoC Simon Horman
2013-05-10 8:35 ` Magnus Damm
2013-05-10 11:10 ` Sergei Shtylyov
2013-05-13 0:37 ` Simon Horman
2013-05-14 15:45 ` Laurent Pinchart
2013-05-10 11:00 ` Sergei Shtylyov
2013-05-13 0:36 ` Simon Horman [this message]
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=20130513003648.GA22911@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 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).