Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7208677ybi; Thu, 1 Aug 2019 04:55:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzqLHRsak8/7BvARxgn/fOdfjV8y2mhYUIDY9H07C860VIVT9dyKMt04XTTd+mefRXJny3k X-Received: by 2002:a62:7890:: with SMTP id t138mr44033532pfc.238.1564660505466; Thu, 01 Aug 2019 04:55:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564660505; cv=none; d=google.com; s=arc-20160816; b=TL7EaljR5fpuT75VtZExu6Dju/BpmeSBGvSXoVU2jgd+K5bDOSCrZJ/QZTs4uJANf2 6YYYq39mo3UoCWJHkz9vRY6kh62QO1nFNXQwh+kkQbSgzpyji+T7N07ZEYtrBZPDWBY8 wE55S/N/QpmpC9xJaEPi+sSB4ODUc049l0TmLqvTKIbu2Ws0XW5OYFZIpLKeKEzNMKtX Wiw+0sq7WxRcltWyN9AqhLcI9FZeCb9ASs8IS1GoceuNfCeFypszxRLk7kpH4Gcufato KaSFuF9QzUWhDhxpJo6lF+7D7KkZg7UkH1t1G+D48PQi4uDUqHwNAIJqioZu3bG0LQkF LXhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=RxtW/cAe+aeSsV/iStOZk/Ay+kPv3n5DTQnm9s280mo=; b=MPwpsttWC8Uo//od2Klf3kOdIBMr43UMjZmFGtdGNd3rqHzVuDPEaKZw2c8PRkT+SZ 8s1FHPPYRjw8W1ZTbJu/DBmeadGU75qlzprUpDOfrKg/NYuz7xK3m46hrdvYykAYmPsf IIKC+qkp9dKAtcrd+6tRbG1VioGPwcxBp/BQf7S9YD9Uifb/uCCRZs2lF5DmCMd2GDu1 K3f72l5tp2c3IQ2rMFI6iMiZf24XPUuPEsEse9OG7yZzwhsyxx6I+y2GzniU/AQz+OVC lTO+sAoG8TYGf2YRsLf2sWNZMuCCbW/tsmS083XFs7/x6e+4NN3b/O5P74urFJKBFEGA qKqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z7si34083041plk.350.2019.08.01.04.54.49; Thu, 01 Aug 2019 04:55:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731097AbfHALw5 (ORCPT + 99 others); Thu, 1 Aug 2019 07:52:57 -0400 Received: from inva020.nxp.com ([92.121.34.13]:53324 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730514AbfHALw5 (ORCPT ); Thu, 1 Aug 2019 07:52:57 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 867A51A0105; Thu, 1 Aug 2019 13:52:54 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 7A0F51A0074; Thu, 1 Aug 2019 13:52:54 +0200 (CEST) Received: from fsr-ub1664-016.ea.freescale.net (fsr-ub1664-016.ea.freescale.net [10.171.71.216]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 14B04205E3; Thu, 1 Aug 2019 13:52:54 +0200 (CEST) From: Claudiu Manoil To: "David S . Miller" Cc: andrew@lunn.ch, Rob Herring , Li Yang , alexandru.marginean@nxp.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v5 0/5] enetc: Add mdio bus driver for the PCIe MDIO endpoint Date: Thu, 1 Aug 2019 14:52:48 +0300 Message-Id: <1564660373-4607-1-git-send-email-claudiu.manoil@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org First patch fixes a sparse issue and cleans up accessors to avoid casting to __iomem. The second one cleans up the Makefile, to make it easier to add new entries. Third patch just registers the PCIe endpoint device containing the MDIO registers as a standalone MDIO bus driver, to provide an alternative way to control the MDIO bus. The same code used by the ENETC ports (eth controllers) to manage MDIO via local registers applies and is reused. Bindings are provided for the new MDIO node, similarly to ENETC port nodes bindings. Last patch enables the ENETC port 1 and its RGMII PHY on the LS1028A QDS board, where the MDIO muxing configuration relies on the MDIO support provided in the first patch. Changes since v0: v1 - fixed mdio bus allocation v2 - cleaned up accessors to avoid casting v3 - fixed spelling (mostly commit message) v4 - fixed err path check blunder v5 - fixed loadble module build, provided separate kbuild module for the driver Claudiu Manoil (5): enetc: Clean up local mdio bus allocation enetc: Clean up makefile enetc: Add mdio bus driver for the PCIe MDIO endpoint dt-bindings: net: fsl: enetc: Add bindings for the central MDIO PCIe endpoint arm64: dts: fsl: ls1028a: Enable eth port1 on the ls1028a QDS board .../devicetree/bindings/net/fsl-enetc.txt | 42 +++++++- .../boot/dts/freescale/fsl-ls1028a-qds.dts | 40 +++++++ .../arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 6 ++ drivers/net/ethernet/freescale/enetc/Kconfig | 9 ++ drivers/net/ethernet/freescale/enetc/Makefile | 19 ++-- .../net/ethernet/freescale/enetc/enetc_mdio.c | 97 ++++++++--------- .../net/ethernet/freescale/enetc/enetc_mdio.h | 12 +++ .../ethernet/freescale/enetc/enetc_pci_mdio.c | 101 ++++++++++++++++++ .../net/ethernet/freescale/enetc/enetc_pf.c | 5 +- 9 files changed, 264 insertions(+), 67 deletions(-) create mode 100644 drivers/net/ethernet/freescale/enetc/enetc_mdio.h create mode 100644 drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c -- 2.17.1