netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Johan Hovold <johan@kernel.org>, Bruno Thomsen <bth@kamstrup.dk>
Subject: [PATCH 00/22] net: phy: refactoring and Micrel features
Date: Tue, 11 Nov 2014 18:37:18 +0100	[thread overview]
Message-ID: <1415727460-20417-1-git-send-email-johan@kernel.org> (raw)

This series fixes a couple of minor issues, refactors phy-driver
registration, adds device and device-type abstractions to the micrel
driver, and adds support for broadcast disable, led-mode and
RMII-reference clock selection for KSZ8081 and KSZ8091 devices.

While adding support for more features for the Micrel PHYs mentioned
above, it became apparent that the configuration space is much too large
and that adding type-specific callbacks will simply not scale. Instead I
added a driver_data field to struct phy_device, which can be used to
store static device type data that can be parsed and acted on in
generic driver callbacks instead. This allows a lot of duplicated code
to be removed, and should make it much easier to add new features or
deal with device-type quirks in the future.

This series has been tested on a dual KSZ8081 setup (which wasn't
supported until now). Further testing on other Micrel PHYs would be much
appreciated.

Note that the final patch effectively reverts the recent commit
a95a18afe4c8 ("phy/micrel: KSZ8031RNL RMII clock reconfiguration bug"),
which claims that some KSZ8031 PHY  become unresponsive if the broadcast
disable flag is set before configuring the clock mode, even though
disabling the broadcast address is generally the first thing you want to
do (e.g. to avoid unnecessary reconfigurations).

Hopefully, the author of that commit (on CC) can confirm whether this is
indeed the case, and if so the final patch can be dropped unless it can
be worked around in a different way (which I suspect).

Thanks,
Johan


Johan Hovold (22):
  dt/bindings: fix documentation of ethernet-phy compatible property
  net: phy: add module_phy_driver macro
  net: phy: replace phy_driver_register calls
  net: phy: replace phy_drivers_register calls
  net: phy: micrel: fix config_intr error handling
  net: phy: micrel: use BIT macro
  net: phy: micrel: refactor broadcast disable
  net: phy: micrel: disable broadcast for KSZ8081/KSZ8091
  net: phy: micrel: add led-mode sanity check
  net: phy: micrel: refactor led-mode error handling
  net: phy: micrel: clean up led-mode setup
  net: phy: micrel: enable led-mode for KSZ8081/KSZ8091
  net: phy: add static data field to struct phy_driver
  net: phy: micrel: add device-type abstraction
  net: phy: micrel: parse of nodes at probe
  net: phy: micrel: add has-broadcast-disable flag to type data
  net: phy: micrel: add generic rmii-ref-clk-sel support
  net: phy: micrel: add support for rmii_ref_clk_sel to KSZ8081/KSZ8091
  dt/bindings: add micrel,rmii_ref_clk_sel_25_mhz to eth-phy binding
  net: phy: micrel: refactor interrupt config
  net: phy: micrel: add copyright entry
  net: phy: micrel: use generic config_init for KSZ8021/KSZ8031

 Documentation/devicetree/bindings/net/micrel.txt |  11 +-
 Documentation/devicetree/bindings/net/phy.txt    |   3 +-
 drivers/net/phy/amd-xgbe-phy.c                   |  15 +-
 drivers/net/phy/amd.c                            |  17 +-
 drivers/net/phy/at803x.c                         |  14 +-
 drivers/net/phy/bcm63xx.c                        |  15 +-
 drivers/net/phy/bcm7xxx.c                        |  15 +-
 drivers/net/phy/bcm87xx.c                        |  14 +-
 drivers/net/phy/broadcom.c                       |  15 +-
 drivers/net/phy/cicada.c                         |  15 +-
 drivers/net/phy/davicom.c                        |  15 +-
 drivers/net/phy/et1011c.c                        |  17 +-
 drivers/net/phy/icplus.c                         |  15 +-
 drivers/net/phy/lxt.c                            |  15 +-
 drivers/net/phy/marvell.c                        |  15 +-
 drivers/net/phy/micrel.c                         | 346 ++++++++++++++---------
 drivers/net/phy/national.c                       |  17 +-
 drivers/net/phy/qsemi.c                          |  17 +-
 drivers/net/phy/realtek.c                        |  13 +-
 drivers/net/phy/smsc.c                           |  14 +-
 drivers/net/phy/ste10Xp.c                        |  15 +-
 drivers/net/phy/vitesse.c                        |  14 +-
 include/linux/micrel_phy.h                       |   1 -
 include/linux/phy.h                              |  26 ++
 24 files changed, 278 insertions(+), 396 deletions(-)

-- 
2.0.4

             reply	other threads:[~2014-11-11 17:37 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 17:37 Johan Hovold [this message]
     [not found] ` <1415727460-20417-1-git-send-email-johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-11-11 17:37   ` [PATCH 01/22] dt/bindings: fix documentation of ethernet-phy compatible property Johan Hovold
2014-11-11 17:37 ` [PATCH 02/22] net: phy: add module_phy_driver macro Johan Hovold
2014-11-11 17:37 ` [PATCH 03/22] net: phy: replace phy_driver_register calls Johan Hovold
2014-11-11 17:37 ` [PATCH 04/22] net: phy: replace phy_drivers_register calls Johan Hovold
2014-11-11 17:37 ` [PATCH 05/22] net: phy: micrel: fix config_intr error handling Johan Hovold
2014-11-11 17:37 ` [PATCH 06/22] net: phy: micrel: use BIT macro Johan Hovold
2014-11-11 17:37 ` [PATCH 07/22] net: phy: micrel: refactor broadcast disable Johan Hovold
2014-11-11 17:37 ` [PATCH 08/22] net: phy: micrel: disable broadcast for KSZ8081/KSZ8091 Johan Hovold
2014-11-11 17:37 ` [PATCH 09/22] net: phy: micrel: add led-mode sanity check Johan Hovold
2014-11-11 17:37 ` [PATCH 10/22] net: phy: micrel: refactor led-mode error handling Johan Hovold
2014-11-11 17:37 ` [PATCH 11/22] net: phy: micrel: clean up led-mode setup Johan Hovold
2014-11-11 17:37 ` [PATCH 12/22] net: phy: micrel: enable led-mode for KSZ8081/KSZ8091 Johan Hovold
2014-11-11 17:37 ` [PATCH 13/22] net: phy: add static data field to struct phy_driver Johan Hovold
2014-11-11 17:37 ` [PATCH 14/22] net: phy: micrel: add device-type abstraction Johan Hovold
2014-11-11 17:37 ` [PATCH 15/22] net: phy: micrel: parse of nodes at probe Johan Hovold
2014-11-11 17:37 ` [PATCH 16/22] net: phy: micrel: add has-broadcast-disable flag to type data Johan Hovold
2014-11-11 17:37 ` [PATCH 17/22] net: phy: micrel: add generic rmii-ref-clk-sel support Johan Hovold
2014-11-11 17:37 ` [PATCH 18/22] net: phy: micrel: add support for rmii_ref_clk_sel to KSZ8081/KSZ8091 Johan Hovold
2014-11-11 17:37 ` [PATCH 19/22] dt/bindings: add micrel,rmii_ref_clk_sel_25_mhz to eth-phy binding Johan Hovold
2014-11-11 17:57   ` Mark Rutland
2014-11-11 18:18     ` Johan Hovold
2014-11-12  7:01       ` Sascha Hauer
2014-11-12  9:19         ` Johan Hovold
2014-11-13  8:09           ` Sascha Hauer
2014-11-14 11:21             ` Johan Hovold
2014-11-11 17:37 ` [PATCH 20/22] net: phy: micrel: refactor interrupt config Johan Hovold
2014-11-11 17:37 ` [PATCH 21/22] net: phy: micrel: add copyright entry Johan Hovold
2014-11-11 17:37 ` [RFC 22/22] net: phy: micrel: use generic config_init for KSZ8021/KSZ8031 Johan Hovold
2014-11-11 17:49 ` [PATCH 00/22] net: phy: refactoring and Micrel features David Miller
2014-11-11 18:00   ` Johan Hovold
2014-11-11 18:01     ` 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=1415727460-20417-1-git-send-email-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=bth@kamstrup.dk \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.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 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).