From patchwork Fri Jan 17 09:50:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jorge Ramirez-Ortiz, Foundries" X-Patchwork-Id: 1224734 X-Patchwork-Delegate: sbabic@denx.de 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=foundries.io Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=foundries-io.20150623.gappssmtp.com header.i=@foundries-io.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=s8TIU4tK; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47zbsX3V7Qz9sRQ for ; Fri, 17 Jan 2020 20:50:40 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0BFC281A39; Fri, 17 Jan 2020 10:50:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=foundries-io.20150623.gappssmtp.com header.i=@foundries-io.20150623.gappssmtp.com header.b="s8TIU4tK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9F72381A3C; Fri, 17 Jan 2020 10:50:34 +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=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6D80981A38 for ; Fri, 17 Jan 2020 10:50:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=jorge@foundries.io Received: by mail-wm1-x342.google.com with SMTP id u2so6879721wmc.3 for ; Fri, 17 Jan 2020 01:50:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=UpJHth14w5hwO9kxuydgUNPq6i5cA3czVpbfZOdPASI=; b=s8TIU4tKUUeVYxj1uGD3n1bLT47wr24xeRlfJpyuSkYcFNEiXBxnuPEJl6T+Euzh9R uBZP8QGd+21V6FT77TqTHk1LJejgnM1l44VSgLb7h9iC+E+jgmkYUffBUXdkE9IuW6MO DUBPVrRPfk5iRdHaFbpcG+lreKvr144UO4/gqu0Y7oSj5+XMaLI+dodTACm5zaUyX0IS K4vEJkcAC+kOSx/MKmfRj+4zWsSR+QNFmTf8O/7/CWVGlWtD3yh955tlmvw/GklxWUZG Qd+vSMwefRs7rt7VcRIevR/c/9rh/5o/J5q/0rbnn+9N3rbz5fUiVIWqniVSjW5BIKOu qGcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UpJHth14w5hwO9kxuydgUNPq6i5cA3czVpbfZOdPASI=; b=F4bdQUOxsRNKlE4rJZsyCr1QGANnKasIWRpWJ5Bx/7/63FQ1bou3ys1kaR14gxUBVI qOzvoiO0wj2KY0QFrMQBuCaFnHa5XGMP13cwR51e6DRGsQRFbM3ZIPcE/lKaEmhdxMxz JxgxjYLw2ywHFlVuxCtYICF3ZWILaXeeXBysJaEHGjCgqVmj9CBgycMURR3RoTI3QMNp u6B3nT6Sa7xbfTFSRdbUmI7gJ6GINxu7TyPxLBAJ2kRUhiSB+p5EF64XEJYc78aZHxOz 6PguzmS34vlstG7f+6boRNVApwctWNTO7TenydwkRH4ZR66iUj22x1jUPO9kdk3k84r1 GfFA== X-Gm-Message-State: APjAAAUQxuA4HKABMrqxW8O17NEhsbtF4bt3Z1HLjbr5HACT37EZPGu2 Pt3Zll+7eH+Jh8HIaKdYTYKrJg== X-Google-Smtp-Source: APXvYqy1ikIGSpjCI8M+luJC6O6ZS29Ym3eVbhtFbzjNnoiHxelRlSTR37PCw6IVkdrWrOBGNYvzbA== X-Received: by 2002:a1c:5ac2:: with SMTP id o185mr3627957wmb.179.1579254629861; Fri, 17 Jan 2020 01:50:29 -0800 (PST) Received: from localhost.localdomain (81.red-95-121-91.dynamicip.rima-tde.net. [95.121.91.81]) by smtp.gmail.com with ESMTPSA id v14sm33049050wrm.28.2020.01.17.01.50.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2020 01:50:29 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge@foundries.io, sbabic@denx.de, festevam@gmail.com, peng.fan@nxp.com Subject: [PATCH] mx7ulp: soc: s_init should only be executed once Date: Fri, 17 Jan 2020 10:50:25 +0100 Message-Id: <20200117095025.6979-1-jorge@foundries.io> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: u-boot@lists.denx.de, uboot-imx@nxp.com Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean On SPL enabled systems, the current s_init code (wdog, clock and ldo init) is executed twice (by SPL and u-boot). This is not necessary and might lead to boot issues (ie, starting PMC1 when it is already running). Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Fabio Estevam --- arch/arm/mach-imx/mx7ulp/soc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c index 8345b01398..316262f71b 100644 --- a/arch/arm/mach-imx/mx7ulp/soc.c +++ b/arch/arm/mach-imx/mx7ulp/soc.c @@ -117,6 +117,7 @@ void init_wdog(void) disable_wdog(WDG2_RBASE); } +#if !defined(CONFIG_SPL) || (defined(CONFIG_SPL) && defined(CONFIG_SPL_BUILD)) #if defined(CONFIG_LDO_ENABLED_MODE) static void init_ldo_mode(void) { @@ -174,6 +175,7 @@ void s_init(void) #endif return; } +#endif #ifndef CONFIG_ULP_WATCHDOG void reset_cpu(ulong addr)