Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965123AbbLOQbf (ORCPT ); Tue, 15 Dec 2015 11:31:35 -0500 Received: from hqemgate15.nvidia.com ([216.228.121.64]:8174 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753152AbbLOQbd (ORCPT ); Tue, 15 Dec 2015 11:31:33 -0500 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Tue, 15 Dec 2015 08:28:05 -0800 Date: Tue, 15 Dec 2015 17:31:22 +0100 From: Thierry Reding To: Arnd Bergmann CC: , Andy Yan , , , , , , , , , , , , , , , Subject: Re: [PATCH v3 3/5] soc: rockchip: add reboot notifier driver Message-ID: <20151215163120.GA24031@ulmo.nvidia.com> References: <1447840044-19689-1-git-send-email-andy.yan@rock-chips.com> <1447840582-19850-1-git-send-email-andy.yan@rock-chips.com> <10162108.nOThMrrbdf@wuerfel> MIME-Version: 1.0 In-Reply-To: <10162108.nOThMrrbdf@wuerfel> X-NVConfidentiality: public User-Agent: Mutt/1.5.23+102 (2ca89bed6448) (2014-03-12) X-Originating-IP: [10.2.71.182] X-ClientProxiedBy: UKMAIL102.nvidia.com (10.26.138.15) To UKMAIL101.nvidia.com (10.26.138.13) Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2729 Lines: 63 --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. > >=20 > > Signed-off-by: Andy Yan >=20 > Adding John Stultz to Cc >=20 > I just saw this thread pop up again, and had to think of John's recent > patch to unify this across platforms. >=20 > 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. Thierry --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWcEBPAAoJEN0jrNd/PrOhyhEP/iy5j+2TS4spEL8am4wV0SJl SsEcvSbq9Sthn6CVQhvm1zyuNqaoNqf0RnVD4zbtSSXDcxScUNub35SuwHMUo44x glsVstv92aZOULRjX6eqWOJHJ34DlFYohBnn/15j6Ze8XxFHoB6t01djRoq44B6T KZZIKWOXAI2M5Lqlr+PXef5GP8Y+/VKtLGanAcZ8pFRf8ITWNJo9j8Pc7sOHcwMq e1lPoIqH4FcWGc0zN2dnta4OwwoTi6IxOBKvjCbcDKrxKtjwk3MI/Dt/fZeyvSD+ RAWrwOIRUY7slvYMZW1IxpNxZUlpIMy6h0rGnDt43afeEiRrzMLG3OGxaXecFyXt ubGVfcKxh3mcc8+XaY7KpxP8nGOKNZZHirMItjBKvBkEU5upuNtwpUmZvJ78reD8 OJKQ1Cu9J4VH4k4F/tYJ3aQK9yOZSO0WZyPPHcVm1d1HhwVStjxsNaBHqcOPUWpT 4tYDoh41KQKK0kNa8SVSRi4aFIgvqGNUrcuYlAB0U2kKHLIfSDlL2ewLdRH6tHx9 f53ssN5rGVl+CheEkvzJKGMNyzI73il0COJNDY9VbDJBvcI4ayNZLprghNsIeo9K 5Oppqh+xXfiXr0Dmiim3m9pcnJIuIzWML0+vGNlllu7URNmFha8tsPjn8oFUHqLX qSXX3s+8R/mTDCEPy+FY =RRZ0 -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g-- -- 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/