Message ID | 1368172891-26381-1-git-send-email-horms+renesas@verge.net.au (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Hi Simon, On Fri, May 10, 2013 at 5:01 PM, Simon Horman <horms+renesas@verge.net.au> wrote: > Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au> > --- > drivers/net/ethernet/renesas/Kconfig | 2 +- > drivers/net/ethernet/renesas/sh_eth.c | 10 ++++++++-- > drivers/net/ethernet/renesas/sh_eth.h | 1 + > 3 files changed, 10 insertions(+), 3 deletions(-) Thanks for your work on this driver. > diff --git a/drivers/net/ethernet/renesas/Kconfig b/drivers/net/ethernet/renesas/Kconfig > index bed9841..d664c0f 100644 > --- a/drivers/net/ethernet/renesas/Kconfig > +++ b/drivers/net/ethernet/renesas/Kconfig > @@ -9,7 +9,7 @@ config SH_ETH > CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7619 || \ > CPU_SUBTYPE_SH7724 || CPU_SUBTYPE_SH7734 || \ > CPU_SUBTYPE_SH7757 || ARCH_R8A7740 || \ > - ARCH_R8A7778 || ARCH_R8A7779) > + ARCH_R8A7778 || ARCH_R8A7779 || ARCH_R8A7790) As much as I want to see R8A7790 support right away, wouldn't it be nice _not_ to have this dependency crap in the Kconfig? We are already multi-SoC within mach-shmobile ARM and soon we will be multi-subarch. I actually thought that this was already taken care of. What is your opinion? Perhaps there are already queued up cleanup patches that handle this? Thanks, / magnus -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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. WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello. On 10-05-2013 12:35, Magnus Damm wrote: >> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> >> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> >> --- >> drivers/net/ethernet/renesas/Kconfig | 2 +- >> drivers/net/ethernet/renesas/sh_eth.c | 10 ++++++++-- >> drivers/net/ethernet/renesas/sh_eth.h | 1 + >> 3 files changed, 10 insertions(+), 3 deletions(-) > Thanks for your work on this driver. >> diff --git a/drivers/net/ethernet/renesas/Kconfig b/drivers/net/ethernet/renesas/Kconfig >> index bed9841..d664c0f 100644 >> --- a/drivers/net/ethernet/renesas/Kconfig >> +++ b/drivers/net/ethernet/renesas/Kconfig >> @@ -9,7 +9,7 @@ config SH_ETH >> CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7619 || \ >> CPU_SUBTYPE_SH7724 || CPU_SUBTYPE_SH7734 || \ >> CPU_SUBTYPE_SH7757 || ARCH_R8A7740 || \ >> - ARCH_R8A7778 || ARCH_R8A7779) >> + ARCH_R8A7778 || ARCH_R8A7779 || ARCH_R8A7790) > As much as I want to see R8A7790 support right away, wouldn't it be > nice _not_ to have this dependency crap in the Kconfig? We are already > multi-SoC within mach-shmobile ARM and soon we will be multi-subarch. > I actually thought that this was already taken care of. What is your > opinion? Perhaps there are already queued up cleanup patches that > handle this? No, AFAIK. I haven't gotten around to the big cleanups yet. > Thanks, > / magnus WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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. -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, May 10, 2013 at 03:10:55PM +0400, Sergei Shtylyov wrote: > Hello. > > On 10-05-2013 12:35, Magnus Damm wrote: > > >>Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > >>Signed-off-by: Simon Horman <horms+renesas@verge.net.au> > >>--- > >> drivers/net/ethernet/renesas/Kconfig | 2 +- > >> drivers/net/ethernet/renesas/sh_eth.c | 10 ++++++++-- > >> drivers/net/ethernet/renesas/sh_eth.h | 1 + > >> 3 files changed, 10 insertions(+), 3 deletions(-) > > >Thanks for your work on this driver. > > >>diff --git a/drivers/net/ethernet/renesas/Kconfig b/drivers/net/ethernet/renesas/Kconfig > >>index bed9841..d664c0f 100644 > >>--- a/drivers/net/ethernet/renesas/Kconfig > >>+++ b/drivers/net/ethernet/renesas/Kconfig > >>@@ -9,7 +9,7 @@ config SH_ETH > >> CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7619 || \ > >> CPU_SUBTYPE_SH7724 || CPU_SUBTYPE_SH7734 || \ > >> CPU_SUBTYPE_SH7757 || ARCH_R8A7740 || \ > >>- ARCH_R8A7778 || ARCH_R8A7779) > >>+ ARCH_R8A7778 || ARCH_R8A7779 || ARCH_R8A7790) > > >As much as I want to see R8A7790 support right away, wouldn't it be > >nice _not_ to have this dependency crap in the Kconfig? We are already > >multi-SoC within mach-shmobile ARM and soon we will be multi-subarch. > > >I actually thought that this was already taken care of. What is your > >opinion? Perhaps there are already queued up cleanup patches that > >handle this? > > No, AFAIK. I haven't gotten around to the big cleanups yet. I think it is worth extending the coverage of the driver in parallel to any clean-ups that are going on. -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Magnus, On Friday 10 May 2013 17:35:33 Magnus Damm wrote: > On Fri, May 10, 2013 at 5:01 PM, Simon Horman wrote: > > Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au> > > --- > > > > drivers/net/ethernet/renesas/Kconfig | 2 +- > > drivers/net/ethernet/renesas/sh_eth.c | 10 ++++++++-- > > drivers/net/ethernet/renesas/sh_eth.h | 1 + > > 3 files changed, 10 insertions(+), 3 deletions(-) > > Thanks for your work on this driver. > > > diff --git a/drivers/net/ethernet/renesas/Kconfig > > b/drivers/net/ethernet/renesas/Kconfig index bed9841..d664c0f 100644 > > --- a/drivers/net/ethernet/renesas/Kconfig > > +++ b/drivers/net/ethernet/renesas/Kconfig > > @@ -9,7 +9,7 @@ config SH_ETH > > > > CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7619 || \ > > CPU_SUBTYPE_SH7724 || CPU_SUBTYPE_SH7734 || \ > > CPU_SUBTYPE_SH7757 || ARCH_R8A7740 || \ > > > > - ARCH_R8A7778 || ARCH_R8A7779) > > + ARCH_R8A7778 || ARCH_R8A7779 || ARCH_R8A7790) > > As much as I want to see R8A7790 support right away, wouldn't it be > nice _not_ to have this dependency crap in the Kconfig? We are already > multi-SoC within mach-shmobile ARM and soon we will be multi-subarch. I'm really looking forward to that. Is anyone working on getting rid of CONFIG_MEMORY_START and CONFIG_MEMORY_SIZE ? > I actually thought that this was already taken care of. What is your > opinion? Perhaps there are already queued up cleanup patches that > handle this?
diff --git a/drivers/net/ethernet/renesas/Kconfig b/drivers/net/ethernet/renesas/Kconfig index bed9841..d664c0f 100644 --- a/drivers/net/ethernet/renesas/Kconfig +++ b/drivers/net/ethernet/renesas/Kconfig @@ -9,7 +9,7 @@ config SH_ETH CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7619 || \ CPU_SUBTYPE_SH7724 || CPU_SUBTYPE_SH7734 || \ CPU_SUBTYPE_SH7757 || ARCH_R8A7740 || \ - ARCH_R8A7778 || ARCH_R8A7779) + ARCH_R8A7778 || ARCH_R8A7779 || ARCH_R8A7790) select CRC32 select NET_CORE select MII 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 @@ -189,6 +189,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, }; @@ -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 + /* Descriptor format */ sh_eth_ring_format(ndev); if (mdp->cd->rpadir) diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h index 1ddc9f2..b233a27 100644 --- a/drivers/net/ethernet/renesas/sh_eth.h +++ b/drivers/net/ethernet/renesas/sh_eth.h @@ -60,6 +60,7 @@ enum { EDOCR, TFUCR, RFOCR, + RMIIMODE, FCFTR, RPADIR, TRIMD,
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- drivers/net/ethernet/renesas/Kconfig | 2 +- drivers/net/ethernet/renesas/sh_eth.c | 10 ++++++++-- drivers/net/ethernet/renesas/sh_eth.h | 1 + 3 files changed, 10 insertions(+), 3 deletions(-)