From patchwork Wed Jan 17 16:55:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcin Wojtas X-Patchwork-Id: 862398 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=semihalf-com.20150623.gappssmtp.com header.i=@semihalf-com.20150623.gappssmtp.com header.b="IaUOSTpL"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zMD1F3fFJz9s7v for ; Thu, 18 Jan 2018 04:02:57 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754198AbeAQQ4C (ORCPT ); Wed, 17 Jan 2018 11:56:02 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:45074 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753873AbeAQQz7 (ORCPT ); Wed, 17 Jan 2018 11:55:59 -0500 Received: by mail-lf0-f65.google.com with SMTP id x196so2837678lfd.12 for ; Wed, 17 Jan 2018 08:55:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=qfbSk4X/D3UL1ZuWVTBy1HiIWsugmDZaUD38dy1hi1E=; b=IaUOSTpLSarjqle/p5pTlf2eZgieUogLUDNtmr6luP1sIZWup24Jy17hNItXTPQgWz fpxPxLyLyICVT0pPbWkDfYnCWo1ryAwvWFU1uju41gXYPXAjCl9R159IkUbpRsVJhEKF 8kl21gYdQHuVH2WJDbuUA6Ou+Ep5halUIFPtJJzKsguf6VRioEIoXJPP2pOIG58xAk1F cS3jwYhT5JLwnu/sYzVoJDXXXudd75pNZuM8LLFWbJi26k+QhlJKvhKZubxOiQJ+vw3h QcGWn2yb9hLjkDjKB90SNkOFhy43iL6XjvDZnx46lIvGIkQxafLPFEcDZAuWWokSgqqN Me/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qfbSk4X/D3UL1ZuWVTBy1HiIWsugmDZaUD38dy1hi1E=; b=iCBRfe/ssU8StcBvEfp9bUooLqmbVpxvXu2ZpJKtIAisYPn8NuZBoNRS3GrCQUbZ1b WD2me9fcr8ednJYZ+I66c13Iv6LI2lY3uvHaIjhbBTcIBe/26NbpNnMIffcdJJjPuNdm c/Ztfc4VWjW9isTwxJhDizpkzsQLcTIuVke6K5UufkyRn57bQeArmvNcETnLHi3jufT2 xJRKwp7Jy+6qnIgaFN44DgiXjtWWfflYJr86/fL/rgwt5KU8VkgwTl29rzDbx30aJq7D Te4WwRRDF5O8S/tQYwVOxMli0qCTkQoOnC7hQsEwkg3LlkEj0X1p8OpkpMmb1pyXIxEX Huwg== X-Gm-Message-State: AKGB3mJg+GN+0bUvSFJYNFSlzqUP3OpYgGn2q9w1J9ETepRFrUHom60E UYTenkDVhoCNRC6R35tmLxLY6Q== X-Google-Smtp-Source: ACJfBosC6dNExr6KwlTIvMmyhLlBbg5QOU9KNAT7YoYUpNscaYXAXXOjJ2QcxtP23GV1+Ls8f9BsPw== X-Received: by 10.46.32.35 with SMTP id g35mr25769635ljg.75.1516208157925; Wed, 17 Jan 2018 08:55:57 -0800 (PST) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id t81sm868347lff.47.2018.01.17.08.55.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Jan 2018 08:55:57 -0800 (PST) From: Marcin Wojtas To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-acpi@vger.kernel.org Cc: graeme.gregory@linaro.org, davem@davemloft.net, linux@armlinux.org.uk, rafael.j.wysocki@intel.com, andrew@lunn.ch, f.fainelli@gmail.com, antoine.tenart@free-electrons.com, thomas.petazzoni@free-electrons.com, gregory.clement@free-electrons.com, stefanc@marvell.com, nadavh@marvell.com, neta@marvell.com, ard.biesheuvel@linaro.org, mw@semihalf.com, jaz@semihalf.com, tn@semihalf.com Subject: [net-next: PATCH v3 0/7] Armada 7k/8k PP2 ACPI support Date: Wed, 17 Jan 2018 17:55:39 +0100 Message-Id: <1516208146-4144-1-git-send-email-mw@semihalf.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 Hi, This is a third version of the patchset introducing mvpp2 driver ability to operate with ACPI. Until follow-up generic MDIO is introduced it can using the link interrupt capability (a.k.a. in-band management) on all ports, 1000BaseT RGMII included. Driver operation was tested on top of the net-next branch with both DT and ACPI on MacchiatoBin and Armada 7040 DB boards. The main changes were requested during v2 review, which was adding generic helper routines for: * interating over available fwnodes (new patch 4/7) * getting IRQ directly from fwnode (new patch 3/7) Thanks to the latter the driver code could be simplified and allowed to drop formula-based IRQ obtaining. Changes are summarized in the changelog below. mvpp2 driver can work with the ACPI representation, as exposed on a public branch: https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/marvell-armada-wip It was compiled together with the most recent Tianocore EDK2 revision. Please refer to the firmware build instruction on MacchiatoBin board: http://wiki.macchiatobin.net/tiki-index.php?page=Build+from+source+-+UEFI+EDK+II ACPI representation of PP2 controllers (withouth PHY support) can be viewed in the github: * MacchiatoBin: https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/blob/71ae395da1661374b0f07d1602afb1eee56e9794/Platforms/Marvell/Armada/AcpiTables/Armada80x0McBin/Dsdt.asl#L201 * Armada 7040 DB: https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/blob/71ae395da1661374b0f07d1602afb1eee56e9794/Platforms/Marvell/Armada/AcpiTables/Armada70x0/Dsdt.asl#L131 I will appreciate any comments or remarks. Best regards, Marcin Changelog: v2 -> v3: * 1/7, 2/7 - Add Rafael's Acked-by's * 3/7, 4/7 - New patches * 6/7, 7/7 - Update driver with new helper routines usage - Improve commit log. v1 -> v2: * Remove MDIO patches * Use PP2 ports only with link interrupts * Release second region resources in mvpp2 driver (code moved from mvmdio), as explained in details in 5/5 commit message. Marcin Wojtas (7): device property: Introduce fwnode_get_mac_address() device property: Introduce fwnode_get_phy_mode() device property: Introduce fwnode_irq_get() device property: Allow iterating over available child fwnodes net: mvpp2: simplify maintaining enabled ports' list net: mvpp2: use device_*/fwnode_* APIs instead of of_* net: mvpp2: enable ACPI support in the driver drivers/base/property.c | 105 ++++++++-- drivers/net/ethernet/marvell/mvpp2.c | 206 ++++++++++++-------- include/linux/property.h | 11 ++ 3 files changed, 230 insertions(+), 92 deletions(-) Reviewed-by: Graeme Gregory