From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 04C95C4727C for ; Tue, 29 Sep 2020 13:43:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A8AD221734 for ; Tue, 29 Sep 2020 13:43:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730091AbgI2NnR (ORCPT ); Tue, 29 Sep 2020 09:43:17 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:33520 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730027AbgI2NnQ (ORCPT ); Tue, 29 Sep 2020 09:43:16 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kNFuI-00Gl93-K2; Tue, 29 Sep 2020 15:43:02 +0200 Date: Tue, 29 Sep 2020 15:43:02 +0200 From: Andrew Lunn To: Calvin Johnson Cc: Grant Likely , "Rafael J . Wysocki" , Jeremy Linton , Russell King - ARM Linux admin , Jon , Cristi Sovaiala , Ioana Ciornei , Andy Shevchenko , Florian Fainelli , Madalin Bucur , netdev@vger.kernel.org, linux.cj@gmail.com, linux-acpi@vger.kernel.org, nd Subject: Re: [net-next PATCH v7 1/6] Documentation: ACPI: DSD: Document MDIO PHY Message-ID: <20200929134302.GF3950513@lunn.ch> References: <20200715090400.4733-1-calvin.johnson@oss.nxp.com> <20200715090400.4733-2-calvin.johnson@oss.nxp.com> <20200929051703.GA10849@lsv03152.swis.in-blr01.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200929051703.GA10849@lsv03152.swis.in-blr01.nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Tue, Sep 29, 2020 at 10:47:03AM +0530, Calvin Johnson wrote: > Hi Grant, > > On Fri, Sep 25, 2020 at 02:34:21PM +0100, Grant Likely wrote: > > > +DSDT entry for MDIO node > > > +------------------------ > > > +a) Silicon Component > > > +-------------------- > > > + Scope(_SB) > > > + { > > > + Device(MDI0) { > > > + Name(_HID, "NXP0006") > > > + Name(_CCA, 1) > > > + Name(_UID, 0) > > > + Name(_CRS, ResourceTemplate() { > > > + Memory32Fixed(ReadWrite, MDI0_BASE, MDI_LEN) > > > + Interrupt(ResourceConsumer, Level, ActiveHigh, Shared) > > > + { > > > + MDI0_IT > > > + } > > > + }) // end of _CRS for MDI0 > > > + Name (_DSD, Package () { > > > + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > > > + Package () { > > > + Package () {"little-endian", 1}, > > > + } > > > > Adopting the 'little-endian' property here makes little sense. This looks > > like legacy from old PowerPC DT platforms that doesn't belong here. I would > > drop this bit. > > I'm unable to drop this as the xgmac_mdio driver relies on this variable to > change the io access to little-endian. Default is big-endian. > Please see: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/freescale/xgmac_mdio.c?h=v5.9-rc7#n55 Hi Calvin Are we talking about the bus controller endiannes, or the CPU endianness? If we are talking about the CPU endiannes, are you plan on supporting any big endian platforms using ACPI? If not, just hard code it. Newbie ACPI question: Does ACPI even support big endian CPUs, given its x86 origins? If this is the bus controller endianness, are all the SoCs you plan to support via ACPI the same endianness? If they are all the same, you can hard code it. To some extent, this should be a moot point, assuming sane hardware. Generally, the bus endian is fixed. It is either native, or like PCI, little endian. The CPU endian is what can change. But in general, once you figure out what you have, there is an IO macro which will do the right thing without any configuration. Andrew