Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp280669pxb; Sat, 21 Aug 2021 02:26:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzY7KPfH2oGBlhvsdGUkv9PebGXNX3wVps6PhgMQXRlmPonFsoSVymITgJ1J7DFitUmBUdD X-Received: by 2002:a92:7114:: with SMTP id m20mr10916054ilc.114.1629537978219; Sat, 21 Aug 2021 02:26:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629537978; cv=none; d=google.com; s=arc-20160816; b=PtwPp5gmpIYvm/wjdQ2RVl8fCFbxrd9fLgr5aGJYqwJgBVERJWKMlv+tcSEhp3TNzA fmEhlOgJca6yupGtXWbAiceisK65XyWg4ZtyUQBXrdxFCpEo4k0Cl70d3xnvO7todMPU VAO1Y7yMHQQ4fUXtY0h/ikYC3HLPmp2f8CfqGGmzO3HXgAPk9mTGjlGcKQ5kdsNRjxRG phASG5jDxAzBItg6R9gViTjoz4S2TzjZmpkzQvDxfIqrSD5xDJsCaw2hq1Hpv6iesTqM PeQA59WPErlE6SxFnHBI478is9zmb/YpXRZ5KczOPixszqKlIiPtRa6RXFhQdu6Jyd5K AoRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=LR+RcKmpUa2B7CE+R90rLVYCqeSZ0/h5DuvvGgYLp+g=; b=zZMMmj2uJZi5FJFay7y/Ugo43I7/N2UrS8vkihiTH1s2cgorTrX/tOPQLIZkl2sbR2 fhabd6mBg/Jwb+yoMAvRqv55mrRLidxuMEfsGEdhY0OSCiYH6EI5WHANeb7pxV0S+v3T mRsb8rptJvUQgwZO0Y9BItS2zjU2lyrmdwEU4a/9C3KjxxTjNpQbgdnpHfGUYMUHbEDR A1ZQGWXlOibVbBEH3lhurADLFTCPxx0wxRBDHOOCdXJhxtgiOs4lTQkpDifhhpqWCPOV RPBZa9acjaOP8wBZRazKSp7uDNV+wkaEYrwBRlZikXcqZuLJPuesE2VcApuwcbyOlrBf ++Kg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x11si9915949ion.51.2021.08.21.02.26.06; Sat, 21 Aug 2021 02:26:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233594AbhHUJ0B (ORCPT + 99 others); Sat, 21 Aug 2021 05:26:01 -0400 Received: from elvis.franken.de ([193.175.24.41]:41931 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233301AbhHUJZ7 (ORCPT ); Sat, 21 Aug 2021 05:25:59 -0400 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1mHNFe-0005Uw-02; Sat, 21 Aug 2021 11:25:18 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 7884EC086C; Sat, 21 Aug 2021 10:41:51 +0200 (CEST) Date: Sat, 21 Aug 2021 10:41:51 +0200 From: Thomas Bogendoerfer To: Vladimir Oltean Cc: Alexandre Belloni , devicetree@vger.kernel.org, UNGLinuxDriver@microchip.com, Horatiu Vultur , Rob Herring , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH devicetree 1/2] MIPS: mscc: ocelot: disable all switch ports by default Message-ID: <20210821084151.GC3555@alpha.franken.de> References: <20210819170416.2252210-1-vladimir.oltean@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210819170416.2252210-1-vladimir.oltean@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 19, 2021 at 08:04:15PM +0300, Vladimir Oltean wrote: > The ocelot switch driver used to ignore ports which do not have a > phy-handle property and not probe those, but this is not quite ok since > it is valid to not have a phy-handle property if there is a fixed-link. > > It seems that checking for a phy-handle was a proxy for the proper check > which is for the status, but that doesn't make a lot of sense, since the > ocelot driver already iterates using for_each_available_child_of_node > which skips the disabled ports, so I have no idea. > > Anyway, a widespread pattern in device trees is for a SoC dtsi to > disable by default all hardware, and let board dts files enable what is > used. So let's do that and enable only the ports with a phy-handle in > the pcb120 and pcb123 device tree files. > > Signed-off-by: Vladimir Oltean > --- > arch/mips/boot/dts/mscc/ocelot.dtsi | 11 +++++++++++ > arch/mips/boot/dts/mscc/ocelot_pcb120.dts | 8 ++++++++ > arch/mips/boot/dts/mscc/ocelot_pcb123.dts | 4 ++++ > 3 files changed, 23 insertions(+) applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]