netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: paul.burton@mips.com
Cc: netdev <netdev@vger.kernel.org>, Andrew Lunn <andrew@lunn.ch>
Subject: [PATCH net-next RFC 0/2] Convert OKI PCH GBE to mdiobus and phylib
Date: Tue, 20 Feb 2018 03:28:17 +0100	[thread overview]
Message-ID: <1519093699-26437-1-git-send-email-andrew@lunn.ch> (raw)

Hi Paul

Here is my stab at converting the OKI PCH GBE to use the common MDIO
bus and phylib drivers. This is compile tested only, and pretty much
guaranteed to be broken. But hopefully it will help you. Feel free to
pick it up and make it work. Without hardware, there is not much more
i can do, other than answer questions.

The handling of the GPIO for reset is possibly wrong.

1) It is probably active high, when active low is wanted. Your patch
   would sort this out.

2) It is possible the reset happens too late. Since there is no device
   tree binding for the minnow board, it is not possible to register
   the gpio with the core code until after it has been probed and
   attached to the MAC. If the PHY is being held in reset, it might
   not respond to the bus scan, and hence we fail to find it.  If that
   is true, we need a different solution.

Andrew Lunn (2):
  net: phy: at803x: Export at803x_debug_reg_mask()
  net: ethernet: pch_gbe: Convert to mdiobus and phylib

 drivers/net/ethernet/oki-semi/pch_gbe/Kconfig      |   1 +
 drivers/net/ethernet/oki-semi/pch_gbe/Makefile     |   2 +-
 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h    |  35 +-
 .../net/ethernet/oki-semi/pch_gbe/pch_gbe_api.c    | 118 -------
 .../net/ethernet/oki-semi/pch_gbe/pch_gbe_api.h    |   8 +-
 .../ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c    |  89 +----
 .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c   | 373 ++++++++++----------
 .../net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c  | 265 ---------------
 .../net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c    | 377 ---------------------
 .../net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.h    |  37 --
 drivers/net/phy/at803x.c                           |   5 +-
 include/linux/at803x_phy.h                         |  16 +
 12 files changed, 227 insertions(+), 1099 deletions(-)
 delete mode 100644 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c
 delete mode 100644 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.h
 create mode 100644 include/linux/at803x_phy.h

-- 
2.16.1

             reply	other threads:[~2018-02-20  2:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20  2:28 Andrew Lunn [this message]
2018-02-20  2:28 ` [PATCH net-next RFC 1/2] net: phy: at803x: Export at803x_debug_reg_mask() Andrew Lunn
2018-02-20  2:28 ` [PATCH net-next RFC 2/2] net: ethernet: pch_gbe: Convert to mdiobus and phylib Andrew Lunn
2018-02-21  0:33 ` [PATCH net-next RFC 0/2] Convert OKI PCH GBE " Paul Burton

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=1519093699-26437-1-git-send-email-andrew@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=netdev@vger.kernel.org \
    --cc=paul.burton@mips.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).