Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4596783ybp; Mon, 7 Oct 2019 10:47:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwTJ3hj+kMrBZFaVhha/wI9e0rtJy21H9ZZNmI/Z34h+zI363Z/uWXErKUFeAlBdUnodYa X-Received: by 2002:a50:acc1:: with SMTP id x59mr30350990edc.278.1570470426391; Mon, 07 Oct 2019 10:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570470426; cv=none; d=google.com; s=arc-20160816; b=SgipddNa7s8kadXw3JURrrJg4cbgNWWNE/MYJqN7GrSRXNZKjp56RtKiHN18tuaXC6 ek3EnxAdvLf0sgzAVJe8dHhAEGIMNKrGMsLB+eFQJoI1VshGoBu+vYmbFx4SjR+M5lh+ Sp0+bvbKxwQTMuDtyZWTelmFE+1MHIvWyCifDOCIbU8lpfQs6QykpadOrCVQFbvI+KoA AlFM9S++KIMHVaAQ1FzKec3/7n9TKIgaDQFNHfegyYwjW6thFdOfbdrh929RFaClwPgi lP89nFpDxM1FO497GJx7fv32qV7TUZuSlE8hT1adKPVUc+axFx5jU/UrbVYolraA2R8z fhvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=v5vOwfN+Lnl1bC8pYv7PBe4ft0xFsbmhpojDH6j6YAg=; b=mJ02PIXt71I4mQGZVi8cfIaNk/qXoqkNM/3ubXPP0kZMcBdpD7w3EpgUepy/HOn7fY KPkeWxE8zUDnIZzgsPNnV0bGONODbhjBeTuVkm+renNKmkyrOULPDxC7zato/voiVuv8 zp0rmRgJ38OW4/7HA6MdvPkTYb/uNaHBhsXjhrDMXUZTafHSxkdZ9I7uVV1bSr4XMrqx y4WddCyeOFE/JDiNWM1vjRCNiKKwk7SqJ7cFVqsjsmCqU+IFSmghbGC47J4e0Fep2gPV QKf/qX2oc+DCjtCS01x8RzVprhfk4VUzOXkykErGR6/Gj0EqbKqbNioDwuN2Uy9Suxos mhrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h53si9290569edh.147.2019.10.07.10.46.43; Mon, 07 Oct 2019 10:47:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729099AbfJGRq1 (ORCPT + 99 others); Mon, 7 Oct 2019 13:46:27 -0400 Received: from muru.com ([72.249.23.125]:35754 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728793AbfJGRq1 (ORCPT ); Mon, 7 Oct 2019 13:46:27 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 9F8D68191; Mon, 7 Oct 2019 17:46:58 +0000 (UTC) Date: Mon, 7 Oct 2019 10:46:22 -0700 From: Tony Lindgren To: Emmanuel Vadot Cc: Emmanuel Vadot , bcousson@baylibre.com, robh+dt@kernel.org, mark.rutland@arm.com, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: dts: Set status to disable for MMC3 Message-ID: <20191007174622.GW5610@atomide.com> References: <20191007080339.57209-1-manu@freebsd.org> <20191007161634.GS5610@atomide.com> <20191007183830.71e1303d6bd713014dc36710@bidouilliste.com> <20191007165859.GV5610@atomide.com> <20191007192922.7ce3423bd1fd03551487e907@bidouilliste.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191007192922.7ce3423bd1fd03551487e907@bidouilliste.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Emmanuel Vadot [191007 17:30]: > On Mon, 7 Oct 2019 09:58:59 -0700 > Tony Lindgren wrote: > > There should be no need to do that for SoC internal devices, the > > the default status = "okay" should be just fine. Setting the > > status = "disabled" for SoC internal devices and then enabling them > > again for tens of board specific dts files just generates tons of > > pointless extra churn for the board specific configuration. > > Setting the status = "okay" means that you can use the device. What's > the point of enabling a device if you can't use it ? Or worse can't > probe it like i2c or spi ? The main reasons for not setting SoC internal devices with status = "disabled" are: 1. The SoC internal device is there for sure and also accessible for the kernel 2. Setting an SoC internal device with status = "disabled" makes the kernel completely ignore it and it cannot be idled for PM if left on from the bootloader 3. We avoid tens of lines of pointess repetive status = "okay" tinkering for multiple devices per each board specic dts file making them more readable and easier to maintain > Is the plan for TI dts to have every (or almost) device tree node > enabled even if the device isn't usable on the board ? This has always been the case with omap3, 4, and 5. I don't know when folks started tagging am33xx SoC internal devices as disabled but that should have never been necessary. Few years back I suggested some patches for status = "incomplete" to deal with cases where the device is there but not pinned out or otherwise not complete. But so far we've gotten away without that, so probably not needed. > > > In this case it's FreeBSD being because (I think) we have bad support > > > for the clocks for this module so we panic when we read from it as the > > > module isn't clocked. And since I find it wrong to have device enabled > > > while it isn't present I've sent this patch. > > > > Thanks for clarifying what happens. OK, sounds like FreeBSD might be > > missing clock handling for some devices then. > > > > What Linux does is probe the internal devices and then idle the > > unused ones as bootloaders often leave many things enabled. Otherwise > > the SoC power management won't work properly because device clocks > > will block deeper SoC idle states. > > I can understand stand but then the bootload should be fixed to not > enable devices that aren't enabled in the DTS if it does that. This is not doable as in many cases the bootloader cannot be updated as it can be signed for phones like n900 and droid4. Regards, Tony