From patchwork Thu Dec 14 10:05:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunihiko Hayashi X-Patchwork-Id: 121894 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp6501263edb; Thu, 14 Dec 2017 02:05:21 -0800 (PST) X-Google-Smtp-Source: ACJfBov+xfhjL4B0IVuGIC0cdM+6f9eish5vCF7LlRQ1LATi+lUF6Gj22QmtueusVzF+B/x7+NYf X-Received: by 10.84.140.5 with SMTP id 5mr4640131pls.149.1513245921536; Thu, 14 Dec 2017 02:05:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513245921; cv=none; d=google.com; s=arc-20160816; b=BQ9J3Pul1FYzsBRtkt2KApEFQYQRx5nYgIex20FkqQbst/CZmzSo79quFi13l+MF/A ewnraV+a3iiUv9BY5+rc1S9MkBhERsYIL2ksuO+FABr8kjFUarxtEyTdDSZJjJkclUU0 EJlWAndLrOYo3W5WAY0i/+ujrPgPrZW7jR109MRlHoX2Evel+hO/jjtlZaREmyA/ThdB PUfrNdd2z74qO0B57n6UDcK1hDLCg+Fk39E2QtiGM8+GctyOVAf20lvUz5KAqcnvcfOz AVEO4F1oJpO9o3NPe4aHLJi+RXEgqHtnnkHc2/P4GGYhEDnjaNkhMwN1/EUqv40i6+er h/jg== 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 :arc-authentication-results; bh=7akDiPwWRofRuzeFGQa9Mt9ipCypJdsXMjXT5IYi/1Q=; b=YWfd8ZjQ0td9XEgQZ9NdokGn7AuQm2K0U/5ti3RUluIf8KzTqwav4tT4npuRGlnCrQ oyj/TGTrQmlJAFB9IZmgmb9J9zWn36qfRx/KL5P23OW0ifXftjaPIgMX0NGfsiYVBY1j KRNuGbdWKUuoYxEy7gk7CGlZqEiL7cS+dOlaqk0kHsoHEdbyMuB6v1azGV5hF7cq4mqb R+03/K2udLaSyfSuT4Gv/Fe+80a1VSlF/VpbJCyhBDdZeTPZs/YSHXD6lLiMBLFPt9rz vrDqo6VxTh9CckpAU8/1wButRC47AoZjD4FS4BeW27VGIv3cfEg7llpk+G81BCybK5vG CVRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si2704034pgo.453.2017.12.14.02.05.21; Thu, 14 Dec 2017 02:05:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of netdev-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 netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751761AbdLNKFT (ORCPT + 7 others); Thu, 14 Dec 2017 05:05:19 -0500 Received: from mx.socionext.com ([202.248.49.38]:44000 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750844AbdLNKFR (ORCPT ); Thu, 14 Dec 2017 05:05:17 -0500 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 14 Dec 2017 19:05:15 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id C7D9A600B8; Thu, 14 Dec 2017 19:05:15 +0900 (JST) Received: from 172.31.9.51 (172.31.9.51) by m-FILTER with ESMTP; Thu, 14 Dec 2017 19:05:15 +0900 Received: from plum.e01.socionext.com (unknown [10.213.132.32]) by kinkan.css.socionext.com (Postfix) with ESMTP id 30AB71A0DEC; Thu, 14 Dec 2017 19:05:15 +0900 (JST) From: Kunihiko Hayashi To: David Miller , netdev@vger.kernel.org Cc: Andrew Lunn , Florian Fainelli , Rob Herring , Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Masahiro Yamada , Masami Hiramatsu , Jassi Brar , Kunihiko Hayashi Subject: [PATCH net-next v6 0/2] add UniPhier AVE ethernet support Date: Thu, 14 Dec 2017 19:05:08 +0900 Message-Id: <1513245910-15961-1-git-send-email-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This series adds support for Socionext AVE ethernet controller implemented on UniPhier SoCs. This driver supports RGMII/RMII modes. v5: https://www.spinics.net/lists/netdev/msg471330.html The PHY patch included in v1 has already separated in: http://www.spinics.net/lists/netdev/msg454595.html Changes since v5: - replace license boilerplate with SPDX Identifier - remove inline directives and an unused function Changes since v4: - fix larger integer warning on AVE_PFMBYTE_MASK0 Changes since v3: - remove checking dma address and use dma_set_mask() to restirct address - replace ave_mdio_busywait() with read_poll_timeout() - replace functions to access to registers with readl/writel() directly - replace a function to access to macaddr with ave_hw_write_macaddr() - change return value of ave_dma_map() to error value - move mdiobus_unregister() from ave_remove() to ave_uninit() - eliminate else block at the end of ave_dma_map() - add mask definitions for packet filter - sort bitmap definitions in descending order - add error check to some functions - rename and sort functions to clear sub-categories - fix error value consistency - remove unneeded initializers - change type of constant arrays Changes since v2: - replace clk_get() with devm_clk_get() - replace reset_control_get() with devm_reset_control_get_optional_shared() - add error return when the error occurs on the above *_get functions - sort soc data and compatible strings - remove clearly obvious comments - modify dt-bindings document consistent with these modifications Changes since v1: - add/remove devicetree properties and sub-node - remove "internal-phy-interrupt" and "desc-bits" property - add SoC data structures based on compatible strings - add node operation to apply "mdio" sub-node - add support for features - add support for {get,set}_pauseparam and pause frame operations - add support for ndo_get_stats64 instead of ndo_get_stats - replace with desiable functions - replace check for valid phy_mode with phy_interface{_mode}_is_rgmii() - replace phy attach message with phy_attached_info() - replace 32bit operation with {upper,lower}_32_bits() on ave_wdesc_addr() - replace nway_reset and get_link with generic functions - move operations to proper functions - move phy_start_aneg() to ndo_open, and remove unnecessary PHY interrupt operations See http://www.spinics.net/lists/netdev/msg454590.html - move irq initialization and descriptor memory allocation to ndo_open - move initialization of reset and clock and mdiobus to ndo_init - fix skbuffer operations - fix skb alignment operations and add Rx buffer adjustment for descriptor See http://www.spinics.net/lists/netdev/msg456014.html - add error returns when dma_map_single() failed - clean up code structures - clean up wait-loop and wake-queue conditions - add ave_wdesc_addr() and offset definitions - add ave_macaddr_init() to clean up mac-address operation - fix checking whether Tx entry is not enough - fix supported features of phydev - add necessary free/disable operations - add phydev check on ave_{get,set}_wol() - remove netif_carrier functions, phydev initializer, and Tx budget check - change obsolate codes - replace ndev->{base_addr,irq} with the members of ave_private - rename goto labels and mask definitions, and remove unused codes Kunihiko Hayashi (2): dt-bindings: net: add DT bindings for Socionext UniPhier AVE net: ethernet: socionext: add AVE ethernet driver .../bindings/net/socionext,uniphier-ave4.txt | 48 + drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile | 1 + drivers/net/ethernet/socionext/Kconfig | 22 + drivers/net/ethernet/socionext/Makefile | 5 + drivers/net/ethernet/socionext/sni_ave.c | 1727 ++++++++++++++++++++ 6 files changed, 1804 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/socionext,uniphier-ave4.txt create mode 100644 drivers/net/ethernet/socionext/Kconfig create mode 100644 drivers/net/ethernet/socionext/Makefile create mode 100644 drivers/net/ethernet/socionext/sni_ave.c -- 2.7.4