From: florian@openwrt.org (Florian Fainelli)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 4/4] net: mvmdio: add getter and setter for PHY addresses
Date: Fri, 25 Jan 2013 20:58:51 +0100 [thread overview]
Message-ID: <5102E3FB.7030808@openwrt.org> (raw)
In-Reply-To: <20130125181629.GA7393@obsidianresearch.com>
Le 25/01/2013 19:16, Jason Gunthorpe a ?crit :
> On Fri, Jan 25, 2013 at 11:06:49AM +0100, Florian Fainelli wrote:
>> This patch adds orion_mdio_{set,get}_phy_addr(.., port_number, phy_addr)
>> which is a feature available in this MDIO driver to monitor a particular
>> PHY address. This brings mvmdio one step closer to what is used in
>> mv643x_eth.
>
> This seems really strange.
>
> Are you sure this should be part of the MDIO driver? Based on my docs,
> this register is part of the ethernet controller HW, which
> autonomously reads from the phy via MDIO.
My reading of the datasheets for 88F628x and Armada 370 says that it
actually belongs to the MDIO part of the controller (it is just below
the SMI registers).
>
> It seems cleaner to set this register from the ethernet controller
> based on the phy it is using and keep the MDIO driver purely for MDIO
> bus access.
>
> It is acceptable to overlap the device address ranges, start the
> ethernet controller at 72000 and start the MDIO at 72004, the platform
> bus code automatically nests them.
Ok I did not think this would work, but I kind of prefer that too.
--
Florian
WARNING: multiple messages have this Message-ID (diff)
From: Florian Fainelli <florian@openwrt.org>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: thomas.petazzoni@free-electrons.com, andrew@lunn.ch,
jason@lakedaemon.net, arnd@arndb.de, netdev@vger.kernel.org,
gregory.clement@free-electrons.com, ian.molton@codethink.co.uk,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH 4/4] net: mvmdio: add getter and setter for PHY addresses
Date: Fri, 25 Jan 2013 20:58:51 +0100 [thread overview]
Message-ID: <5102E3FB.7030808@openwrt.org> (raw)
In-Reply-To: <20130125181629.GA7393@obsidianresearch.com>
Le 25/01/2013 19:16, Jason Gunthorpe a écrit :
> On Fri, Jan 25, 2013 at 11:06:49AM +0100, Florian Fainelli wrote:
>> This patch adds orion_mdio_{set,get}_phy_addr(.., port_number, phy_addr)
>> which is a feature available in this MDIO driver to monitor a particular
>> PHY address. This brings mvmdio one step closer to what is used in
>> mv643x_eth.
>
> This seems really strange.
>
> Are you sure this should be part of the MDIO driver? Based on my docs,
> this register is part of the ethernet controller HW, which
> autonomously reads from the phy via MDIO.
My reading of the datasheets for 88F628x and Armada 370 says that it
actually belongs to the MDIO part of the controller (it is just below
the SMI registers).
>
> It seems cleaner to set this register from the ethernet controller
> based on the phy it is using and keep the MDIO driver purely for MDIO
> bus access.
>
> It is acceptable to overlap the device address ranges, start the
> ethernet controller at 72000 and start the MDIO at 72004, the platform
> bus code automatically nests them.
Ok I did not think this would work, but I kind of prefer that too.
--
Florian
next prev parent reply other threads:[~2013-01-25 19:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-25 10:06 [RFC PATCH 0/4] net: mvmdio: close the gaps between mv643xx_eth and mvmdio Florian Fainelli
2013-01-25 10:06 ` Florian Fainelli
2013-01-25 10:06 ` [RFC PATCH 1/4] net: mvmdio: rename base register cookie from smireg to regs Florian Fainelli
2013-01-25 10:06 ` Florian Fainelli
2013-01-25 10:06 ` [RFC PATCH 2/4] net: mvmdio: do not assume SMI reg is at offset 0 of the resource Florian Fainelli
2013-01-25 10:06 ` Florian Fainelli
2013-01-25 10:06 ` [RFC PATCH 3/4] net: mvmdio: enhance driver to support SMI error/done interrupts Florian Fainelli
2013-01-25 10:06 ` Florian Fainelli
2013-01-25 10:06 ` [RFC PATCH 4/4] net: mvmdio: add getter and setter for PHY addresses Florian Fainelli
2013-01-25 10:06 ` Florian Fainelli
2013-01-25 18:16 ` Jason Gunthorpe
2013-01-25 18:16 ` Jason Gunthorpe
2013-01-25 19:58 ` Florian Fainelli [this message]
2013-01-25 19:58 ` Florian Fainelli
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=5102E3FB.7030808@openwrt.org \
--to=florian@openwrt.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.