Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751242AbcCKRxX (ORCPT ); Fri, 11 Mar 2016 12:53:23 -0500 Received: from mail-pa0-f68.google.com ([209.85.220.68]:36303 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750702AbcCKRxU (ORCPT ); Fri, 11 Mar 2016 12:53:20 -0500 From: David Daney To: "David S. Miller" , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Florian Fainelli , Robert Richter , Sunil Goutham , Kumar Gala , Ian Campbell , Mark Rutland , Pawel Moll , Rob Herring Cc: linux-kernel@vger.kernel.org, Radha Mohan Chintakuntla , David Daney Subject: [PATCH v2 0/3] net/phy: Improvements to Cavium Thunder MDIO code. Date: Fri, 11 Mar 2016 09:53:08 -0800 Message-Id: <1457718791-6505-1-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1834 Lines: 45 From: David Daney Changes from v1: - In 1/3 Add back check for non-OF objects in bgx_init_of_phy(). It is probably not necessary, but better safe than sorry... The firmware on many Cavium Thunder systems configures the MDIO bus hardware to be probed as a PCI device. In order to use the MDIO bus drivers in this configuration, we must add PCI probing to the driver. There are two parts to this set of three patches: 1) Cleanup the PHY probing code in thunder_bgx.c to handle the case where there is no PHY attached to a port, as well as being more robust in the face of driver loading order by use of -EPROBE_DEFER. 2) Split mdio-octeon.c into two drivers, one with platform probing, and the other with PCI probing. Common code is shared between the two. Tested on several different Thunder and OCTEON systems, also compile tested on x86_64. David Daney (3): net: thunderx: Cleanup PHY probing code. phy: mdio-octeon: Refactor into two files/modules phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses. .../devicetree/bindings/net/cavium-mdio.txt | 61 ++++- drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 29 ++- drivers/net/phy/Kconfig | 22 +- drivers/net/phy/Makefile | 2 + drivers/net/phy/mdio-cavium.c | 149 +++++++++++ drivers/net/phy/mdio-cavium.h | 119 +++++++++ drivers/net/phy/mdio-octeon.c | 280 ++------------------- drivers/net/phy/mdio-thunder.c | 154 ++++++++++++ 8 files changed, 535 insertions(+), 281 deletions(-) create mode 100644 drivers/net/phy/mdio-cavium.c create mode 100644 drivers/net/phy/mdio-cavium.h create mode 100644 drivers/net/phy/mdio-thunder.c -- 1.7.11.7