Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933467AbbLOQe6 (ORCPT ); Tue, 15 Dec 2015 11:34:58 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:60779 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932151AbbLOQe5 (ORCPT ); Tue, 15 Dec 2015 11:34:57 -0500 From: Arnd Bergmann To: Thierry Reding Cc: linux-arm-kernel@lists.infradead.org, Andy Yan , heiko@sntech.de, linux-kernel@vger.kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, khilman@linaro.org, linux@arm.linux.org.uk, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, benchan@google.com, sjg@chromium.org, linux-rockchip@lists.infradead.org, robh+dt@kernel.org, galak@codeaurora.org, wxt@rock-chips.com, john.stultz@linaro.org Subject: Re: [PATCH v3 3/5] soc: rockchip: add reboot notifier driver Date: Tue, 15 Dec 2015 17:34 +0100 Message-ID: <3759218.6sItdW65UG@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151215163120.GA24031@ulmo.nvidia.com> References: <1447840044-19689-1-git-send-email-andy.yan@rock-chips.com> <10162108.nOThMrrbdf@wuerfel> <20151215163120.GA24031@ulmo.nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:x2tQaqNzXG+tTyvBn71HZBkPOT/qoOnoVL1cXMRVw6DvtZMwQPU 3zHT6tvWRTAwN+O2b37KmQAsdAo4wFjry1gEJT7OWL6hr8nBG5lyXtZmKB/cY6AlQy6jA9h 1TGaF5m2J02JZAgfZ89wAo5r1LBQeixfqmKm9PrycbA4P/VQpmSA5DK5l/cdaauo1Eco2f9 4SuVjNOdaQvn7Yv5wXD8Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:C0hhhREEZpg=:NY3iOBhkIQ/++O1nRXgrh9 cCj+ocEwWOmQ24zjUNJQDeQ6FvR89j5czAvfysr7xdZZf6Vll+RpJKdop7bi+8DtyxP+02jwO 9F1FqHU8nrAvCtPVykWvPxCrvlzr/3PLvRfHLM2L65ZOj+p8ac5A47/Wrc0PGfy5N4diyqcKe 3B0uE2bxaZ3C3clF9wtES4eFrV7KTkLrbe/zHgK3/9AnG4VJFPbstxnnhOzFSfKC6x3FkB6ah W4laZ2UD0V8di0bbzCWTq+00nuiIeCO8dFmVYS60wPZ3+mNodD2/qZW36QLA1b1jOyzR/Fdg4 BNVdU7acGGogzQp8Yhgog86usYrw4xhe4e2JM4DfVWrnkRMz+nA62tfI8wtg0/GZ6RkA1hNvn 9oc2fD+oJm0cV7ohMeJFHWUgYF7wypJkk6AWKUFK/zAeR42YQwLMinWsXWLvUE4Xsnkxzm2aS 3dkaHWaafrPOAFdRuRJjJ6HPVasKmK/HKry2VENLfmSrGsBJsuWMDwBTz1DKFam6Nm/EsC7H0 onCpQCvPeeJo0/dvl8VSxKaodVgDz4XA56V9uq26d3oY9iWtHZS9weKs0l9DDKitdNYVaDN5D n+utfivPfNRBzCKnbhnK6lSDQ44wHOxjoc1DXaAEDA1B+Q6rNRRh5KNU0BngPfNS+0eA7My/j 1Ys4yqMXGEHcoF6gcpbSLLPz+8p+D1TKrXIqUFxiFdCUsBkKEzSkgJd6CyCCDNUS49Ens1cqb hnL761+ldDCI1Zn6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1965 Lines: 40 On Tuesday 15 December 2015 17:31:22 Thierry Reding wrote: > On Mon, Dec 14, 2015 at 12:39:44PM +0100, Arnd Bergmann wrote: > > On Wednesday 18 November 2015 17:56:22 Andy Yan wrote: > > > rockchip platform have a protocol to pass the kernel reboot > > > mode to bootloader by some special registers when system reboot. > > > By this way the bootloader can take different action according > > > to the different kernel reboot mode, for example, command > > > "reboot loader" will reboot the board to rockusb mode, this is > > > a very convenient way to get the board enter download mode. > > > > > > Signed-off-by: Andy Yan > > > > Adding John Stultz to Cc > > > > I just saw this thread pop up again, and had to think of John's recent > > patch to unify this across platforms. > > > > John, can you have a look at this driver too, and see how it fits in? > > I think this is yet another variant, using an MMIO register rather than > > RAM (as HTC / NVIDIA does) or SRAM (as Qualcomm does), but otherwise > > it conceptually fits in with what you had. > > FWIW, Tegra typically does use an MMIO register as well. See > drivers/soc/tegra/pmc.c:tegra_pmc_restart_notify(). I don't know what > HTC does, but if it's writing somewhere in RAM it isn't using the > standard way of resetting the SoC. There's early boot ROM code which I > think evaluates the PMC_SCRATCH0 register on Tegra to determine which > mode to boot into. That's before even any firmware gets the chance of > doing anything. HTC apparently uses a separate RAM area to pass the reboot reason, and they have a driver to store that, which is separate from the driver that they use for actually rebooting the machine. 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/