Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4543972ybp; Mon, 7 Oct 2019 09:59:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpx/P6xFmZurg97ZSlQdjnmJGINbvxFLsRLjmW8GZEIq1yomFI44G/vODTsQOB3LrPdqMh X-Received: by 2002:a17:906:8258:: with SMTP id f24mr24362516ejx.234.1570467594075; Mon, 07 Oct 2019 09:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570467594; cv=none; d=google.com; s=arc-20160816; b=nwxmWWlAQzNsBaWaSandEpqiWSPdOTM0o+sp3J3H//jp0no7zyjwHBzCyxHbReXHlL reTY4G+vR3gzk+UTdtlAeb1UietUePIwWwla1dUkHQ2HEAo8mUrjhLhJZNGFg0pAqjrT jj1xfo1v2bSwlvSXD/mFOOhjFla2cWOi3RzBhy9sPmsrBsPJHHooAGBlF/MRNe2SEWe0 HKr2KjM0wKwB9jWqsRaHSUzAoqY1nSU1GsCUZttEb4IAXPR/tEhPvC9ZsTGwz43faQDs 0g20gSQY7Ys6hDyU7+hZRcheCUxq65eAV+zVokG+lL/ep0SyfueMX4g/MmGTPM9ouczS a64A== 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=5UXqMCGYMRCnbFRyW5OyXjDigONYDxzopVeThgzfl7c=; b=j9dTZSAiS81d1F41cZRtN2XYVqKmcUx40ZffDqbAd06IIo6a1F7jrEC5NUJo5Wxnzw piNYbCndVfXliFEpYjzGDXyoS9+vJkPMhOJN9RX+qLtPv1/jXfWo4qOYKzho/kz/KnY9 LtE2f47kwxUNpwBe/RRmJPedFprbNGLmC98P3cW9rQRMZdKx1teUNwvPgUsS9cGjz4S4 mT5Fz90Oy5d9DEyV8SdnaUzABMLE7AJy+lF379KZvDftS3hdsk6C1kYMnjv5+iC+AFHC P4kVIbpQjda/CNxXgLUIwDZbalj8ocqGkruloLTVrhoZG80VpaLByVMINC4RLVqB+y3D 9YHQ== 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 91si10090048edy.188.2019.10.07.09.59.30; Mon, 07 Oct 2019 09:59:54 -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 S1728519AbfJGQ7E (ORCPT + 99 others); Mon, 7 Oct 2019 12:59:04 -0400 Received: from muru.com ([72.249.23.125]:35720 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727935AbfJGQ7D (ORCPT ); Mon, 7 Oct 2019 12:59:03 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 906858191; Mon, 7 Oct 2019 16:59:35 +0000 (UTC) Date: Mon, 7 Oct 2019 09:58:59 -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: <20191007165859.GV5610@atomide.com> References: <20191007080339.57209-1-manu@freebsd.org> <20191007161634.GS5610@atomide.com> <20191007183830.71e1303d6bd713014dc36710@bidouilliste.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191007183830.71e1303d6bd713014dc36710@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 16:39]: > On Mon, 7 Oct 2019 09:16:34 -0700 > Tony Lindgren wrote: > > > Hi, > > > > * Emmanuel Vadot [191007 08:04]: > > > Commit 5b63fb90adb95 ("ARM: dts: Fix incomplete dts data for am3 and am4 mmc") > > > fixed the mmc instances on the l3 interconnect but removed the disabled status. > > > Fix this and let boards properly define it if it have it. > > > > The dts default is "okay", and should be fine for all the > > internal devices even if not pinned out on the board. This > > way the devices get properly idled during boot, and we > > avoid repeating status = "enabled" over and over again in > > the board specific dts files. > > That is not correct, if a status != "disabled" then pinmuxing will be > configured for this device and if multiple devices share the same pin > then you have a problem. Note that I have (almost) no knowledge on Ti > SoC but I doubt that this is not the case on them. Hmm well, that should not be needed. The pinmux configuration is always done in a board specific dts file. > Also every other boards that I work with use the standard of setting > every node to disabled in the dtsi and let the board enable them at > will. Is there something different happening in the TI world ? 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. > > Then the board specific dts files might want to configure > > devices with status = "disabled" if really needed. But this > > should be only done for devices that Linux must not use, > > such as crypto acclerators on secure devices if claimed by > > the secure mode. > > > > So if this fixes something, it's almost certainly a sign > > of something else being broken? > > 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. Regards, Tony > > > Fixes: 5b63fb90adb95 ("ARM: dts: Fix incomplete dts data for am3 and am4 mmc") > > > Signed-off-by: Emmanuel Vadot > > > --- > > > arch/arm/boot/dts/am33xx.dtsi | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi > > > index fb6b8aa12cc5..b3a1fd9e39fa 100644 > > > --- a/arch/arm/boot/dts/am33xx.dtsi > > > +++ b/arch/arm/boot/dts/am33xx.dtsi > > > @@ -260,6 +260,7 @@ > > > ti,needs-special-reset; > > > interrupts = <29>; > > > reg = <0x0 0x1000>; > > > + status = "disabled"; > > > }; > > > }; > > > > > > -- > > > 2.22.0 > > > > > > -- > Emmanuel Vadot