Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753810AbeABPFk (ORCPT + 1 other); Tue, 2 Jan 2018 10:05:40 -0500 Received: from mail-it0-f48.google.com ([209.85.214.48]:42551 "EHLO mail-it0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550AbeABPFg (ORCPT ); Tue, 2 Jan 2018 10:05:36 -0500 X-Google-Smtp-Source: ACJfBouFMyqMB4uVoD2Co0nH2wY9O/RjP2JE5hQQgFDc8AZDp+wn6ZkEMg03UVGNp/Mqy8psmsfNDpTP7AgG+v6FDvk= MIME-Version: 1.0 In-Reply-To: <20180102140852.GE15036@lunn.ch> References: <1514721520-18964-1-git-send-email-mw@semihalf.com> <1514721520-18964-6-git-send-email-mw@semihalf.com> <20171231192354.GB20455@lunn.ch> <20180102133347.GB15036@lunn.ch> <20180102140852.GE15036@lunn.ch> From: Marcin Wojtas Date: Tue, 2 Jan 2018 16:05:35 +0100 Message-ID: Subject: Re: [net-next: PATCH v2 5/5] net: mvpp2: enable ACPI support in the driver To: Andrew Lunn Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev , linux-acpi@vger.kernel.org, Graeme Gregory , "David S. Miller" , Russell King - ARM Linux , "Rafael J. Wysocki" , Florian Fainelli , =?UTF-8?Q?Antoine_T=C3=A9nart?= , Thomas Petazzoni , =?UTF-8?Q?Gregory_Cl=C3=A9ment?= , Ezequiel Garcia , nadavh@marvell.com, Neta Zur Hershkovits , Ard Biesheuvel , Grzegorz Jaszczyk , Tomasz Nowicki Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 2018-01-02 15:08 GMT+01:00 Andrew Lunn : >> Indeed in of_mdio_bus_register_phy, there is of_irq_get. This is more >> a discussion for a MDIO bus / ACPI patchset, but we either find a way >> to use IRQs with ACPI obtained from child nodes or for this world the >> functionality will be limited (at least for the beginning). > > Hi Marcin > > What i want to avoid is adding something which partially works, and > then have to throw it all away and start again in order to add full > support. > > If ACPI really limits interrupts to devices, maybe we need a totally > different representation of MDIO and PHYs in ACPI to what it used in > device tree? The same may be true for the Ethernet ports of the mvpp2? > They might have to be represented as real devices, not children of a > device? Maybe trying to map DT to ACPI on a one-to-one basis is the > wrong approach? > In terms of PP2 controller, I'd prefer to keep as much as possible to describing how real hardware looks like, i.e. single common controller with multiple ports as its children. Those considerations are reflected in the DT description shape and how the driver enumerates, which was part of the design of the initial support. Bending the driver (huge amount of shared initialization and resources) to multiple instances just for the sake of possible avoidance of IRQ description in ACPI is IMO a huge and unnecessary overkill. Anyway, I'll do a more research on the resources / ACPI representation and will get back with some conclusions. I hope that someone from this thread recipents will be able to give some advice too :) Best regards, Marcin