From patchwork Sun Apr 19 22:03:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 221000 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FB18C3A5A9 for ; Sun, 19 Apr 2020 22:04:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0CDCF2145D for ; Sun, 19 Apr 2020 22:04:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="crNCljqK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726124AbgDSWEk (ORCPT ); Sun, 19 Apr 2020 18:04:40 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:49106 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbgDSWEj (ORCPT ); Sun, 19 Apr 2020 18:04:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=QCpRfTzn+Yg9F1+scAAlsswP1NPJCxiI1Ni4Eq66Wjo=; b=crNCljqK+gzm/g2Aao0abGOJTG CZKa/X5bxSh2N6+3epewoWvF42PXR0M68eZibH4MGRvMsW/meUD/zwpN8wQhNuIhjO11llZH7k2zK LlzpSPqyE7kIb8u+Fo1EJck++BtJpQoexummhmUQGKMNEG2KKQeRnl9H4f7UOYo9Rp6c=; Received: from andrew by vps0.lunn.ch with local (Exim 4.93) (envelope-from ) id 1jQI2w-003hqh-4c; Mon, 20 Apr 2020 00:04:14 +0200 From: Andrew Lunn To: David Miller Cc: netdev , Florian Fainelli , Heiner Kallweit , fugang.duan@nxp.com, Andrew Lunn Subject: [PATCH net-next v3 0/3] FEC MDIO speedups Date: Mon, 20 Apr 2020 00:03:59 +0200 Message-Id: <20200419220402.883493-1-andrew@lunn.ch> X-Mailer: git-send-email 2.26.0.rc2 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patchset gives a number of speedups for MDIO with the FEC. Replacing interrupt driven with polled IO brings a big speedup due to the overheads of interrupts compared to the short time interval. Clocking the bus faster, when the MDIO targets supports it, can double the transfer rate. And suppressing the preamble, if devices support it, makes each transaction faster. By default the MDIO clock remains 2.5MHz and preables are used. But these can now be controlled from the device tree. Since these are generic properties applicable to more than just FEC, these have been added to the generic MDIO binding documentation. v2: readl_poll_timeout() Add patches to set bus frequency and preamble disable v3: Add Reviewed tags uS->us readl_poll_timeout_atomic() Extend DT binding documentation Andrew Lunn (3): net: ethernet: fec: Replace interrupt driven MDIO with polled IO net: ethernet: fec: Allow configuration of MDIO bus speed net: ethernet: fec: Allow the MDIO preamble to be disabled .../devicetree/bindings/net/fsl-fec.txt | 1 + .../devicetree/bindings/net/mdio.yaml | 12 +++ drivers/net/ethernet/freescale/fec.h | 4 +- drivers/net/ethernet/freescale/fec_main.c | 85 +++++++++++-------- 4 files changed, 63 insertions(+), 39 deletions(-)