Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753492AbbDRTj1 (ORCPT ); Sat, 18 Apr 2015 15:39:27 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:60372 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752238AbbDRTj0 (ORCPT ); Sat, 18 Apr 2015 15:39:26 -0400 From: Arnd Bergmann To: Maxime Coquelin Cc: Florian Fainelli , tyler.baker@linaro.org, linux-kernel@vger.kernel.org, peter.griffin@linaro.org, p.zabel@pengutronix.de, dinguyen@opensource.altera.com, linux-arm-kernel@lists.infradead.org Subject: Re: Allowing reset controllers before SMP initialization (on ARM)? Date: Sat, 18 Apr 2015 21:38:53 +0200 Message-ID: <3152529.IOPeCrhLBg@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <552F83F0.1090403@st.com> References: <552F0786.2000505@gmail.com> <2592960.UsK4Hr7GSl@wuerfel> <552F83F0.1090403@st.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:lo9o5XTTaG5HOfCmsIt3N6xfPG63xPK6ar3afV8ikrugnybeAYj QV5O0EUmkD6WZLFmP1f1TR26cIVFHerL6vNowW8npK7MRGsbBu3YzawZEu7beutCEQk3SUJ pzcSzpmB+773Tr2AfjQzSibPytwLrDEm5ef0B5b9feTlyglkzTqnJTWav8IWNhscGR6GEJ0 H1v2zNkPY+91kp9FDHcRQ== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2327 Lines: 50 On Thursday 16 April 2015 11:42:08 Maxime Coquelin wrote: > Hi Florian, Arnd, > > On 04/16/2015 10:04 AM, Arnd Bergmann wrote: > > On Wednesday 15 April 2015 17:51:18 Florian Fainelli wrote: > >> Hi, > >> > >> In order to support initialization of the secondary core on BCM63138 > >> SoCs, I would want to utilize a reset controller to release the > >> secondary CPU from reset [1]. > >> > >> Here are multiple options: > >> > >> - expose a custom function which registers the reset controller platform > >> driver as early as possible, which is probably acceptable, but also > >> requires the DT machine descriptor to populate the platform bus earlier, > >> which we could completely avoid > > I think populating the platform bus earlier is not realistic, that > > would break lots of existing dependencies. In particular, we can't > > do it much earlier because it has to be done after the platform bus > > itself is instantiated. > > > >> - have a OF_DECLARE_RESET_CONTROLLER() which is running fairly early > >> during boot, such that we can utilize reset controllers are early as > >> possible, before any initcall level, and before SMP initialization is > >> kicking in > > We've added a couple of those, and it could be done here, but putting > > them in the right order is a bit tricky, and I think we can avoid it. > > I have already proposed a OF_DECLARE_RESET_CONTROLLER() implementation: > https://lkml.org/lkml/2015/2/20/395 > > I needed it for the STM32 timers, but it was not accepted. > Now, I perform the timers reset in the bootloader, but it shouldn't work > in your case. I guess if there is enough interest in this, we will eventually do it. This is something we can change at any time without user-visible changes or DT binding changes. The tradeoff is mainly that without OF_DECLARE_RESET_CONTROLLER(), we need a couple of hacks in early init code, while adding too many of those OF_DECLARE_*() macros has the risk that we won't be able to order them in a sane way that works on all platforms, so I'm always reluctant about adding an extra one. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/