netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Punnaiah Choudary Kalluri <punnaiah.choudary.kalluri@xilinx.com>,
	nicolas.ferre@atmel.com, michals@xilinx.com, anirudh@xilinx.com,
	davem@davemloft.net
Cc: harinik@xilinx.com, kpc528@gmail.com,
	kalluripunnaiahchoudary@gmail.com, netdev@vger.kernel.org,
	Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Subject: Re: [RFC PATCH 0/2] net: macb: Add mdio driver for accessing multiple phy devices
Date: Mon, 13 Jul 2015 11:43:10 -0700	[thread overview]
Message-ID: <55A406BE.5090300@gmail.com> (raw)
In-Reply-To: <1436762920-32107-1-git-send-email-punnaia@xilinx.com>

On 12/07/15 21:48, Punnaiah Choudary Kalluri wrote:
> This patch is to add support for the design that has multiple ethernet
> mac controllers and single mdio bus connected to multiple phy devices.
> i.e mdio lines are connected to any of the ethernet mac controller and
> all the phy devices will be accessed using the phy maintenance interface
> in that mac controller.
> 
>  ______                   _____
> |      |                 |PHY0 |
> | MAC0 |-----------------|     |
> |______|       |         |_____|
>                |           
>  ______        |          _____
> |      |       |         |     |
> | MAC1 |       |_________|PHY1 | 
> |______|                 |____ |
> 
> So, i come up with two implementations for addressing the above configuration.
> 
> Implementation 1:
>  Have separate driver for mdio bus
>  Create a DT node for all the PHY devices connected to the mdio bus
>  This driver will share the register space of the mac controller that has
>  mdio bus connected.

That is the best design implementation, MDIO in itself is a sub-piece of
your Ethernet MAC controller the fact that it is within the Ethernet MAC
core is just coincidental, but there is no reason why it could not be
taken apart and made a separate block in itself.

> 
> Implementation 2:
>  Add new property "has-mdio" and it should be 1 for the mac that has mdio bus
>  connected.
>  Create the mdio bus only when the has-mdio property is 1
> 
> Please review the two implementations and suggest which one is better to proceed
> further. In my opinion implementation 1 will be the ideal one.

Agreed.

> 
> Currently i have tested the patches with single mac and single phy
> configuration. I need to take care of few more cases before releasing the final patch
> but before that i would like to have your opinion on the above implementations
> and finalize one implementation. so that i can enhance it further.
> 
> Punnaiah Choudary Kalluri (1):
>   net: macb: Add mdio driver for accessing multiple phy devices
>   net: macb: Add support for single mac managing more than one phy
> 
> 
>  drivers/net/ethernet/cadence/Makefile    |    2 +-
>  drivers/net/ethernet/cadence/macb.c      |   93 +-------------
>  drivers/net/ethernet/cadence/macb.h      |    3 +-
>  drivers/net/ethernet/cadence/macb_mdio.c |  204 ++++++++++++++++++++++++++++++
>  4 files changed, 211 insertions(+), 91 deletions(-)
>  create mode 100644 drivers/net/ethernet/cadence/macb_mdio.c
> 


-- 
Florian

  parent reply	other threads:[~2015-07-13 20:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13  4:48 [RFC PATCH 0/2] net: macb: Add mdio driver for accessing multiple phy devices Punnaiah Choudary Kalluri
2015-07-13  4:48 ` [RFC PATCH 1/2] " Punnaiah Choudary Kalluri
2015-07-13  4:48 ` [RFC PATCH 2/2] net: macb: Add support for single mac managing more than one phy Punnaiah Choudary Kalluri
2015-07-13 18:43 ` Florian Fainelli [this message]
2015-07-14  3:02   ` [RFC PATCH 0/2] net: macb: Add mdio driver for accessing multiple phy devices punnaiah choudary kalluri
2015-07-20 13:30 ` Michal Simek
2015-07-20 16:23   ` Andrew Lunn
2015-07-27  7:37   ` Nicolas Ferre
2015-07-28  3:34     ` Punnaiah Choudary Kalluri
2015-07-31 21:53       ` Nathan Sullivan
2015-08-03  6:01         ` Michal Simek
2015-07-31 21:58       ` Nathan Sullivan
  -- strict thread matches above, loose matches on Subject: below --
2015-07-13  3:35 Punnaiah Choudary Kalluri

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=55A406BE.5090300@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=anirudh@xilinx.com \
    --cc=davem@davemloft.net \
    --cc=harinik@xilinx.com \
    --cc=kalluripunnaiahchoudary@gmail.com \
    --cc=kpc528@gmail.com \
    --cc=michals@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=punnaia@xilinx.com \
    --cc=punnaiah.choudary.kalluri@xilinx.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).