From patchwork Mon Oct 29 06:06:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 990049 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kaod.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42k3zF66vwz9s9m for ; Mon, 29 Oct 2018 17:07:21 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 5EE5DC21F1A; Mon, 29 Oct 2018 06:07:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E2DBEC21EF1; Mon, 29 Oct 2018 06:07:13 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6C638C21EF1; Mon, 29 Oct 2018 06:07:12 +0000 (UTC) Received: from 3.mo7.mail-out.ovh.net (3.mo7.mail-out.ovh.net [46.105.34.113]) by lists.denx.de (Postfix) with ESMTPS id 20B07C21E02 for ; Mon, 29 Oct 2018 06:07:12 +0000 (UTC) Received: from player755.ha.ovh.net (unknown [10.109.143.238]) by mo7.mail-out.ovh.net (Postfix) with ESMTP id 00CCCE4BCA for ; Mon, 29 Oct 2018 07:07:10 +0100 (CET) Received: from zorba.kaod.org (lfbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player755.ha.ovh.net (Postfix) with ESMTPSA id 6EA2D26009A; Mon, 29 Oct 2018 07:06:59 +0100 (CET) From: =?utf-8?q?C=C3=A9dric_Le_Goater?= To: u-boot@lists.denx.de, Joe Hershberger Date: Mon, 29 Oct 2018 07:06:28 +0100 Message-Id: <20181029060641.13824-1-clg@kaod.org> X-Mailer: git-send-email 2.17.2 MIME-Version: 1.0 X-Ovh-Tracer-Id: 11785357278273899289 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrheejgdeijecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Cc: Maxim Sloyko Subject: [U-Boot] [PATCH v5 00/13] Support for the Faraday ftgmac100 controller X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Hello, This series re-enables the Faraday ftgmac100 controller driver and its Aspeed variant as as one can find on the OpenPOWER platforms. The driver is largely reworked to support the driver model and also adds the MDIO bus and phylib support. It was tested on the AST2500 evb. Git tree available here: https://github.com/legoater/u-boot/commits/aspeed Thanks, C. Changes since v4 : - introduced a wait_for_bit macro to handle timeouts when transmitting Changes since v3 : It didn't seem necessary to remove the 'dev' argument from the ftgmac100_phy_init() and ftgmac100_phy_reset() function prototypes as the code is completely reworked in patch 5. - improved ftgmac100_mdio_init() and ftgmac100_phy_init() prototypes - introduced a ftgmac100_wait_for_txdone() function similar to the wait_for_bit_*() macros. Changes since v2 : - split changes in multiple patches to preserve git history, but the code has not changed since the reviewed v2 patchset. - included a couple more changes to sync the DTS file with Linux. Changes since v1 : - improved comments in the code - changed the type of 'iobase' to 'struct ftgmac100 *' to remove the casts in other routines. - replaced the loop in the mdio methods by a call to readl_poll_timeout() and fixed the returned value. - added a flush cache on the arrays of TX and RX descriptors in ftgmac100_start() - fixed returned value of - added a timer loop to catch transmit timeouts - introduced a clk_bulk - improved Kconfig description - introduced a udevice_id .data model - dropped is_aspeed bool - dropped MDIO interface setting for Aspeed SoC. The default is correct. - removed the clcoks which are now handled automatically in the ftgmac100 driver - introduced a fix for the D2-PLL clock setting Cédric Le Goater (13): net: ftgmac100: use the BIT() macro net: ftgmac100: use the aligned() macro net: ftgmac100: convert to driver model net: ftgmac100: use setbits_le32() in the reset method net: ftgmac100: add MDIO bus and phylib support net: ftgmac100: convert the RX/TX descriptor arrays net: ftgmac100: handle timeouts when transmitting net: ftgmac100: add clock support aspeed: ast2500: fix missing break in D2PLL clock enablement net: ftgmac100: Add support for the Aspeed SoC aspeed: Update ast2500 SoC DTS file to Linux v4.17-rc6 level aspeed: Activate ethernet devices on the ast2500 Eval Board aspeed: ast2500: fix D2-PLL clock setting in RGMII mode drivers/net/ftgmac100.h | 158 +-- include/netdev.h | 1 - drivers/clk/aspeed/clk_ast2500.c | 39 + drivers/net/ftgmac100.c | 732 +++++------ arch/arm/dts/ast2500-evb.dts | 23 + arch/arm/dts/ast2500.dtsi | 1949 ++++++++++++++++++------------ configs/evb-ast2500_defconfig | 8 + drivers/net/Kconfig | 26 + 8 files changed, 1707 insertions(+), 1229 deletions(-)