From patchwork Wed Mar 4 14:23:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harald Seiler X-Patchwork-Id: 1249033 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=Yd18Ote6; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Xbjm704rz9s3x for ; Thu, 5 Mar 2020 01:24:25 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C374280251; Wed, 4 Mar 2020 15:24:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1583331856; bh=bLAzklN49bXjB4Y4ii3D8wfDkWdZR5tEDLQycuSo6ns=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Yd18Ote63AtB/X3LSLwMHx90aIVB/CyhlVZaDX+TBwKGZ21XF/0hg4ts02YG2G2FX QOYU/MjzWbxGK+Jg1rRoN+jgXV7SY3cldt8HuHWNopj/31QNwQya+g0cuvaCnGoG/n +4oehJaYFKVWJu8kYyiFXXQc2PEWAgI/mhkPbxoMTO6YWHxKwmYlTibfZFsT95IZpB df9/XTa5J7M5Uw2zuUI/KF2xPZsXxeFdsWWFmxi9hct+BPzYjkvKm6VlDMKoHPxK9e /r4veXL+kygUiad71twW905FIzncN/uxxTwSok4OZhy0E1gMy6CGRRE7U/XfaTsOI+ 9XwkjAsLU3r+Q== Received: by phobos.denx.de (Postfix, from userid 109) id 298A080386; Wed, 4 Mar 2020 15:24:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E6A69801F1 for ; Wed, 4 Mar 2020 15:24:11 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=hws@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 48XbjR0cFWz1qrLf; Wed, 4 Mar 2020 15:24:11 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48XbjQ6mVtz1qqkJ; Wed, 4 Mar 2020 15:24:10 +0100 (CET) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id GHPZ6u0Y1p7k; Wed, 4 Mar 2020 15:24:09 +0100 (CET) X-Auth-Info: tcnGZOZ/v7+vRb07vT5CB8BWAfoEPtFtXcJgHr7FYwY= Received: from maia.denx.de (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 4 Mar 2020 15:24:09 +0100 (CET) From: Harald Seiler To: u-boot@lists.denx.de, Stefano Babic , Tom Rini Cc: Harald Seiler , Fabio Estevam , Claudius Heine , Marek Vasut , Heiko Stuebner , Heinrich Schuchardt , "NXP i.MX U-Boot Team" , Peng Fan , Igor Opaniuk Subject: [PATCH 0/3] ARM: Fix reset in SPL if SYSRESET is not used Date: Wed, 4 Mar 2020 15:23:09 +0100 Message-Id: X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Hello, continuing on the discussion around Claudius' patch for fixing reset in SPL [1] we have taken a closer look at the issue. To quickly summarize the situation: The original patch was to enable the generic ARM implementation of `do_reset` if CONFIG_SYSRESET is not enabled in SPL. This would break compilation for some boards which define their own `do_reset` in `board/*/spl.c`. To be more specific, the following 4 boards have this custom `do_reset`: - toradex/verdin-imx8mm - freescale/imx8mn_evk - freescale/imx8mm_evk - freescale/imx8mp_evk I hope we can all agree that `do_reset` is not at all meant to be implemented in board files. From looking at the related code for imx8m, it feels like this was just a workaround hack to archieve the same thing which Claudius has fixed. So this patch series reverts the addition of `do_reset` implementations in imx8m board files and instead switches to using the proper fix provided by Claudius. Additionally, the custom do_reset implementations were passing an address (WDOG1_BASE_ADDR) to `reset_cpu()` instead of 0. This is the only place in the entire U-Boot tree where this happens. Instead, all other implementations simply ignore the parameter and 0 is passed by callers. It looks a lot like this is a legacy left-over which makes me think that using it for a (hard-coded) watchdog address is not a good idea as it breaks convention with the rest of U-Boot. [1]: https://patchwork.ozlabs.org/patch/1201959 Claudius Heine (3): ARM: reset: use do_reset in SPL/TPL if SYSRESET was not enabled for them imx: imx8m*: Remove do_reset from board files imx: imx8m: Don't use the addr parameter of reset_cpu arch/arm/lib/Makefile | 2 +- arch/arm/mach-imx/imx8m/soc.c | 5 +---- board/freescale/imx8mm_evk/spl.c | 9 --------- board/freescale/imx8mn_evk/spl.c | 9 --------- board/freescale/imx8mp_evk/spl.c | 9 --------- board/toradex/verdin-imx8mm/spl.c | 9 --------- 6 files changed, 2 insertions(+), 41 deletions(-)