From: Romain Perier <romain.perier@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>, davem@davemloft.net
Cc: heiko@sntech.de, tklauser@distanz.ch, b.galvani@gmail.com,
eric.dumazet@gmail.com, yongjun_wei@trendmicro.com.cn,
netdev@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v2] ethernet: arc: Add support for specific SoC glue layer device tree bindings
Date: Tue, 19 Aug 2014 08:50:20 +0200 [thread overview]
Message-ID: <53F2F3AC.3060102@gmail.com> (raw)
In-Reply-To: <53F2580D.60908@gmail.com>
Le 18/08/2014 21:46, Florian Fainelli a écrit :
> On 08/17/2014 07:48 AM, Romain Perier wrote:
>> Some platforms have special bank registers which might be used to select
>> the correct clock or the right mode for Media Indepent Interface controllers.
>> Sometimes, it is also required to activate vcc regulators in the right order to supply
>> the ethernet controller at the right time. This patch is a refactoring of the arc-emac
>> device driver, it adds a new software architecture design which allows to add specific
>> platform glue layer. Each platform has now its own module which performs custom initialization
>> and remove for the target and then calls to the core driver.
> Most of the changes are made largely harder to read because you renamed
> a struct device pointer variable, so what I would suggest you do is:
>
> - use the same struct device pointer variable throughout
> arc_emac_probe() as a preliminary change, that will be easier to read
>
> - allow for specifying custom platform data and make this intermediate
> struct device pointer variable point to the newly added struct device
> pointer (which would make the changes much less intrusive)
>
> Thanks!
Hi,
so, you suggest two seperated commits, right ? The first one with the
first item and the second one
with the second item, right ?
Romain
>
>> Signed-off-by: Romain Perier <romain.perier@gmail.com>
>> ---
>> drivers/net/ethernet/arc/Kconfig | 13 ++--
>> drivers/net/ethernet/arc/Makefile | 3 +-
>> drivers/net/ethernet/arc/emac.h | 21 ++++-
>> drivers/net/ethernet/arc/emac_arc.c | 77 +++++++++++++++++++
>> drivers/net/ethernet/arc/emac_main.c | 145 +++++++++++++++--------------------
>> drivers/net/ethernet/arc/emac_mdio.c | 11 ++-
>> 6 files changed, 170 insertions(+), 100 deletions(-)
>> create mode 100644 drivers/net/ethernet/arc/emac_arc.c
>>
>> diff --git a/drivers/net/ethernet/arc/Kconfig b/drivers/net/ethernet/arc/Kconfig
>> index 514c57f..ecaff9c 100644
>> --- a/drivers/net/ethernet/arc/Kconfig
>> +++ b/drivers/net/ethernet/arc/Kconfig
>> @@ -3,8 +3,11 @@
>> #
>>
>> config NET_VENDOR_ARC
>> - bool "ARC devices"
>> - default y
>> + tristate "ARC devices"
>> + select MII
>> + select PHYLIB
>> + depends on OF_IRQ
>> + depends on OF_NET
> NET_VENDOR_ARC is a Kconfig symbol that should remain default y, it is
> just there such that there is a submenu for all ARC devices, if you need
> to factor some Kconfig options into a generic place, you should probably
> introduce a new Kconfig option such as ARC_EMAC_GLUE or something like that.
>
>> ---help---
>> If you have a network (Ethernet) card belonging to this class, say Y
>> and read the Ethernet-HOWTO, available from
>> @@ -18,11 +21,7 @@ config NET_VENDOR_ARC
>> if NET_VENDOR_ARC
>>
>> config ARC_EMAC
>> - tristate "ARC EMAC support"
>> - select MII
>> - select PHYLIB
>> - depends on OF_IRQ
>> - depends on OF_NET
>> + tristate "ARC EMAC support
>> ---help---
>> On some legacy ARC (Synopsys) FPGA boards such as ARCAngel4/ML50x
>> non-standard on-chip ethernet device ARC EMAC 10/100 is used.
>> diff --git a/drivers/net/ethernet/arc/Makefile b/drivers/net/ethernet/arc/Makefile
> --
> Florian
next prev parent reply other threads:[~2014-08-19 6:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-17 14:48 [PATCH v2] ethernet: arc: Add support for specific SoC glue layer device tree bindings Romain Perier
2014-08-18 14:32 ` PERIER Romain
2014-08-19 12:13 ` Arnd Bergmann
2014-08-20 6:39 ` PERIER Romain
2014-08-20 16:43 ` Arnd Bergmann
2014-08-18 19:46 ` Florian Fainelli
2014-08-19 6:50 ` Romain Perier [this message]
2014-08-20 7:50 ` Tobias Klauser
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=53F2F3AC.3060102@gmail.com \
--to=romain.perier@gmail.com \
--cc=arnd@arndb.de \
--cc=b.galvani@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=heiko@sntech.de \
--cc=netdev@vger.kernel.org \
--cc=tklauser@distanz.ch \
--cc=yongjun_wei@trendmicro.com.cn \
/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).